Project JXTA

net.jxta.impl.endpoint.tcp
Class IncomingUnicastServer

java.lang.Object
  extended bynet.jxta.impl.endpoint.tcp.IncomingUnicastServer
All Implemented Interfaces:
Runnable

public class IncomingUnicastServer
extends Object
implements Runnable

This server handles incoming unicast TCP connections


Constructor Summary
IncomingUnicastServer(TcpTransport owner, InetAddress serverInterface, int preferedPort, int startPort, int endPort)
          Constructor for the TCP server
 
Method Summary
(package private)  int getEndPort()
          Get the end port range we are using
(package private)  InetSocketAddress getLocalSocketAddress()
          Get the address of the network interface being used.
(package private)  int getStartPort()
          Get the start port range we are using
 void run()
          Daemon where we wait for incoming connections.
 boolean start(ThreadGroup inGroup)
          Start this server.
 void stop()
          Stop this server.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IncomingUnicastServer

public IncomingUnicastServer(TcpTransport owner,
                             InetAddress serverInterface,
                             int preferedPort,
                             int startPort,
                             int endPort)
                      throws IOException,
                             SecurityException
Constructor for the TCP server

Parameters:
owner - the TCP transport we are working for
serverInterface - the network interface to use.
preferedPort - the port we will be listening on.
Method Detail

start

public boolean start(ThreadGroup inGroup)
Start this server.

Parameters:
inGroup - the thread group we should create our threads in.

stop

public void stop()
Stop this server.


getLocalSocketAddress

InetSocketAddress getLocalSocketAddress()
Get the address of the network interface being used.


getStartPort

int getStartPort()
Get the start port range we are using


getEndPort

int getEndPort()
Get the end port range we are using


run

public void run()
Daemon where we wait for incoming connections.

Specified by:
run in interface Runnable

JXTA J2SE