Class semper.transfer.PortManager
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class semper.transfer.PortManager

java.lang.Object
   |
   +----semper.transfer.PortManager

public class PortManager
extends Object
The PortManager class provides the management of different ports for different entities. This class can not be instantiated, all methods are static. This is necessary because it handles with service points of the communication block. For each port only one ServicePointThread can be opened. For this reason it is not possible to start two processes using the same ports (e.g. two clients or client and server). If you like to start two ore more clients they have to be threads in one process.

Constructor Index

 o PortManager()

Method Index

 o getServicePoint(int)
Request for a service point on certain port.
 o isServicePoint(int)
Method to control if a port is yet in use by a ServicePointThread.
 o openServicePoint(int)
Opening a new Service Point.

Constructors

 o PortManager
  public PortManager()

Methods

 o isServicePoint
  protected static synchronized int isServicePoint(int port)
Method to control if a port is yet in use by a ServicePointThread. Returns ant int that is the index of this port in the __servicePoints Vector. If this port has no Thread the return value is -1.
 o openServicePoint
  public static synchronized void openServicePoint(int port) throws TransferServiceException
Opening a new Service Point. It has to be synchronized to guarantee corresponding indexes in the port and service point vectors.
 o getServicePoint
  public static synchronized ChannelServicePointThread getServicePoint(int port) throws TransferServiceException
Request for a service point on certain port. If not yet opened, a new thread is started.

All Packages  Class Hierarchy  This Package  Previous  Next  Index