public final class ChangeRequest
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
TYPE_OPS
This type concerns switching the interestOps of a key associated with a
particular socket.
|
static int |
TYPE_SESSION
This type concerns an
SSLSession that has been
invalidated. |
static int |
TYPE_TASK
This type concerns an
SSLEngine task that has just
finished running on the
TaskWorker thread. |
static int |
TYPE_TIMEOUT
This type concerns a timeout that has expired on the given socket.
|
Constructor and Description |
---|
ChangeRequest(SocketIF sc,
int type,
int interestOps)
A ChangeRequest defines a request for some operation that needs to be
executed on the selector thread.
|
Modifier and Type | Method and Description |
---|---|
SocketIF |
getChannel()
Get the SocketIF associated with this ChangeRequest
|
int |
getOps()
Get the interestOps associated with this ChangeRequest
|
int |
getType()
Get the type associated with this ChangeRequest
|
public static final int TYPE_TASK
SSLEngine
task that has just
finished running on the
TaskWorker
thread. This
type of task is used if and only if the
SecureSocket
is processing
tasks via the TaskWorker
thread (multi-threaded implementation).
public static final int TYPE_OPS
public static final int TYPE_TIMEOUT
public static final int TYPE_SESSION
SSLSession
that has been
invalidated. As such, we need to re-initiate handshaking.public ChangeRequest(SocketIF sc, int type, int interestOps)
sc
- The SocketIF associated with this ChangeRequesttype
- The type associated with this ChangeRequestinterestOps
- The interestOps (SelectionKey.interestOps) associated
with this ChangeRequest. If the type of this ChangeRequest is anything
other than TYPE_OPS, the interestOps can be set to anything safely.public SocketIF getChannel()
public int getType()
public int getOps()