|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.comm.PortmapEntry
These are the port map entries for thePortmapDatabase
. Lines from the portmap.properties file are passed to the constructor to be parsed. The resulting object represents the parsed state of the logical names and their corresponding attributes. Methods are provided to access the portmap entries attributes.During parsng the
PortmapDatabase
may be accessed, depending on the references being made.All references (such as ALNs) are resolved during the parsing of the portmap.properties This includes references to Sun Rays and Sun Ray dongle paths. Sun Ray 'DTU aliases' must be defined (mapping a DTU name to a DTU's terminal ID) before any other references to the DTU can be made in portmap.properties When a DTU alias is assigned, this class checks that the DTU is online, or will log an error (if -Ddebug_portmap was specified on the command line), and throw an exception.
Automatic name references are resolved to full paths to dongle ports during parsing as well. Any ALNs that cannot be resolved result in an error message and an exception thrown as well. This can happen, for example, if a reference is made to a dongle that doesn't exist or a dongle that doesn't have as many ports as the reference requires.
Exceptions are assumed simply to mean that the entry will not be placed in the database and that portmap.properties will continue to be parsed.
Field Summary | |
private Alias |
alnAlias
|
private java.lang.String |
alnPath
|
private int |
alnPortType
|
private boolean |
assignedToDTU
|
private boolean |
dtuAlias
|
private java.lang.String |
dtuName
|
private boolean |
dtuSpecificALN
|
private java.lang.String |
equatedName
|
private boolean |
globallyVisible
|
private boolean |
hidingAlias
|
private java.lang.String |
logicalName
|
private boolean |
sessionIndependent
|
private boolean |
sessionLocalALN
|
private java.lang.String |
terminalId
|
Constructor Summary | |
(package private) |
PortmapEntry(java.lang.String line)
Construct a new PortmapEntry from a port map property string |
(package private) |
PortmapEntry(java.lang.String logicalName,
java.lang.String equatedName)
This constructor creates an PortmapEntry of type 'alias' |
Method Summary | |
private static java.lang.String |
formatTerminalId(java.lang.String rawTermId)
Takes a raw terminal ID, which can be a valid MAC address, or a valid Sun Ray terminal ID. |
Alias |
getALNalias()
Get the alias representing the equated name of this ALN. |
java.lang.String |
getALNpath()
Get physical path represented by this ALN |
int |
getALNportType()
Get the type of port this ALN maps to. |
private java.lang.String |
getDonglePortPath(Alias alnAlias,
int type,
java.lang.String termId)
Look up path for the specified ALN alias |
java.lang.String |
getDTUname()
Get DTU name associated with this port mapping entry. |
java.lang.String |
getDTUterminalId()
Get DTU terminal id portion of this port mapping entry |
java.lang.String |
getEquatedTarget()
Get equated name portion of this port mapping entry |
java.lang.String |
getLogicalName()
Get logical name portion of this port mapping entry |
boolean |
isAssignedToDTU()
Indicates whether this port map entry is DTU Specific. |
boolean |
isDTUalias()
Indicates whether this port map entry is a DTU Alias |
boolean |
isDTUspecificALN()
Return true if this PortmapEntry is an Automatic Logical Name that refers to a specific Sun Ray Desktop Unit. |
boolean |
isGloballyVisible()
Return true if this PortmapEntry is a Globally Visible server port. |
boolean |
isHidden()
Indicates whether this port map entry is a "hiding alias" which is used to make the corresponding port disappear from the CommPortIdentifier list. |
boolean |
isSessionIndependent()
Indicates whether this port map entry is a session Independent Assignment |
boolean |
isSessionLocalALN()
Return true if this PortmapEntry is an Automatic Logical Name that refers to the DTU the local session is running on. |
private static boolean |
isTerminalId(java.lang.String hypothetical)
Determines if argument is a valid Sun Ray terminal ID based on its format. |
Alias |
toAlias()
Convert this port map entry to an Alias based on the logical name given during construction. |
java.lang.String |
toString()
Displays objects of this Class in a more legible formatted representation. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
private java.lang.String logicalName
private java.lang.String equatedName
private java.lang.String terminalId
private java.lang.String dtuName
private Alias alnAlias
private java.lang.String alnPath
private int alnPortType
private boolean dtuAlias
private boolean assignedToDTU
private boolean dtuSpecificALN
private boolean sessionLocalALN
private boolean sessionIndependent
private boolean hidingAlias
private boolean globallyVisible
Constructor Detail |
PortmapEntry(java.lang.String line) throws java.io.IOException
line
- A non-blank, non-comment line of the format defined
for portmap.properties.PortmapEntry(java.lang.String logicalName, java.lang.String equatedName)
logicalName
- Alias nameequatedName
- target nameMethod Detail |
private java.lang.String getDonglePortPath(Alias alnAlias, int type, java.lang.String termId) throws java.io.IOException
alnAlias
- alias of ALNtype
- type of port (serial or parallel)termId
- the terminal ID for which the ALN is targetted
(null if session local).
IOException.
java.io.IOException
public Alias toAlias()
Alias
object associated with logical name.public java.lang.String getLogicalName()
loadPortmapFile
public java.lang.String getEquatedTarget()
loadPortmapFile
public java.lang.String getDTUterminalId()
loadPortmapFile
public java.lang.String getDTUname()
loadPortmapFile
public Alias getALNalias()
Alias
representing ALN, or null if not an ALNpublic int getALNportType()
CommPortIdentifier
port type this ALN represents.public java.lang.String getALNpath()
private static boolean isTerminalId(java.lang.String hypothetical)
hypothetical
- String Argument to check for validity.
public boolean isDTUalias()
loadPortmapFile
public boolean isAssignedToDTU()
loadPortmapFile
public boolean isSessionIndependent()
loadPortmapFile
public boolean isHidden()
loadPortmapFile
public boolean isSessionLocalALN()
loadPortmapFile
public boolean isGloballyVisible()
loadPortmapFile
public boolean isDTUspecificALN()
loadPortmapFile
private static java.lang.String formatTerminalId(java.lang.String rawTermId)
And returns it as a properly formatted Sun Ray terminal ID of form IEEE802.xxxxxxxxxxxx
- xx:xx:xx:xx:xx:xx
- IEE802.xxxxxxxxxxxx
rawTermId
- String The value to validate and format.
public java.lang.String toString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |