public abstract class AbstractIoSessionConfig extends java.lang.Object implements IoSessionConfig
IoSessionConfig
.Modifier | Constructor and Description |
---|---|
protected |
AbstractIoSessionConfig() |
Modifier and Type | Method and Description |
---|---|
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.
|
public final void setAll(IoSessionConfig config)
IoSessionConfig
setAll
in interface IoSessionConfig
protected abstract void doSetAll(IoSessionConfig config)
public int getReadBufferSize()
IoSessionConfig
getReadBufferSize
in interface IoSessionConfig
public void setReadBufferSize(int readBufferSize)
IoSessionConfig
setReadBufferSize
in interface IoSessionConfig
public int getMinReadBufferSize()
IoSessionConfig
getMinReadBufferSize
in interface IoSessionConfig
public void setMinReadBufferSize(int minReadBufferSize)
IoSessionConfig
setMinReadBufferSize
in interface IoSessionConfig
public int getMaxReadBufferSize()
IoSessionConfig
getMaxReadBufferSize
in interface IoSessionConfig
public void setMaxReadBufferSize(int maxReadBufferSize)
IoSessionConfig
setMaxReadBufferSize
in interface IoSessionConfig
public int getIdleTime(IdleStatus status)
IoSessionConfig
getIdleTime
in interface IoSessionConfig
public long getIdleTimeInMillis(IdleStatus status)
IoSessionConfig
getIdleTimeInMillis
in interface IoSessionConfig
public void setIdleTime(IdleStatus status, int idleTime)
IoSessionConfig
setIdleTime
in interface IoSessionConfig
public final int getBothIdleTime()
IoSessionConfig
IdleStatus.BOTH_IDLE
in seconds.getBothIdleTime
in interface IoSessionConfig
public final long getBothIdleTimeInMillis()
IoSessionConfig
IdleStatus.BOTH_IDLE
in milliseconds.getBothIdleTimeInMillis
in interface IoSessionConfig
public final int getReaderIdleTime()
IoSessionConfig
IdleStatus.READER_IDLE
in seconds.getReaderIdleTime
in interface IoSessionConfig
public final long getReaderIdleTimeInMillis()
IoSessionConfig
IdleStatus.READER_IDLE
in milliseconds.getReaderIdleTimeInMillis
in interface IoSessionConfig
public final int getWriterIdleTime()
IoSessionConfig
IdleStatus.WRITER_IDLE
in seconds.getWriterIdleTime
in interface IoSessionConfig
public final long getWriterIdleTimeInMillis()
IoSessionConfig
IdleStatus.WRITER_IDLE
in milliseconds.getWriterIdleTimeInMillis
in interface IoSessionConfig
public void setBothIdleTime(int idleTime)
IoSessionConfig
IdleStatus.WRITER_IDLE
in seconds.setBothIdleTime
in interface IoSessionConfig
public void setReaderIdleTime(int idleTime)
IoSessionConfig
IdleStatus.READER_IDLE
in seconds.setReaderIdleTime
in interface IoSessionConfig
public void setWriterIdleTime(int idleTime)
IoSessionConfig
IdleStatus.WRITER_IDLE
in seconds.setWriterIdleTime
in interface IoSessionConfig
public int getWriteTimeout()
IoSessionConfig
getWriteTimeout
in interface IoSessionConfig
public long getWriteTimeoutInMillis()
IoSessionConfig
getWriteTimeoutInMillis
in interface IoSessionConfig
public void setWriteTimeout(int writeTimeout)
IoSessionConfig
setWriteTimeout
in interface IoSessionConfig
public boolean isUseReadOperation()
IoSessionConfig
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)
IoSessionConfig
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()
IoSessionConfig
getThroughputCalculationInterval
in interface IoSessionConfig
public void setThroughputCalculationInterval(int throughputCalculationInterval)
IoSessionConfig
setThroughputCalculationInterval
in interface IoSessionConfig
public long getThroughputCalculationIntervalInMillis()
IoSessionConfig
getThroughputCalculationIntervalInMillis
in interface IoSessionConfig
Copyright © 2004-2019 Apache MINA Project. All Rights Reserved.