public class NetBIOSSelectionKey extends Object
SelectionKey type class for NetBIOSSocket connections.
Modifier and Type | Field and Description |
---|---|
static int |
OP_ACCEPT |
static int |
OP_CONNECT |
static int |
OP_READ |
static int |
OP_WRITE |
Modifier | Constructor and Description |
---|---|
protected |
NetBIOSSelectionKey(NetBIOSSelector selector,
NetBIOSSocket socket,
int ops,
Object attachment)
Class constructor
|
Modifier and Type | Method and Description |
---|---|
void |
attach(Object obj)
Attach an object to this selection key
|
Object |
attachment()
Return the associated attached object
|
int |
hashcode()
Return a hash code for the selection key
|
int |
interestOps()
Return the list of operations that are enabled for this socket
|
void |
interestOps(int ops)
Set the list of interested operations for this socket
|
boolean |
isAcceptable()
Check if a new socket connection has been received by a listening socket
|
boolean |
isConnectable()
Check if the client side socket has connected
|
boolean |
isReadable()
Check if the socket is readable
|
boolean |
isValid()
Check if the socket is valid
|
boolean |
isWritable()
Check if the socket is writable
|
int |
readyOps()
Return the list of troggered operations for this socket
|
NetBIOSSelector |
selector()
Return the selector that this key belongs to
|
protected void |
setTriggers(int ops)
Set the triggerd ops for the socket
|
protected void |
setValid(boolean valid)
Set or clear the valid status for this socket
|
NetBIOSSocket |
socket()
Return the NetBIOS socket
|
String |
toString()
Return the selection key as a string
|
public static final int OP_ACCEPT
public static final int OP_CONNECT
public static final int OP_READ
public static final int OP_WRITE
protected NetBIOSSelectionKey(NetBIOSSelector selector, NetBIOSSocket socket, int ops, Object attachment)
selector
- NetBIOSSelectorsocket
- NetBIOSSocketops
- intattachment
- Objectpublic final void attach(Object obj)
obj
- Objectpublic final Object attachment()
public final boolean isAcceptable()
public final boolean isReadable()
public final boolean isWritable()
public final boolean isConnectable()
public final int interestOps()
public final void interestOps(int ops)
ops
- intpublic final int readyOps()
public final boolean isValid()
protected final void setTriggers(int ops)
ops
- intpublic final NetBIOSSelector selector()
protected final void setValid(boolean valid)
valid
- booleanpublic final NetBIOSSocket socket()
public int hashcode()
Copyright © 2005–2018 Alfresco Software. All rights reserved.