|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.mina.common.BaseSession
public abstract class BaseSession
Base implementation of Session
.
Constructor Summary | |
---|---|
protected |
BaseSession()
|
Method Summary | |
---|---|
void |
close()
Closes this session immediately. |
Object |
getAttachment()
Returns an attachment of this session. |
Object |
getAttribute(String key)
Returns the value of user-defined attribute of this session. |
Set |
getAttributeKeys()
Returns the set of keys of all user-defined attributes. |
long |
getLastIoTime()
Returns the time in millis when I/O occurred lastly. |
long |
getLastReadTime()
Returns the time in millis when read operation occurred lastly. |
long |
getLastWriteTime()
Returns the time in millis when write operation occurred lastly. |
long |
getReadBytes()
Returns the total number of bytes which were read from this session. |
long |
getWrittenBytes()
Returns the total number of bytes which were written to this session. |
long |
getWrittenWriteRequests()
Returns the total number of write requests which were written to this session. |
void |
increaseReadBytes(int increment)
|
void |
increaseWrittenBytes(int increment)
|
void |
increaseWrittenWriteRequests()
|
boolean |
isIdle(IdleStatus status)
Returns true if this session is idle for the specified
IdleStatus . |
Object |
removeAttribute(String key)
Removes a user-defined attribute with the specified key. |
Object |
setAttachment(Object attachment)
Sets an attachment of this session. |
Object |
setAttribute(String key,
Object value)
Sets a user-defined attribute. |
void |
setIdle(IdleStatus status,
boolean value)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.mina.common.Session |
---|
close, getConfig, getLocalAddress, getRemoteAddress, getScheduledWriteRequests, getTransportType, isConnected |
Constructor Detail |
---|
protected BaseSession()
Method Detail |
---|
public void close()
Session
close
in interface Session
public Object getAttachment()
Session
getAttachment
in interface Session
public Object setAttachment(Object attachment)
Session
setAttachment
in interface Session
public Object getAttribute(String key)
Session
getAttribute
in interface Session
key
- the key of the attribute
public Object setAttribute(String key, Object value)
Session
setAttribute
in interface Session
key
- the key of the attributevalue
- the value of the attribute
public Object removeAttribute(String key)
Session
removeAttribute
in interface Session
public Set getAttributeKeys()
Session
getAttributeKeys
in interface Session
public long getReadBytes()
Session
getReadBytes
in interface Session
public long getWrittenBytes()
Session
getWrittenBytes
in interface Session
public long getWrittenWriteRequests()
Session
getWrittenWriteRequests
in interface Session
public void increaseReadBytes(int increment)
public void increaseWrittenBytes(int increment)
public void increaseWrittenWriteRequests()
public long getLastIoTime()
Session
getLastIoTime
in interface Session
public long getLastReadTime()
Session
getLastReadTime
in interface Session
public long getLastWriteTime()
Session
getLastWriteTime
in interface Session
public boolean isIdle(IdleStatus status)
Session
true
if this session is idle for the specified
IdleStatus
.
isIdle
in interface Session
public void setIdle(IdleStatus status, boolean value)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |