|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IoService
Base interface for all IoAcceptor
s and IoConnector
s
that provide I/O service and manage IoSession
s.
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 IoSession s
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 IoSession s 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 IoSession s
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 IoSession s 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()
IoSession
s
created by this service.
IoFilterChainBuilder getFilterChainBuilder()
IoFilterChainBuilder
which will build the
IoFilterChain
of all IoSession
s 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 IoSession
s 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 IoSession
s at all, because
IoFilterChainBuilder
s affect only newly created IoSession
s.
IllegalStateException
- if the current IoFilterChainBuilder
is
not a DefaultIoFilterChainBuilder
boolean isActive()
long getActivationTime()
System.currentTimeMillis()
Set<WriteFuture> broadcast(Object message)
message
to all the IoSession
s
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 |