org.newsclub.net.unix.rmi
Interface PortAssigner

All Superinterfaces:
java.rmi.Remote

public interface PortAssigner
extends java.rmi.Remote

The PortAssigner assigns and keeps track of anonymous ports. This feature is to be used by AFUNIXRMISocketFactory only.

Author:
Christian Kohlsch??tter

Method Summary
 int newPort()
          Registers a new anonymous port and returns it.
 void returnPort(int port)
          Returns a previously registered port.
 

Method Detail

newPort

int newPort()
            throws java.io.IOException
Registers a new anonymous port and returns it. When the port is not required anymore, it must be returned via returnPort(int).

Returns:
Throws:
java.io.IOException

returnPort

void returnPort(int port)
                throws java.io.IOException
Returns a previously registered port. No error is thrown if the given port has not been assigned before.

Parameters:
port -
Throws:
java.io.IOException