net.larsan.urd.cmd
Class Connections

java.lang.Object
  |
  +--net.larsan.urd.cmd.Connections

public class Connections
extends java.lang.Object

Stack for incoming connections in the command line server. This stack uses a selector that acts as a semaphor when the stack is pushed.

Version:
Alpha-0.1 / 2002-10-06 21:37
Author:
Lars J. Nilsson
See Also:
CmdServer

Constructor Summary
Connections(java.nio.channels.Selector semaphor)
          The semaphor selector will be called with wakeup when there's a new connection in the list.
 
Method Summary
 java.nio.channels.SocketChannel pop()
          Pop a channel from the stack.
 void push(java.nio.channels.SocketChannel sch)
          Puch a new channel ontu the stack.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Connections

public Connections(java.nio.channels.Selector semaphor)
The semaphor selector will be called with wakeup when there's a new connection in the list.

Method Detail

push

public void push(java.nio.channels.SocketChannel sch)
Puch a new channel ontu the stack. This will call 'wakeup' on the selector.


pop

public java.nio.channels.SocketChannel pop()
Pop a channel from the stack. This returns null if the stack is empty.