Class ServerConnectionHandler

    • Constructor Detail

      • ServerConnectionHandler

        protected ServerConnectionHandler​(ServerConnection connection)
    • Method Detail

      • onProtocolMessage

        protected abstract void onProtocolMessage​(List<Header> headers,
                                                  byte[] payload,
                                                  MessageType messageType,
                                                  int messageFlags)
        Invoked when a message is received on a connection.
        Parameters:
        headers - List of EventStream headers for the message received.
        payload - Payload for the message received
        messageType - message type for the message
        messageFlags - message flags for the message
      • onIncomingStream

        protected abstract ServerConnectionContinuationHandler onIncomingStream​(ServerConnectionContinuation continuation,
                                                                                String operationName)
        Invoked upon an incoming stream from a client.
        Parameters:
        continuation - continuation object for sending continuation events to the client.
        operationName - name of the operation the client wishes to invoke.
        Returns:
        a new instance of ServerConnectionContinuationHandler for handling continuation events.
      • onConnectionClosed

        protected void onConnectionClosed​(int shutdownReason)
        Invoked upon the connection closing. By default, calls close() on this object.
        Parameters:
        shutdownReason - reason for the shutdown. 0 means clean shutdown.