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.
Public Member Functions | |
SelectItem (Selectable sel, Object obj, short events) | |
Create a SelectItem with the given Selectable, given state pointer, and the given event mask. | |
SelectItem (Selectable sel, short events) | |
Create a SelectItem with the given Selectable and the given event mask. | |
Selectable | getSelectable () |
Return the Selectable associated with this SelectItem. | |
Object | getObj () |
Return the state pointer associated with this SelectItem. | |
short | getEvents () |
Return the requested events mask. | |
short | returnedEvents () |
Return the returned events mask. | |
String | toString () |
Public Attributes | |
short | events |
The set of events that you are interested in receiving notification on. | |
short | revents |
The set of events that occurred. | |
Object | obj |
A state object associated with this SelectItem. | |
Package Functions | |
NBIOFileDescriptor | getFD () |
Private Member Functions | |
void | updatefd () |
Private Attributes | |
Selectable | sel |
NBIOFileDescriptor | fd |
seda.nbio.SelectItem.SelectItem | ( | Selectable | sel, | |
Object | obj, | |||
short | events | |||
) |
Create a SelectItem with the given Selectable, given state pointer, and the given event mask.
seda.nbio.SelectItem.SelectItem | ( | Selectable | sel, | |
short | events | |||
) |
Create a SelectItem with the given Selectable and the given event mask.
short seda.nbio.SelectItem.getEvents | ( | ) |
Return the requested events mask.
NBIOFileDescriptor seda.nbio.SelectItem.getFD | ( | ) | [package] |
Object seda.nbio.SelectItem.getObj | ( | ) |
Return the state pointer associated with this SelectItem.
Selectable seda.nbio.SelectItem.getSelectable | ( | ) |
Return the Selectable associated with this SelectItem.
short seda.nbio.SelectItem.returnedEvents | ( | ) |
Return the returned events mask.
String seda.nbio.SelectItem.toString | ( | ) |
void seda.nbio.SelectItem.updatefd | ( | ) | [private] |
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.
NBIOFileDescriptor seda.nbio.SelectItem.fd [private] |
Object seda.nbio.SelectItem.obj |
A state object associated with this SelectItem.
You can use this for any purpose you like.
The set of events that occurred.
The event types are specified by the constants in Selectable.
Selectable seda.nbio.SelectItem.sel [private] |