|
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.jppf.utils.ThreadSynchronization
org.jppf.server.nio.AbstractChannelWrapper<SelectionKey>
org.jppf.server.nio.SelectionKeyWrapper
public class SelectionKeyWrapper
Channel wrapper implementation for a SelectionKey.
| Field Summary |
|---|
| Fields inherited from class org.jppf.server.nio.AbstractChannelWrapper |
|---|
channel, id, selector |
| Fields inherited from class org.jppf.utils.ThreadSynchronization |
|---|
stopped |
| Constructor Summary | |
|---|---|
SelectionKeyWrapper(SelectionKey channel)
Initialize this channel wrapper with the specified channel. |
|
| Method Summary | |
|---|---|
void |
close()
Close the channel. |
NioContext |
getContext()
Get the AbstractNioContext attached to the channel. |
String |
getId()
Get a string uniquely identifying this channel. |
int |
getKeyOps()
Get the operations enabled for this channel. |
int |
getReadyOps()
Get the operations available for this channel. |
boolean |
isOpen()
Determine whether the channel is opened. |
void |
setKeyOps(int keyOps)
Get the operations enabled for this channel. |
String |
toString()
Generate a string that represents this channel wrapper. |
| Methods inherited from class org.jppf.server.nio.AbstractChannelWrapper |
|---|
equals, getChannel, getSelector, hashCode, isAcceptable, isConnectable, isReadable, isWritable, setSelector |
| Methods inherited from class org.jppf.utils.ThreadSynchronization |
|---|
goToSleep, goToSleep, goToSleep, isStopped, setStopped, wakeUp |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public SelectionKeyWrapper(SelectionKey channel)
channel - the channel to wrap.| Method Detail |
|---|
public NioContext getContext()
AbstractNioContext attached to the channel.
getContext in interface ChannelWrapper<SelectionKey>getContext in class AbstractChannelWrapper<SelectionKey>AbstractNioContext instance.AbstractChannelWrapper.getContext()
public void close()
throws Exception
close in interface ChannelWrapper<SelectionKey>close in class AbstractChannelWrapper<SelectionKey>Exception - if any error occurs while closing the channel.ChannelWrapper.close()public boolean isOpen()
isOpen in interface ChannelWrapper<SelectionKey>isOpen in class AbstractChannelWrapper<SelectionKey>public String toString()
toString in class AbstractChannelWrapper<SelectionKey>Object.toString()public String getId()
getId in class AbstractChannelWrapper<SelectionKey>public int getKeyOps()
getKeyOps in interface ChannelWrapper<SelectionKey>getKeyOps in class AbstractChannelWrapper<SelectionKey>AbstractChannelWrapper.getKeyOps()public void setKeyOps(int keyOps)
setKeyOps in interface ChannelWrapper<SelectionKey>setKeyOps in class AbstractChannelWrapper<SelectionKey>keyOps - the operations as an int value.AbstractChannelWrapper.setKeyOps(int)public int getReadyOps()
getReadyOps in interface ChannelWrapper<SelectionKey>getReadyOps in class AbstractChannelWrapper<SelectionKey>AbstractChannelWrapper.getReadyOps()
|
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||