mdw.nbio
クラス SelectItem

java.lang.Object
  |
  +--mdw.nbio.SelectItem

public class SelectItem
extends java.lang.Object

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.


フィールドの概要
 short events
          The set of events that you are interested in receiving notification on.
 java.lang.Object obj
          A state object associated with this SelectItem.
 short revents
          The set of events that occurred.
 
コンストラクタの概要
SelectItem(Selectable sel, java.lang.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.
 
メソッドの概要
 short getEvents()
          Return the requested events mask.
 java.lang.Object getObj()
          Return the state pointer associated with this SelectItem.
 Selectable getSelectable()
          Return the Selectable associated with this SelectItem.
 short returnedEvents()
          Return the returned events mask.
 java.lang.String toString()
           
 
クラス java.lang.Object から継承したメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

フィールドの詳細

events

public short 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.

関連項目:
Selectable, SelectSet

revents

public short revents
The set of events that occurred. The event types are specified by the constants in Selectable.
関連項目:
Selectable

obj

public java.lang.Object obj
A state object associated with this SelectItem. You can use this for any purpose you like.
コンストラクタの詳細

SelectItem

public SelectItem(Selectable sel,
                  java.lang.Object obj,
                  short events)
Create a SelectItem with the given Selectable, given state pointer, and the given event mask.

SelectItem

public SelectItem(Selectable sel,
                  short events)
Create a SelectItem with the given Selectable and the given event mask.
メソッドの詳細

getSelectable

public Selectable getSelectable()
Return the Selectable associated with this SelectItem.

getObj

public java.lang.Object getObj()
Return the state pointer associated with this SelectItem.

getEvents

public short getEvents()
Return the requested events mask.

returnedEvents

public short returnedEvents()
Return the returned events mask.

toString

public java.lang.String toString()
オーバーライド:
クラス java.lang.Object 内の toString