org.xsocket.stream.io.spi
Interface IIoHandlerContext

Package class diagram package IIoHandlerContext

public interface IIoHandlerContext

Provides the IIoHandler`s context parameters

This class is experimental and is subject to change


Method Summary
 java.util.concurrent.Executor getWorkerpool()
          the (shared) worker pool.
 boolean isAppHandlerListenForConnectEvent()
          returns true, if the callback handler`s onConnect method should be called
 boolean isAppHandlerListenForDataEvent()
          returns true, if the callback handler`s onData method should be called
 boolean isAppHandlerListenforDisconnectEvent()
          returns true, if the callback handler`s onDisconnect method should be called
 boolean isAppHandlerListenForTimeoutEvent()
          returns true, if the callback handler`s onTimeout method should be called
 boolean isAppHandlerThreadSafe()
          return if handler is thread save.
 boolean isMultithreaded()
          return if handling is multithreaded.
 

Method Detail

getWorkerpool

java.util.concurrent.Executor getWorkerpool()
the (shared) worker pool. In case of multithreaded isMultithreaded(), this worker pool will also be used to perform the onXX callback Methods of the IIoHandlerCallback calls.

Returns:
the worker pool

isMultithreaded

boolean isMultithreaded()
return if handling is multithreaded.

Returns:
true, if multithreaded

isAppHandlerThreadSafe

boolean isAppHandlerThreadSafe()
return if handler is thread save. If the appHandler is not thread-safe the IoHandler has to synchonize the callback methods

Returns:
true, if handler is threadsafe

isAppHandlerListenForConnectEvent

boolean isAppHandlerListenForConnectEvent()
returns true, if the callback handler`s onConnect method should be called

Returns:
true, if the callback handler`s onConnect method should be called

isAppHandlerListenForDataEvent

boolean isAppHandlerListenForDataEvent()
returns true, if the callback handler`s onData method should be called

Returns:
true, if the callback handler`s onData method should be called

isAppHandlerListenforDisconnectEvent

boolean isAppHandlerListenforDisconnectEvent()
returns true, if the callback handler`s onDisconnect method should be called

Returns:
true, if the callback handler`s onDisconnect method should be called

isAppHandlerListenForTimeoutEvent

boolean isAppHandlerListenForTimeoutEvent()
returns true, if the callback handler`s onTimeout method should be called

Returns:
true, if the callback handler`s onTimeout method should be called