Class SignalProtocol<INFRA_STRUCTURE>

    • Field Detail

      • COMPRESSED_STRINGS_ACKNOWLEDGE_TIMEOUT

        public static final long COMPRESSED_STRINGS_ACKNOWLEDGE_TIMEOUT
        Since:
        4.7
      • SIGNAL_REMOTE_EXCEPTION

        public static final short SIGNAL_REMOTE_EXCEPTION
        Since:
        2.0
        See Also:
        Constant Field Values
      • SIGNAL_MONITOR_CANCELED

        public static final short SIGNAL_MONITOR_CANCELED
        Since:
        2.0
        See Also:
        Constant Field Values
      • SIGNAL_MONITOR_PROGRESS

        public static final short SIGNAL_MONITOR_PROGRESS
        Since:
        2.0
        See Also:
        Constant Field Values
      • SIGNAL_SET_TIMEOUT

        public static final short SIGNAL_SET_TIMEOUT
        Since:
        4.1
        See Also:
        Constant Field Values
      • SIGNAL_ACKNOWLEDGE_COMPRESSED_STRINGS

        public static final short SIGNAL_ACKNOWLEDGE_COMPRESSED_STRINGS
        Since:
        4.7
        See Also:
        Constant Field Values
    • Constructor Detail

      • SignalProtocol

        public SignalProtocol​(java.lang.String type)
        Since:
        2.0
    • Method Detail

      • setTimeout

        public void setTimeout​(long timeout)
        Equivalent to calling SignalProtocol.setTimeout(timeout, false).
        Specified by:
        setTimeout in interface ISignalProtocol<INFRA_STRUCTURE>
        Since:
        2.0
      • setTimeout

        public boolean setTimeout​(long timeout,
                                  boolean useOldTimeoutToSendNewOne)
        Update the timeout used for signal end of stream waiting time.
        Parameters:
        timeout - the new timeout
        useOldTimeoutToSendNewOne - true to use the old timeout, false to use the new specified one to sent to server side the new specified timeout
        Returns:
        true if the new specified timeout has correctly been sent NOTE: this second parameter is useful mostly for test to be able to set a to small timeout
        Since:
        4.4
      • waitForSignals

        public boolean waitForSignals​(long timeout)
      • handleBuffer

        public void handleBuffer​(IBuffer buffer)
        Handles a given (incoming) buffer. Creates a signal to act upon the given buffer or uses a previously created signal.
        Specified by:
        handleBuffer in interface IBufferHandler
        Parameters:
        buffer - The buffer to be handled.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class org.eclipse.net4j.util.lifecycle.Lifecycle
      • doBeforeDeactivate

        protected void doBeforeDeactivate()
                                   throws java.lang.Exception
        Overrides:
        doBeforeDeactivate in class org.eclipse.net4j.util.lifecycle.Lifecycle
        Throws:
        java.lang.Exception
      • provideSignalReactor

        protected final SignalReactor provideSignalReactor​(short signalID)
      • createSignalReactor

        protected SignalReactor createSignalReactor​(short signalID)
        Returns a new signal instance to serve the given signal ID or null if the signal ID is invalid/unknown for this protocol.
      • isSendingTimeoutChanges

        protected boolean isSendingTimeoutChanges()
        Returns true by default, override to change this behavior.
        Since:
        4.1
      • getStringCompressor

        protected org.eclipse.net4j.util.io.StringCompressor getStringCompressor()
        Since:
        4.7