Main Page | Packages | Class Hierarchy | Class List | File List | Class Members

seda.nbio.SelectItem Class Reference

List of all members.

Detailed Description

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.


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


Constructor & Destructor Documentation

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.


Member Function Documentation

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]
 


Member Data Documentation

short seda.nbio.SelectItem.events
 

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

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.

short seda.nbio.SelectItem.revents
 

The set of events that occurred.

The event types are specified by the constants in Selectable.

See also:
Selectable

Selectable seda.nbio.SelectItem.sel [private]
 


The documentation for this class was generated from the following file:
Generated on Fri Aug 13 10:57:53 2004 for libnbio2-java by doxygen 1.3.7