| java.lang.Object seda.nbio.SelectItem
SelectItem | public class SelectItem (Code) | | A SelectItem represents a single socket/file descriptor/etc. which
can be handled by a SelectSet. Each SelectItem has an associated
Selectable as well as two event masks: 'events' and 'revents'.
Setting 'events' allows you to specify which events you are
interested in receiving notification on for this Selectable.
After calling SelectSet.select(), 'revents' will be set to the
set of events that occurred.
|
Field Summary | |
public short | events The set of events that you are interested in receiving notification on. | public Object | obj A state object associated with this SelectItem. | public short | revents The set of events that occurred. |
Constructor Summary | |
public | SelectItem(Selectable sel, Object obj, short events) Create a SelectItem with the given Selectable, given state pointer,
and the given event mask. | public | SelectItem(Selectable sel, short events) Create a SelectItem with the given Selectable and the given event
mask. |
events | public short events(Code) | | The set of events that you are interested in receiving notification on.
The event types are specified by the constants in Selectable.
Important: If you change the events field of a SelectItem
after registering it with a SelectSet (using SelectSet.add()),
you must invoke SelectSet.update() to push the new event mask to the
SelectSet.
See Also: Selectable See Also: SelectSet |
obj | public Object obj(Code) | | A state object associated with this SelectItem. You can use this
for any purpose you like.
|
revents | public short revents(Code) | | The set of events that occurred.
The event types are specified by the constants in Selectable.
See Also: Selectable |
SelectItem | public SelectItem(Selectable sel, Object obj, short events)(Code) | | Create a SelectItem with the given Selectable, given state pointer,
and the given event mask.
|
SelectItem | public SelectItem(Selectable sel, short events)(Code) | | Create a SelectItem with the given Selectable and the given event
mask.
|
getEvents | public short getEvents()(Code) | | Return the requested events mask.
|
getObj | public Object getObj()(Code) | | Return the state pointer associated with this SelectItem.
|
getSelectable | public Selectable getSelectable()(Code) | | Return the Selectable associated with this SelectItem.
|
returnedEvents | public short returnedEvents()(Code) | | Return the returned events mask.
|
|
|