com.aelitis.azureus.core.networkmanager.impl.tcp
Class VirtualNonBlockingServerChannelSelector

java.lang.Object
  extended by com.aelitis.azureus.core.networkmanager.impl.tcp.VirtualNonBlockingServerChannelSelector
All Implemented Interfaces:
VirtualServerChannelSelector

public class VirtualNonBlockingServerChannelSelector
extends Object
implements VirtualServerChannelSelector

Virtual server socket channel for listening and accepting incoming connections.


Nested Class Summary
 
Nested classes/interfaces inherited from interface com.aelitis.azureus.core.networkmanager.VirtualServerChannelSelector
VirtualServerChannelSelector.SelectListener
 
Field Summary
protected  AEMonitor this_mon
           
 
Constructor Summary
VirtualNonBlockingServerChannelSelector(InetAddress _bind_address, int _start_port, int _num_ports, int _so_rcvbuf_size, VirtualServerChannelSelector.SelectListener _listener)
           
VirtualNonBlockingServerChannelSelector(InetSocketAddress bind_address, int so_rcvbuf_size, VirtualServerChannelSelector.SelectListener listener)
          Create a new server listening on the given address and reporting to the given listener.
 
Method Summary
 InetAddress getBoundToAddress()
           
 int getPort()
           
 long getTimeOfLastAccept()
           
 boolean isRunning()
          Is this selector actively running
 void start()
          Start the server and begin accepting incoming connections.
 void stop()
          Stop the server.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

this_mon

protected AEMonitor this_mon
Constructor Detail

VirtualNonBlockingServerChannelSelector

public VirtualNonBlockingServerChannelSelector(InetSocketAddress bind_address,
                                               int so_rcvbuf_size,
                                               VirtualServerChannelSelector.SelectListener listener)
Create a new server listening on the given address and reporting to the given listener.

Parameters:
bind_address - ip+port to listen on
so_rcvbuf_size - new socket receive buffer size
listener - to notify of incoming connections

VirtualNonBlockingServerChannelSelector

public VirtualNonBlockingServerChannelSelector(InetAddress _bind_address,
                                               int _start_port,
                                               int _num_ports,
                                               int _so_rcvbuf_size,
                                               VirtualServerChannelSelector.SelectListener _listener)
Method Detail

start

public void start()
Start the server and begin accepting incoming connections.

Specified by:
start in interface VirtualServerChannelSelector

stop

public void stop()
Stop the server.

Specified by:
stop in interface VirtualServerChannelSelector

isRunning

public boolean isRunning()
Is this selector actively running

Specified by:
isRunning in interface VirtualServerChannelSelector
Returns:
true if enabled, false if not running

getBoundToAddress

public InetAddress getBoundToAddress()
Specified by:
getBoundToAddress in interface VirtualServerChannelSelector

getPort

public int getPort()
Specified by:
getPort in interface VirtualServerChannelSelector

getTimeOfLastAccept

public long getTimeOfLastAccept()
Specified by:
getTimeOfLastAccept in interface VirtualServerChannelSelector