Crossfire JXClient, Trunk
Public Member Functions | Package Functions | Private Member Functions | Private Attributes | List of all members
DispatcherN Class Reference
Inheritance diagram for DispatcherN:
Inheritance graph
Collaboration diagram for DispatcherN:
Collaboration graph

Public Member Functions

void register (SelectableChannel ch, int ops, Handler h) throws IOException
 
void run ()
 

Package Functions

 DispatcherN () throws IOException
 

Private Member Functions

void dispatch () throws IOException
 

Private Attributes

Object gate = new Object()
 
Selector sel
 

Detailed Description

A Multi-threaded dispatcher.

In this example, one thread does accepts, and the second does read/writes.

Author
Mark Reinhold
Brad R. Wetmore

Definition at line 54 of file DispatcherN.java.

Constructor & Destructor Documentation

◆ DispatcherN()

DispatcherN.DispatcherN ( ) throws IOException
package

Definition at line 58 of file DispatcherN.java.

References sel.

Member Function Documentation

◆ dispatch()

void DispatcherN.dispatch ( ) throws IOException
private

Definition at line 74 of file DispatcherN.java.

References gate, Handler.handle(), and sel.

Referenced by run().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ register()

void DispatcherN.register ( SelectableChannel  ch,
int  ops,
Handler  h 
) throws IOException

Implements Dispatcher.

Definition at line 85 of file DispatcherN.java.

References gate, and sel.

◆ run()

void DispatcherN.run ( )

Definition at line 62 of file DispatcherN.java.

References dispatch().

Here is the call graph for this function:

Member Data Documentation

◆ gate

Object DispatcherN.gate = new Object()
private

Definition at line 72 of file DispatcherN.java.

Referenced by dispatch(), and register().

◆ sel

Selector DispatcherN.sel
private

Definition at line 56 of file DispatcherN.java.

Referenced by dispatch(), DispatcherN(), and register().


The documentation for this class was generated from the following file: