Modifier and Type | Class and Description |
---|---|
private static class |
LinkManager.LinkCheck |
static class |
LinkManager.LinkEstablishmentException |
private static class |
LinkManager.LinkRequest |
private static class |
LinkManager.LinksToNodeHolder |
private static class |
LinkManager.ProfileMatchFailureException |
Modifier and Type | Field and Description |
---|---|
private static int |
ALT_CHECK_FOR_LINK |
private static int |
ALT_LINK_FAIL |
private static int |
ALT_LOST_LINK |
private static int |
ALT_REG_CHAN |
private static int |
ALT_REQ_LINK |
private Any2OneChannel |
checkForLink |
private Any2OneChannel |
getNodeIDChan |
private static LinkManager |
instance |
private Any2OneChannel |
linkFailureChan |
private java.util.Hashtable |
linkHolders
The active links.
|
private LoopbackLink |
loopbackLink
The LoopBackLink used for local connections.
|
private Any2OneChannel |
lostLinkChan |
private Any2OneConnection |
registerConn |
private Any2OneChannel |
registerEventChannel |
private Any2OneChannel |
requestLink |
Constructor and Description |
---|
LinkManager() |
Modifier and Type | Method and Description |
---|---|
(package private) static LinkManager |
getInstance()
Get the singleton instance of LinkManager.
|
private Link |
getLink(NodeID target,
Profile linkProfile)
Get a Link to a remote PC.
|
(package private) AltingChannelInput |
getLinkLostEventChannel() |
(package private) ChannelOutput |
getTxChannel(NodeAddressID targetAddress)
This is used to get a Link when no details are known about the other
Node except for one of its addresses.
|
(package private) ChannelOutput |
getTxChannel(NodeID target)
Get a channel to use to send to a remote PC.
|
(package private) ChannelOutput |
getTxChannel(NodeID target,
Profile linkProfile) |
(package private) boolean |
linkExists(NodeID otherNode)
This method tests whether a link exists to
a specified remote Node in this
LinkManager . |
(package private) int |
lostLink(Link conn)
Called by a Link to indicate the link broke.
|
(package private) void |
registerFailure(Link conn) |
(package private) boolean |
registerLink(Link conn)
Register a Link in the database.
|
void |
run()
Used to run the
LinkManager . |
void |
start()
Starts this instance of the
LinkManager and returns. |
private static LinkManager instance
private java.util.Hashtable linkHolders
private LoopbackLink loopbackLink
private final Any2OneConnection registerConn
private final Any2OneChannel requestLink
private final Any2OneChannel lostLinkChan
private final Any2OneChannel linkFailureChan
private final Any2OneChannel checkForLink
private final Any2OneChannel getNodeIDChan
private final Any2OneChannel registerEventChannel
private static final int ALT_LOST_LINK
private static final int ALT_LINK_FAIL
private static final int ALT_REG_CHAN
private static final int ALT_REQ_LINK
private static final int ALT_CHECK_FOR_LINK
public void start()
LinkManager
and returns.static LinkManager getInstance()
boolean registerLink(Link conn)
void registerFailure(Link conn)
ChannelOutput getTxChannel(NodeID target)
target
- The system to connect to.java.lang.IllegalStateException
- If init() has not been called.ChannelOutput getTxChannel(NodeID target, Profile linkProfile)
ChannelOutput getTxChannel(NodeAddressID targetAddress)
targetAddress
- The address to which to create a link.private Link getLink(NodeID target, Profile linkProfile)
target
- The system to connect to.java.lang.IllegalStateException
- If init() has not been called.int lostLink(Link conn)
conn
- The broken link.boolean linkExists(NodeID otherNode)
LinkManager
.otherNode
- The NodeID
of a remote Node to check
the existancetrue
iff a link currently exists to
the specified remote Node.AltingChannelInput getLinkLostEventChannel()