|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface IoService
Base interface for all IoAcceptors and IoConnectors
that provide I/O service and manage IoSessions.
| Method Summary | |
|---|---|
void |
addListener(IoServiceListener listener)
Adds an IoServiceListener that listens any events related with
this service. |
Set<WriteFuture> |
broadcast(Object message)
Writes the specified message to all the IoSessions
managed by this service. |
void |
dispose()
Releases any resources allocated by this service. |
long |
getActivationTime()
Returns the time when this service was activated. |
DefaultIoFilterChainBuilder |
getFilterChain()
A shortcut for ( ( DefaultIoFilterChainBuilder ) getFilterChainBuilder() ). |
IoFilterChainBuilder |
getFilterChainBuilder()
Returns the IoFilterChainBuilder which will build the
IoFilterChain of all IoSessions which is created
by this service. |
IoHandler |
getHandler()
Returns the handler which will handle all connections managed by this service. |
IoServiceIdleState |
getIdleState()
Returns the IoServiceIdleState for this service. |
int |
getManagedSessionCount()
Returns the number of all sessions which are currently managed by this service. |
Map<Long,IoSession> |
getManagedSessions()
Returns the map of all sessions which are currently managed by this service. |
int |
getScheduledWriteBytes()
Returns the number of bytes scheduled to be written |
int |
getScheduledWriteMessages()
Returns the number of messages scheduled to be written |
IoSessionConfig |
getSessionConfig()
Returns the default configuration of the new IoSessions
created by this service. |
IoSessionDataStructureFactory |
getSessionDataStructureFactory()
Returns the IoSessionDataStructureFactory that provides
related data structures for a new session created by this service. |
IoServiceStatistics |
getStatistics()
Returns the IoServiceStatistics object for this service. |
TransportMetadata |
getTransportMetadata()
Returns the TransportMetadata that this service runs on. |
boolean |
isActive()
Returns a value of whether or not this service is active |
boolean |
isDisposed()
Returns true if and if only all resources of this processor have been disposed. |
boolean |
isDisposing()
Returns true if and if only dispose() method has
been called. |
void |
removeListener(IoServiceListener listener)
Removed an existing IoServiceListener that listens any events
related with this service. |
void |
setFilterChainBuilder(IoFilterChainBuilder builder)
Sets the IoFilterChainBuilder which will build the
IoFilterChain of all IoSessions which is created
by this service. |
void |
setHandler(IoHandler handler)
Sets the handler which will handle all connections managed by this service. |
void |
setSessionDataStructureFactory(IoSessionDataStructureFactory sessionDataStructureFactory)
Sets the IoSessionDataStructureFactory that provides
related data structures for a new session created by this service. |
| Method Detail |
|---|
TransportMetadata getTransportMetadata()
TransportMetadata that this service runs on.
void addListener(IoServiceListener listener)
IoServiceListener that listens any events related with
this service.
void removeListener(IoServiceListener listener)
IoServiceListener that listens any events
related with this service.
boolean isDisposing()
dispose() method has
been called. Please note that this method will return true
even after all the related resources are released.
boolean isDisposed()
void dispose()
IoHandler getHandler()
void setHandler(IoHandler handler)
Map<Long,IoSession> getManagedSessions()
ID of the
session.
int getManagedSessionCount()
IoSessionConfig getSessionConfig()
IoSessions
created by this service.
IoFilterChainBuilder getFilterChainBuilder()
IoFilterChainBuilder which will build the
IoFilterChain of all IoSessions which is created
by this service.
The default value is an empty DefaultIoFilterChainBuilder.
void setFilterChainBuilder(IoFilterChainBuilder builder)
IoFilterChainBuilder which will build the
IoFilterChain of all IoSessions which is created
by this service.
If you specify null this property will be set to
an empty DefaultIoFilterChainBuilder.
DefaultIoFilterChainBuilder getFilterChain()
getFilterChainBuilder() ).
Please note that the returned object is not a real IoFilterChain
but a DefaultIoFilterChainBuilder. Modifying the returned builder
won't affect the existing IoSessions at all, because
IoFilterChainBuilders affect only newly created IoSessions.
IllegalStateException - if the current IoFilterChainBuilder is
not a DefaultIoFilterChainBuilderboolean isActive()
long getActivationTime()
System.currentTimeMillis()Set<WriteFuture> broadcast(Object message)
message to all the IoSessions
managed by this service. This method is a convenience shortcut for
IoUtil.broadcast(Object, Collection).
IoSessionDataStructureFactory getSessionDataStructureFactory()
IoSessionDataStructureFactory that provides
related data structures for a new session created by this service.
void setSessionDataStructureFactory(IoSessionDataStructureFactory sessionDataStructureFactory)
IoSessionDataStructureFactory that provides
related data structures for a new session created by this service.
int getScheduledWriteBytes()
int getScheduledWriteMessages()
IoServiceIdleState getIdleState()
IoServiceStatistics getStatistics()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||