Interface ClientListenerRequestHandler
-
- All Known Implementing Classes:
ClientRequestHandler,JdbcRequestHandler,OdbcRequestHandler
public interface ClientListenerRequestHandlerClient listener request handler.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ClientListenerResponsehandle(ClientListenerRequest req)Handle request.ClientListenerResponsehandleException(Throwable e, ClientListenerRequest req)Handle exception.booleanisCancellationCommand(int cmdId)Detect whether given command is a cancellation command.booleanisCancellationSupported()Checks whether query cancellation is supported within given version of protocol.ClientListenerProtocolVersionprotocolVersion()voidregisterRequest(long reqId, int cmdType)Registers request for futher cancellation if any.voidunregisterRequest(long reqId)Try to unregister request.voidwriteHandshake(BinaryWriterExImpl writer)Write successful handshake response.
-
-
-
Method Detail
-
handle
ClientListenerResponse handle(ClientListenerRequest req)
Handle request.- Parameters:
req- Request.- Returns:
- Response.
-
handleException
ClientListenerResponse handleException(Throwable e, ClientListenerRequest req)
Handle exception.- Parameters:
e- Exception.req- Request.- Returns:
- Error response.
-
writeHandshake
void writeHandshake(BinaryWriterExImpl writer)
Write successful handshake response.- Parameters:
writer- Binary writer.
-
isCancellationSupported
boolean isCancellationSupported()
Checks whether query cancellation is supported within given version of protocol.- Returns:
trueif supported,falseotherwise.
-
isCancellationCommand
boolean isCancellationCommand(int cmdId)
Detect whether given command is a cancellation command.- Parameters:
cmdId- Command Id- Returns:
- true if given command is cancellation one, false otherwise;
-
registerRequest
void registerRequest(long reqId, int cmdType)Registers request for futher cancellation if any.- Parameters:
reqId- Request Id.cmdType- Command Type.
-
unregisterRequest
void unregisterRequest(long reqId)
Try to unregister request.- Parameters:
reqId- Request Id.
-
protocolVersion
ClientListenerProtocolVersion protocolVersion()
- Returns:
- Protocol version.
-
-