public abstract class ServerConnectionHandler extends Object implements AutoCloseable
| Modifier and Type | Field and Description |
|---|---|
protected ServerConnection |
connection |
| Modifier | Constructor and Description |
|---|---|
protected |
ServerConnectionHandler(ServerConnection connection) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
protected void |
onConnectionClosed(int shutdownReason)
Invoked upon the connection closing.
|
protected abstract ServerConnectionContinuationHandler |
onIncomingStream(ServerConnectionContinuation continuation,
String operationName)
Invoked upon an incoming stream from a client.
|
protected abstract void |
onProtocolMessage(List<Header> headers,
byte[] payload,
MessageType messageType,
int messageFlags)
Invoked when a message is received on a connection.
|
protected ServerConnection connection
protected ServerConnectionHandler(ServerConnection connection)
protected abstract void onProtocolMessage(List<Header> headers, byte[] payload, MessageType messageType, int messageFlags)
headers - List of EventStream headers for the message received.payload - Payload for the message receivedmessageType - message type for the messagemessageFlags - message flags for the messageprotected abstract ServerConnectionContinuationHandler onIncomingStream(ServerConnectionContinuation continuation, String operationName)
continuation - continuation object for sending continuation events to the client.operationName - name of the operation the client wishes to invoke.protected void onConnectionClosed(int shutdownReason)
shutdownReason - reason for the shutdown. 0 means clean shutdown.public void close()
close in interface AutoCloseableCopyright © 2021. All rights reserved.