Class Endpoint


  • public class Endpoint
    extends Object
    An endpoint is a client- or serverside termination point of a message channel. The endpoint uses a TCP connection to transmit messages bidirectionally, with processors waiting for new messages to arrive.
    Author:
    Rene Schneider - initial API and implementation
    • Method Detail

      • sendMessage

        public void sendMessage​(AbstractMessage aMessage)
        Sends a message. This queues the message into the outqueue, which is then emptied asynchronously by the outputProcessor.
        Parameters:
        aMessage - the message to send
      • isActive

        public boolean isActive()
      • isDisconnectRequested

        public boolean isDisconnectRequested()
      • close

        public void close​(boolean anEmptyOutputQueueFlag)
        Close the connection.
        Parameters:
        anEmptyOutputQueueFlag - whether the output queue shall be sent to the other endpoint before closing
      • instantiateKryo

        protected com.esotericsoftware.kryo.Kryo instantiateKryo()
        Instantiates the Kryo serialization framework.
        Returns:
        an instantiated and fully configured Kryo instance