|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.mina.common.AbstractIoSession
org.apache.mina.common.DummySession
public class DummySession
A dummy IoSession
for unit-testing or non-network-use of
the classes that depends on IoSession
.
AbstractIoSession.close()
, AbstractIoSession.write(Object)
and
AbstractIoSession.setTrafficMask(TrafficMask)
) are final and therefore cannot be
overridden, but you can always add your custom IoFilter
to the
IoFilterChain
to intercept any I/O events and requests.
Constructor Summary | |
---|---|
DummySession()
Creates a new instance. |
Method Summary | |
---|---|
IoSessionConfig |
getConfig()
Returns the configuration of this session. |
IoFilterChain |
getFilterChain()
Returns the filter chain that only affects this session. |
IoHandler |
getHandler()
Returns the IoHandler which handles this session. |
SocketAddress |
getLocalAddress()
Returns the socket address of local machine which is associated with this session. |
protected IoProcessor<IoSession> |
getProcessor()
|
SocketAddress |
getRemoteAddress()
Returns the socket address of remote peer. |
IoService |
getService()
Returns the IoService which provides I/O service to this session. |
TransportMetadata |
getTransportMetadata()
Returns the TransportMetadata that this session runs on. |
void |
setConfig(IoSessionConfig config)
Sets the configuration of this session. |
void |
setHandler(IoHandler handler)
Sets the IoHandler which handles this session. |
void |
setLocalAddress(SocketAddress localAddress)
Sets the socket address of local machine which is associated with this session. |
void |
setRemoteAddress(SocketAddress remoteAddress)
Sets the socket address of remote peer. |
void |
setScheduledWriteBytes(long byteCount)
|
void |
setScheduledWriteMessages(int messages)
|
void |
setService(IoService service)
Sets the IoService which provides I/O service to this session. |
void |
setTransportMetadata(TransportMetadata transportMetadata)
Sets the TransportMetadata that this session runs on. |
void |
updateThroughput(boolean force)
Update all statistical properties related with throughput. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public DummySession()
Method Detail |
---|
public IoSessionConfig getConfig()
IoSession
public void setConfig(IoSessionConfig config)
public IoFilterChain getFilterChain()
IoSession
public IoHandler getHandler()
IoSession
IoHandler
which handles this session.
public void setHandler(IoHandler handler)
IoHandler
which handles this session.
public SocketAddress getLocalAddress()
IoSession
public SocketAddress getRemoteAddress()
IoSession
public void setLocalAddress(SocketAddress localAddress)
public void setRemoteAddress(SocketAddress remoteAddress)
public IoService getService()
IoSession
IoService
which provides I/O service to this session.
public void setService(IoService service)
IoService
which provides I/O service to this session.
protected final IoProcessor<IoSession> getProcessor()
getProcessor
in class AbstractIoSession
public TransportMetadata getTransportMetadata()
IoSession
TransportMetadata
that this session runs on.
public void setTransportMetadata(TransportMetadata transportMetadata)
TransportMetadata
that this session runs on.
public void setScheduledWriteBytes(long byteCount)
setScheduledWriteBytes
in class AbstractIoSession
public void setScheduledWriteMessages(int messages)
setScheduledWriteMessages
in class AbstractIoSession
public void updateThroughput(boolean force)
calculation interval
.
If, however, force is specified as true, this method
updates the throughput properties immediately.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |