Class MessageEndpointListener


  • public class MessageEndpointListener
    extends java.lang.Object
    MessageEndpointListener to serve incoming message endpoint connection.
    • Method Detail

      • accept

        public void accept​(@NonNull
                           MessageEndpointConnection connection)
        Accept a new connection.
        Parameters:
        connection - new incoming connection
      • close

        public void close​(@NonNull
                          MessageEndpointConnection connection)
        Close the given connection.
        Parameters:
        connection - the connection to be closed
      • closeAll

        public void closeAll()
        Close all connections active at the time of the call.
      • addChangeListener

        @NonNull
        public ListenerToken addChangeListener​(@Nullable
                                               java.util.concurrent.Executor queue,
                                               @NonNull
                                               MessageEndpointListenerChangeListener listener)
        Add a change listener with the given dispatch queue.
        Parameters:
        queue - the executor on which the listener will run
        listener - the listener
        Returns:
        listener identifier
      • removeChangeListener

        public void removeChangeListener​(@NonNull
                                         ListenerToken token)
        Remove a change listener.
        Parameters:
        token - identifier for the listener to be removed