HyperView2.959 bannerDocumentation
 
PortInfo.class

The PortInfo loads and stores TCP/IP Port definitions with basic information such as
if to start a server running at creation time.  The exact port information is stored in the
underlying Operating System Registry via the java Preferences API
The exact definitions are contained in the interface PortConstants.class

The PortInfo is always started by calling one of its various static open() methods
When done call the static method PortInfo.close()


public static void open(HyperConnectionHandler tHyperConnectionHandler)
Current work In progress (T)

public static void open()
Opens the PortInfo and loads its definitions from the OS registry.


public static void close()
Closes the
PortInfo and save its definitions to the OS registry.
public static HyperLinkedList getPortList()
Return the current list of PortNodes. Not to access list in a thread safe manner
you MUST get the list's Thread Monitor. ie: synchronize on the list.


public static int getPortFlags(int tPortNumber)
loads the port #tPortNumber flag bits from the OS registry.
The port flag bits are defined in the PortConstants.class interface.


public static int savePortFlags(int tPortNumber,PortNode tPortNodeReference)
Save the flag bits of 
tPortNodeReference to the OS registry for port number tPortNumber


public static void savePortList()
Save the entire port List to the OS registry


public static int addPort(PortNode tPortNode)
Add tPortNode to the port list.


public int removePort(PortNode tPortNode)
Remove tPortNode from the port list


public void setMaximumPorts(int tPortNumber)
Just in case 256 ports just isn't enough :O


static PortNode getViewDefaultPort(HyperView tView)
Return a PortNode that contains the HyperView.class default port.


public static PortNode getPortNode(int tPortNumber)
Return a portNode for port # tPortNumber


public void addPortListener(PortListener tPortListener)
Add PortListener tPortListener to the PortInfo listener list.



public void remPortListener(PortListener tPortListener)
Remove PortListener tPortListener from the PortInfo listener list.


public static PortNode updatePort(PortNode tPortUpdateNode)
Save the PortNode tPortUpdateNode to the OS registry



public static String getPortString();
Get a String containing all current ports & info.