public abstract class AbstractSocketJaffreClient extends Object implements JaffreClient, JaffreCookieSupport
Modifier and Type | Class and Description |
---|---|
protected class |
AbstractSocketJaffreClient.InvocationHandlerImpl<T> |
Constructor and Description |
---|
AbstractSocketJaffreClient() |
Modifier and Type | Method and Description |
---|---|
void |
dispose()
Free all resources that were allocated by this Jaffre client.
|
JaffreCallFrameSerializer |
getCallFrameSerializer()
Get the serializer for Jaffre frames.
|
<T> T |
getProxy(Class<T> p_interface)
Create a Jaffre proxy for the given interface.
|
JaffreReturnFrameSerializer |
getReturnFrameSerializer()
Get the serializer for Jaffre return frames.
|
InetAddress |
getServiceInetAddress()
Get the address this client connects to.
|
int |
getServicePort()
Get the port this client connects to.
|
protected abstract Object |
invokeImpl(Class<?> p_interface,
Object p_proxy,
Method p_method,
Object[] p_args)
This method actually performs the remote call.
|
boolean |
isAcceptCookies() |
boolean |
isKeepAlive()
Get the keep-alive property.
|
boolean |
isSendCookies() |
void |
setAcceptCookies(boolean p_bAcceptCookies) |
void |
setCallFrameSerializer(JaffreCallFrameSerializer p_serializer)
Set the serializer for Jaffre frames.
|
void |
setKeepAlive(boolean p_bKeepAlive)
Set the keep-alive property.
|
void |
setReturnFrameSerializer(JaffreReturnFrameSerializer p_serializer)
Set the serializer for Jaffre return frames.
|
void |
setSendCookies(boolean p_bSendCookies) |
void |
setServiceAddress(String p_strServiceAddress)
Set the address this client connects to.
|
void |
setServiceInetAddress(InetAddress p_inetAddr)
Set the address this client connects to.
|
void |
setServicePort(int p_iPort)
Set the port this client connects to.
|
public InetAddress getServiceInetAddress()
null
.public void setServiceInetAddress(InetAddress p_inetAddr)
p_inetAddr
- The address this client connects to.public void setServiceAddress(String p_strServiceAddress) throws UnknownHostException
p_strServiceAddress
- The address this client connects to.UnknownHostException
- See InetAddress.getByName(String)
.public int getServicePort()
public void setServicePort(int p_iPort)
p_iPort
- The port this client connects to.IllegalArgumentException
- If an illegal port number was specified.public boolean isKeepAlive()
true
.true
if this client is configured to try to
keep TCP connections alive, or false
otherwise.public void setKeepAlive(boolean p_bKeepAlive)
p_bKeepAlive
- true
if this client should try to
keep TCP connections alive, or false
otherwise.public JaffreCallFrameSerializer getCallFrameSerializer()
public void setCallFrameSerializer(JaffreCallFrameSerializer p_serializer)
p_serializer
- The serializer for Jaffre frames.public JaffreReturnFrameSerializer getReturnFrameSerializer()
public void setReturnFrameSerializer(JaffreReturnFrameSerializer p_serializer)
p_serializer
- The serializer for Jaffre return frames.public boolean isAcceptCookies()
isAcceptCookies
in interface JaffreCookieSupport
public void setAcceptCookies(boolean p_bAcceptCookies)
setAcceptCookies
in interface JaffreCookieSupport
public boolean isSendCookies()
isSendCookies
in interface JaffreCookieSupport
public void setSendCookies(boolean p_bSendCookies)
setSendCookies
in interface JaffreCookieSupport
public <T> T getProxy(Class<T> p_interface)
JaffreClient
getProxy
in interface JaffreClient
T
- The interface.p_interface
- The interface class.public void dispose()
JaffreClient
dispose
in interface JaffreClient
protected abstract Object invokeImpl(Class<?> p_interface, Object p_proxy, Method p_method, Object[] p_args) throws Throwable
p_interface
- p_proxy
- p_method
- p_args
- Throwable
- If an error occurred.Copyright © 2009-2013 Alexander Veit. All Rights Reserved.