public interface SocketConnection<Request extends AbstractRequest,Response extends AbstractResponse> extends Disposable
Disposable.Parent
Modifier and Type | Method and Description |
---|---|
void |
addListener(SocketConnectionListener listener,
Disposable parentDisposable) |
void |
close() |
int |
getPort() |
ConnectionState |
getState() |
boolean |
isStopping() |
void |
open() |
<R extends Response> |
registerHandler(java.lang.Class<R> responseClass,
AbstractResponseHandler<R> handler) |
void |
sendRequest(Request request) |
void |
sendRequest(Request request,
AbstractResponseToRequestHandler<? extends Response> handler) |
void |
sendRequest(Request request,
AbstractResponseToRequestHandler<? extends Response> handler,
int timeout,
java.lang.Runnable onTimeout) |
dispose
ConnectionState getState()
void open() throws java.io.IOException
java.io.IOException
void addListener(SocketConnectionListener listener, Disposable parentDisposable)
int getPort()
void sendRequest(Request request)
void sendRequest(Request request, AbstractResponseToRequestHandler<? extends Response> handler)
<R extends Response> void registerHandler(java.lang.Class<R> responseClass, AbstractResponseHandler<R> handler)
void close()
void sendRequest(Request request, AbstractResponseToRequestHandler<? extends Response> handler, int timeout, java.lang.Runnable onTimeout)
boolean isStopping()