public class BasicClient
extends java.lang.Object
implements java.io.Closeable
Modifier and Type | Class and Description |
---|---|
static class |
BasicClient.BasicClientException |
static class |
BasicClient.ClientRequest |
static class |
BasicClient.ExceptionType |
Modifier | Constructor and Description |
---|---|
protected |
BasicClient(java.net.InetSocketAddress socketAddress,
int timeoutSeconds)
Constructor.
|
protected |
BasicClient(java.net.InetSocketAddress socketAddress,
int timeoutSeconds,
ServerConfiguration.Protocol protocol,
boolean isAJavaApplication)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
This method sends a request to the server to close the connection and closes the output and input streams.
|
protected java.lang.Object |
processRequest(java.lang.Object obj) |
protected java.lang.Object |
readObjectFromServer() |
protected void |
setBypassTimeout(boolean bypass) |
protected BasicClient(java.net.InetSocketAddress socketAddress, int timeoutSeconds) throws BasicClient.BasicClientException
socketAddress
- the SocketAddress instance that corresponds to the servertimeoutSeconds
- the number of seconds to wait for server reply before throwing a TimeoutExceptionBasicClient.BasicClientException
protected BasicClient(java.net.InetSocketAddress socketAddress, int timeoutSeconds, ServerConfiguration.Protocol protocol, boolean isAJavaApplication) throws BasicClient.BasicClientException
socketAddress
- the SocketAddress instance that corresponds to the servertimeoutSeconds
- the number of seconds to wait for server reply before throwing a TimeoutExceptionisAJavaApplication
- a boolean that should be set to true by default (false mode is used only for test purpose)BasicClient.BasicClientException
protected java.lang.Object readObjectFromServer() throws BasicClient.BasicClientException
BasicClient.BasicClientException
protected java.lang.Object processRequest(java.lang.Object obj) throws BasicClient.BasicClientException
BasicClient.BasicClientException
public void close()
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
protected void setBypassTimeout(boolean bypass)