Package: com.multiversesocial.hyperview
Class: com.multiversesocial.hyperview.PortInfo
Source: src/com/multiversesocial/hyperview/PortInfo.java

PortInfo

HyperView V3.2 — class
version V3.2 class

Summary

This class saves/loads port configuration info from to the window's registry and somewhere else under unix

Source file: PortInfo.java

Hierarchy

Extends: none

Implements: PortConstants

Referenced HyperView classes

Media files used

Declaration & members

public class PortInfo implements PortConstants

Declared in src/com/multiversesocial/hyperview/PortInfo.java, lines 7–520. 10 field(s), 1 constructor(s), 21 method(s). Every member has an anchor you can link to (e.g. PortInfo.html#<id>).

Fields (10)

DeclarationValue / initializerDescriptionSource
int cntlFlagsFor asynch notificationline 15
volatile HyperView currentViewNo comment in source; name appears in 1 other source file(s): HyperView.line 9
static volatile boolean isLoaded= falseNo comment in source; name appears in 1 other source file(s): InterProcessMemory.line 10
static volatile boolean isSaved= trueNo comment in source; not referenced by name in this type’s methods.line 10
static volatile HyperLinkedList listenerList= new HyperLinkedList("portListenerList")No comment in source; assigned in addPortListener(); used in remPortListener(), notifyPortListeners(); name appears in 3 other source file(s): HyperProcess, InterProcessMemory, ObjectRegistry.line 17
static volatile int maximumPorts= MAX_PORTSJust to keep it simple ftm4line 11
static volatile HyperLinkedList portList= new HyperLinkedList("portNodeList")No comment in source; name appears in 3 other source file(s): HyperConnectionHandler, PortControlPane, SerialHandler.line 12
static volatile int totalPorts= 0No comment in source; name appears in 1 other source file(s): PortControlPane.line 16
int xNo comment in source; not referenced by name in this type’s methods.line 18
int yNo comment in source; not referenced by name in this type’s methods.line 19

Constructors (1)

SignatureDescriptionSource
PortInfo()1 statement(s); calls super().line 21

Methods (21)

SignatureDescriptionSource
static { … }Implicit default constructor generated by the compiler (not written in the source).implicit
public static int addPort(PortNode tPortNode)3 statement(s); calls tPortList.dlStore(), PortInfo.savePortList(), tPortList.notifyAll().line 256
public void addPortListener(PortListener tPortListener)3 statement(s); calls listenerList.dlStore(), listenerList.notifyAll(); creates HyperLinkedList.line 383
public static void close()5 statement(s); calls PortInfo.getPortList(), tPortNode.connectionHandler.stop(), tPortList.notifyAll().line 77
public static void close(HyperView tView)6 statement(s); calls PortInfo.getPortList(), tPortNode.connectionHandler.stop(), tPortList.notifyAll().line 107
public static int getPortFlags(int tIndex)3 statement(s); calls Integer.toHexString(), Integer.parseInt(); creates HyperPreferences.line 207
public static HyperLinkedList getPortList()12 statement(s); calls Integer.valueOf(), HyperView.getDefaultPort(), PortInfo.addPort(), Integer.parseInt(), tPortList.dlStore() …; creates HyperPreferences, PortNode.line 134
public static PortNode getPortNode(int tPortNumber)4 statement(s); calls tPortList.notifyAll(); creates PortNode.line 357
public static PortNode getPortNodeIndex(int tIndex)7 statement(s); calls PortInfo.getPortList().line 329
public static String getPortString()14 statement(s); calls PortInfo.getPortList(), stringBuilder.append(), stringBuilder.toString(); creates StringBuilder.line 479
static PortNode getViewDefaultPort(HyperView tView)Returns PortInfo.getPortNode(Integer.parseInt(tView.defaults.listenPort.value)).line 352
public static void main(String[] args)1 statement(s); calls PortInfo.getPortString().line 514
public static void notifyPortListeners(int tPortNumber, int tNewValue)3 statement(s); calls tListener.onPortChange(), any.printStackTrace(), listenerList.notifyAll().line 414
public static void open()4 statement(s); calls PortInfo.getPortList(), HyperConnectionHandler.startConnectionHandler(), tPortList.notifyAll().line 27
public static void open(HyperView tView)4 statement(s); calls PortInfo.getPortList(), HyperConnectionHandler.startConnectionHandler(), tPortList.notifyAll().line 50
public int removePort(PortNode tPortNode)6 statement(s); calls tPortList.dlDelete(), tPortList.notifyAll().line 284
public void remPortListener(PortListener tPortListener)2 statement(s); calls listenerList.dlDelete(), listenerList.notifyAll().line 400
public static int savePortFlags(int tIndex, PortNode tPortNodeReference)5 statement(s); calls Integer.toHexString(), tPortPreferences.put(); creates HyperPreferences.line 215
public static void savePortList()10 statement(s); calls tPortNumberPreference.put(), Integer.toString(), tPortPreferences.put(), Integer.toHexString(), tPortList.notifyAll(); creates HyperPreferences.line 224
public void setMaximumPorts(int tPortNumber)2 statement(s).line 320
public static PortNode updatePort(PortNode tPortUpdateNode)6 statement(s); calls PortInfo.getPortList(), tPortList.dlStore(), PortInfo.savePortList(), PortInfo.notifyPortListeners().line 440

Examples

Real usage taken from elsewhere in the HyperView 3.2 source (file and line shown; source path src/com/multiversesocial/hyperview/).

static call — ChannelControlPane.java, line 55

   55  currentPortNode = PortInfo.getPortNode(Integer.parseInt(tView.defaults.listenPort.value));

constant — PortControlPane.java, line 20

   20  final static String PORT_PREFIX = PortInfo.PORT_PREFIX;

static call — HyperConnectionHandler.java, line 1062

 1062  if((tPortList = (HyperLinkedList)PortInfo.getPortList())==null)
 1063  {
Hits--