|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.ka2ddo.yaac.io.PortManager
public class PortManager
This class manages the PortConnectors opened by YAAC.
Constructor Summary | |
---|---|
protected |
PortManager()
|
Method Summary | |
---|---|
static void |
addPortMgmtListener(PortMgmtListener l)
Register a listener to be informed when PortConnectors are created or deleted. |
static void |
addPortStatusListener(PortStatusListener l)
Register a listener to be informed when PortConnectors are opened or closed. |
static void |
firePortClosed(PortConnector p)
Service method for PortConnectors to call when they are closed, so PortStatusListeners can be notified of the status change. |
static void |
firePortCreated(PortConnector p)
Service method for PortConnectors to call when they are added to the operational configuration, so PortMgmtListeners can be notified of the status change. |
static void |
firePortDeleted(PortConnector p)
Service method for PortConnectors to call when they are removed from the operational configuration, so PortMgmtListeners can be notified of the status change. |
static void |
firePortOpened(PortConnector p)
Service method for PortConnectors to call when they are opened, so PortStatusListeners can be notified of the status change. |
static java.lang.String |
getCallsign()
Get the "best" callsign for this station, based on the callsigns associated with the open ports. |
static PortConnector |
getConnector(PortConfig portConfig)
Return the PortConnector associated with a specific PortConfig. |
static int |
getNextAvailablePortNumber()
Find the next port number that is not currently in use. |
static java.util.ArrayList<PortConnector> |
getPortList()
Get all the currently defined PortConnectors, whether or not they are open. |
static PortConnector |
getPreferredConnector(int capMask)
Get the first PortConnector defined in the location station which has the requested capability. |
static void |
removePortMgmtListener(PortMgmtListener l)
Unregister a PortMgmtListener; it will no longer be informed when ports are created or deleted. |
static void |
removePortStatusListener(PortStatusListener l)
Unregister a PortStatusListener; it will no longer be informed when ports are opened or closed. |
static void |
setSuggestedLocalCallsign(java.lang.String suggestedLocalCallsign)
Set the suggested callsign for the ports. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected PortManager()
Method Detail |
---|
public static java.util.ArrayList<PortConnector> getPortList()
public static PortConnector getPreferredConnector(int capMask)
capMask
- int bitmask of capabilities to test for
Connector.CAP_FULL_DUPLEX
,
Connector.CAP_GPS_DATA
,
Connector.CAP_IGATE
,
Connector.CAP_OPENTRAC
,
Connector.CAP_RCV_PACKET_DATA
,
Connector.CAP_RF
,
Connector.CAP_WAYPOINT_SENDER
,
Connector.CAP_WEATHER
,
Connector.CAP_XMT_PACKET_DATA
public static PortConnector getConnector(PortConfig portConfig)
portConfig
- PortConfig of PortConnector to be located
public static int getNextAvailablePortNumber()
public static void addPortStatusListener(PortStatusListener l)
l
- PortStatusListener instance to registerpublic static void removePortStatusListener(PortStatusListener l)
l
- PortStatusListener to unregisterpublic static void firePortOpened(PortConnector p)
p
- PortConnector which has been openedPortConnector.configure(org.ka2ddo.yaac.io.PortConfig)
public static void firePortClosed(PortConnector p)
p
- PortConnector which has been closedPortConnector.configure(org.ka2ddo.yaac.io.PortConfig)
,
Connector.close()
public static void addPortMgmtListener(PortMgmtListener l)
l
- PortMgmtListener instance to registerpublic static void removePortMgmtListener(PortMgmtListener l)
l
- PortMgmtListener to unregisterpublic static void firePortCreated(PortConnector p)
p
- PortConnector which has been addedPortConnector.configure(org.ka2ddo.yaac.io.PortConfig)
,
Connector.close()
public static void firePortDeleted(PortConnector p)
p
- PortConnector which has been removedPortConnector.configure(org.ka2ddo.yaac.io.PortConfig)
,
Connector.close()
public static void setSuggestedLocalCallsign(java.lang.String suggestedLocalCallsign)
suggestedLocalCallsign
- suggested port callsignpublic static java.lang.String getCallsign()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |