org.apache.mina.common
Class TrafficMask
java.lang.Object
org.apache.mina.common.TrafficMask
public class TrafficMask
extends java.lang.Object
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.
|
ALL
public static final TrafficMask ALL
This mask resumes both reads and writes if any of them were suspended.
NONE
public static final TrafficMask NONE
This mask suspends both reads and writes.
READ
public static final TrafficMask READ
This mask suspends writes, and resumes reads if reads were suspended.
WRITE
public static final TrafficMask WRITE
This mask suspends reads, and resumes writes if writes were suspended.
and
public TrafficMask and(TrafficMask mask)
Peforms an AND operation on this mask with the specified
mask and returns the result.
getInstance
public static TrafficMask getInstance(int interestOps)
Returns an appropriate
TrafficMask
instance from the
specified
interestOps.
getInterestOps
public int getInterestOps()
Returns an interestOps of SelectionKey
for this mask.
getName
public String getName()
Returns the name of this mask.
isReadable
public boolean isReadable()
Returns true if this mask allows a read operation.
isWritable
public boolean isWritable()
Returns true if this mask allows a write operation.
not
public TrafficMask not()
Returns a negated mask of this one.
or
public TrafficMask or(TrafficMask mask)
Peforms an OR operation on this mask with the specified
mask and returns the result.
toString
public String toString()
xor
public TrafficMask xor(TrafficMask mask)
Peforms an XOR operation on this mask with the specified
mask and returns the result.