org.iids.aos.kernel.mux
Class ListenPortTable

java.lang.Object
  extended by org.iids.aos.kernel.mux.ListenPortTable

public class ListenPortTable
extends java.lang.Object

The object that manages a multiplexers listen ports. The port number is allocated using a LocalDescriptorTable. Thread safe.

Author:
Patrick Verkaik

Constructor Summary
ListenPortTable(LocalDescriptorTable ldt)
           
 
Method Summary
 ListenPort[] clear()
          Removes and returns all ListenPorts in the table.
 java.lang.Integer[] copyKeys()
           
 ListenPort create(int portNumber, int backlog, java.lang.String[] secSuites)
          Creates a new listen port with the specified listen port number.
 ListenPort create(int backlog, java.lang.String[] secSuites)
          Creates a new listen port, and allocates an available port number from the top of the number range.
 java.lang.String[] getSecSuitesUnion(java.lang.String[] secSuites)
          Return the union of the allowed security suites of all the listening ports
 ListenPort lookup(int portNumber)
          Looks up an existing listen port.
 ListenPort remove(int portNumber)
          Removes a listen port from the table, and deallocates the port number.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ListenPortTable

public ListenPortTable(LocalDescriptorTable ldt)
Method Detail

lookup

public ListenPort lookup(int portNumber)
Looks up an existing listen port.

Parameters:
portNumber - the port number
Returns:
the listen port, or null if not found

create

public ListenPort create(int portNumber,
                         int backlog,
                         java.lang.String[] secSuites)
                  throws BadArgumentException
Creates a new listen port with the specified listen port number.

Parameters:
portNumber - a positive port number
backlog - maximum number of pending connections allowed, 0 to leave unspecified
secSuites - a series of cipher suites acceptable to the caller, or null or empty to leave unspecified
Returns:
the listen port created
Throws:
IOException - if the port number is already in use
BadArgumentException

create

public ListenPort create(int backlog,
                         java.lang.String[] secSuites)
                  throws LimitExceededException
Creates a new listen port, and allocates an available port number from the top of the number range.

Parameters:
backlog - maximum number of pending connections allowed, 0 to leave unspecified
secSuites - a series of cipher suites acceptable to the caller, or null or empty to leave unspecified
Returns:
the listen port created
Throws:
LimitExceededException

remove

public ListenPort remove(int portNumber)
Removes a listen port from the table, and deallocates the port number.

Returns:
the removed listen port, or null if not found

clear

public ListenPort[] clear()
Removes and returns all ListenPorts in the table.


getSecSuitesUnion

public java.lang.String[] getSecSuitesUnion(java.lang.String[] secSuites)
Return the union of the allowed security suites of all the listening ports

Parameters:
secSuites - the set of security suites for the new port

copyKeys

public java.lang.Integer[] copyKeys()


Copyright © 2003, 2004 IIDS Group. All Rights Reserved.