public class TrafficMask
extends java.lang.Object
IoSession
with IoSession.setTrafficMask(TrafficMask)
.限定符和类型 | 字段和说明 |
---|---|
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.
|
限定符和类型 | 方法和说明 |
---|---|
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. |
java.lang.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.
|
java.lang.String |
toString() |
TrafficMask |
xor(TrafficMask mask)
Peforms an XOR operation on this mask with the specified
mask and returns the result.
|
public static final TrafficMask NONE
public static final TrafficMask READ
public static final TrafficMask WRITE
public static final TrafficMask ALL
public static TrafficMask getInstance(int interestOps)
TrafficMask
instance from the
specified interestOps.SelectionKey
public java.lang.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 java.lang.String toString()
toString
在类中 java.lang.Object