|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.mina.core.session.TrafficMask
public class TrafficMask
A type-safe mask that is used to control the traffic of IoSession
with IoSession.setTrafficMask(TrafficMask)
.
Field Summary | |
---|---|
static TrafficMask |
ALL
This mask resumes both reads and writes if any of them were suspended. |
static TrafficMask |
NONE
This mask suspends both reads and writes. |
static TrafficMask |
READ
This mask suspends writes, and resumes reads if reads were suspended. |
static TrafficMask |
WRITE
This mask suspends reads, and resumes writes if writes were suspended. |
Method Summary | |
---|---|
TrafficMask |
and(TrafficMask mask)
Peforms an AND operation on this mask with the specified mask and returns the result. |
static TrafficMask |
getInstance(int interestOps)
Returns an appropriate TrafficMask instance from the
specified interestOps. |
int |
getInterestOps()
Returns an interestOps of SelectionKey for this mask. |
String |
getName()
Returns the name of this mask. |
boolean |
isReadable()
Returns true if this mask allows a read operation. |
boolean |
isWritable()
Returns true if this mask allows a write operation. |
TrafficMask |
not()
Returns a negated mask of this one. |
TrafficMask |
or(TrafficMask mask)
Peforms an OR operation on this mask with the specified mask and returns the result. |
String |
toString()
|
TrafficMask |
xor(TrafficMask mask)
Peforms an XOR operation on this mask with the specified mask and returns the result. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final TrafficMask NONE
public static final TrafficMask READ
public static final TrafficMask WRITE
public static final TrafficMask ALL
Method Detail |
---|
public static TrafficMask getInstance(int interestOps)
TrafficMask
instance from the
specified interestOps.
SelectionKey
public String getName()
public boolean isReadable()
public boolean isWritable()
public int getInterestOps()
SelectionKey
for this mask.
public TrafficMask and(TrafficMask mask)
public TrafficMask or(TrafficMask mask)
public TrafficMask not()
public TrafficMask xor(TrafficMask mask)
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |