|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.mina.core.session.AbstractIoSessionConfig
public abstract class AbstractIoSessionConfig
A base implementation of IoSessionConfig
.
Constructor Summary | |
---|---|
protected |
AbstractIoSessionConfig()
|
Method Summary | |
---|---|
protected abstract void |
doSetAll(IoSessionConfig config)
Implement this method to set all transport-specific configuration properties retrieved from the specified config. |
int |
getBothIdleTime()
Returns idle time for IdleStatus.BOTH_IDLE in seconds. |
long |
getBothIdleTimeInMillis()
Returns idle time for IdleStatus.BOTH_IDLE in milliseconds. |
int |
getIdleTime(IdleStatus status)
Returns idle time for the specified type of idleness in seconds. |
long |
getIdleTimeInMillis(IdleStatus status)
Returns idle time for the specified type of idleness in milliseconds. |
int |
getMaxReadBufferSize()
Returns the maximum size of the read buffer that I/O processor allocates per each read. |
int |
getMinReadBufferSize()
Returns the minimum size of the read buffer that I/O processor allocates per each read. |
int |
getReadBufferSize()
Returns the size of the read buffer that I/O processor allocates per each read. |
int |
getReaderIdleTime()
Returns idle time for IdleStatus.READER_IDLE in seconds. |
long |
getReaderIdleTimeInMillis()
Returns idle time for IdleStatus.READER_IDLE in milliseconds. |
int |
getThroughputCalculationInterval()
Returns the interval (seconds) between each throughput calculation. |
long |
getThroughputCalculationIntervalInMillis()
Returns the interval (milliseconds) between each throughput calculation. |
int |
getWriterIdleTime()
Returns idle time for IdleStatus.WRITER_IDLE in seconds. |
long |
getWriterIdleTimeInMillis()
Returns idle time for IdleStatus.WRITER_IDLE in milliseconds. |
int |
getWriteTimeout()
Returns write timeout in seconds. |
long |
getWriteTimeoutInMillis()
Returns write timeout in milliseconds. |
boolean |
isUseReadOperation()
Returns true if and only if IoSession.read() operation
is enabled. |
void |
setAll(IoSessionConfig config)
Sets all configuration properties retrieved from the specified config. |
void |
setBothIdleTime(int idleTime)
Sets idle time for IdleStatus.WRITER_IDLE in seconds. |
void |
setIdleTime(IdleStatus status,
int idleTime)
Sets idle time for the specified type of idleness in seconds. |
void |
setMaxReadBufferSize(int maxReadBufferSize)
Sets the maximum size of the read buffer that I/O processor allocates per each read. |
void |
setMinReadBufferSize(int minReadBufferSize)
Sets the minimum size of the read buffer that I/O processor allocates per each read. |
void |
setReadBufferSize(int readBufferSize)
Sets the size of the read buffer that I/O processor allocates per each read. |
void |
setReaderIdleTime(int idleTime)
Sets idle time for IdleStatus.READER_IDLE in seconds. |
void |
setThroughputCalculationInterval(int throughputCalculationInterval)
Sets the interval (seconds) between each throughput calculation. |
void |
setUseReadOperation(boolean useReadOperation)
Enables or disabled IoSession.read() operation. |
void |
setWriterIdleTime(int idleTime)
Sets idle time for IdleStatus.WRITER_IDLE in seconds. |
void |
setWriteTimeout(int writeTimeout)
Sets write timeout in seconds. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected AbstractIoSessionConfig()
Method Detail |
---|
public final void setAll(IoSessionConfig config)
setAll
in interface IoSessionConfig
protected abstract void doSetAll(IoSessionConfig config)
public int getReadBufferSize()
getReadBufferSize
in interface IoSessionConfig
public void setReadBufferSize(int readBufferSize)
setReadBufferSize
in interface IoSessionConfig
public int getMinReadBufferSize()
getMinReadBufferSize
in interface IoSessionConfig
public void setMinReadBufferSize(int minReadBufferSize)
setMinReadBufferSize
in interface IoSessionConfig
public int getMaxReadBufferSize()
getMaxReadBufferSize
in interface IoSessionConfig
public void setMaxReadBufferSize(int maxReadBufferSize)
setMaxReadBufferSize
in interface IoSessionConfig
public int getIdleTime(IdleStatus status)
getIdleTime
in interface IoSessionConfig
public long getIdleTimeInMillis(IdleStatus status)
getIdleTimeInMillis
in interface IoSessionConfig
public void setIdleTime(IdleStatus status, int idleTime)
setIdleTime
in interface IoSessionConfig
public final int getBothIdleTime()
IdleStatus.BOTH_IDLE
in seconds.
getBothIdleTime
in interface IoSessionConfig
public final long getBothIdleTimeInMillis()
IdleStatus.BOTH_IDLE
in milliseconds.
getBothIdleTimeInMillis
in interface IoSessionConfig
public final int getReaderIdleTime()
IdleStatus.READER_IDLE
in seconds.
getReaderIdleTime
in interface IoSessionConfig
public final long getReaderIdleTimeInMillis()
IdleStatus.READER_IDLE
in milliseconds.
getReaderIdleTimeInMillis
in interface IoSessionConfig
public final int getWriterIdleTime()
IdleStatus.WRITER_IDLE
in seconds.
getWriterIdleTime
in interface IoSessionConfig
public final long getWriterIdleTimeInMillis()
IdleStatus.WRITER_IDLE
in milliseconds.
getWriterIdleTimeInMillis
in interface IoSessionConfig
public void setBothIdleTime(int idleTime)
IdleStatus.WRITER_IDLE
in seconds.
setBothIdleTime
in interface IoSessionConfig
public void setReaderIdleTime(int idleTime)
IdleStatus.READER_IDLE
in seconds.
setReaderIdleTime
in interface IoSessionConfig
public void setWriterIdleTime(int idleTime)
IdleStatus.WRITER_IDLE
in seconds.
setWriterIdleTime
in interface IoSessionConfig
public int getWriteTimeout()
getWriteTimeout
in interface IoSessionConfig
public long getWriteTimeoutInMillis()
getWriteTimeoutInMillis
in interface IoSessionConfig
public void setWriteTimeout(int writeTimeout)
setWriteTimeout
in interface IoSessionConfig
public boolean isUseReadOperation()
IoSession.read()
operation
is enabled. If enabled, all received messages are stored in an internal
BlockingQueue
so you can read received messages in more
convenient way for client applications. Enabling this option is not
useful to server applications and can cause unintended memory leak, and
therefore it's disabled by default.
isUseReadOperation
in interface IoSessionConfig
public void setUseReadOperation(boolean useReadOperation)
IoSession.read()
operation. If enabled, all
received messages are stored in an internal BlockingQueue
so you
can read received messages in more convenient way for client
applications. Enabling this option is not useful to server applications
and can cause unintended memory leak, and therefore it's disabled by
default.
setUseReadOperation
in interface IoSessionConfig
public int getThroughputCalculationInterval()
getThroughputCalculationInterval
in interface IoSessionConfig
public void setThroughputCalculationInterval(int throughputCalculationInterval)
setThroughputCalculationInterval
in interface IoSessionConfig
public long getThroughputCalculationIntervalInMillis()
getThroughputCalculationIntervalInMillis
in interface IoSessionConfig
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |