public class LocalHost extends SerialHandles
It can be one or several local nodes hosted on local host. For most applications one should be enough but sometimes several can be useful as well.
Local host contains
Modifier and Type | Field and Description |
---|---|
protected java.util.Map<java.util.UUID,LocalNode> |
localNodes
Local nodes known to the provider
|
protected java.util.Map<java.util.UUID,RemoteHost> |
remoteHosts
Hosts known to the provider
|
protected java.util.HashMap<java.util.UUID,RemoteNode> |
remoteNodes
Registry of remote nodes known to the provider
|
id
Constructor and Description |
---|
LocalHost() |
Modifier and Type | Method and Description |
---|---|
void |
connect(LocalNode node)
Connect local node to the provider
|
void |
connectRemoteNode(java.util.UUID nodeId,
SerialContext host,
Actor mainActor) |
void |
disconnect() |
void |
disconnect(LocalNode node)
Disconnect local node from the provider
|
void |
disconnectRemoteNode(java.util.UUID nodeId) |
SerialContext |
getSerialHost(java.util.UUID hostId,
java.lang.Object attachment) |
void |
onDisconnect(SerialContext host) |
private void |
onDisconnectForLocalNodes(RemoteNode t) |
add, finalizeHandle, get, getId, remove
protected final java.util.HashMap<java.util.UUID,RemoteNode> remoteNodes
protected final java.util.Map<java.util.UUID,RemoteHost> remoteHosts
protected final java.util.Map<java.util.UUID,LocalNode> localNodes
public void connect(LocalNode node)
node
- local nodepublic void disconnect(LocalNode node)
node
- local nodepublic void disconnect()
public SerialContext getSerialHost(java.util.UUID hostId, java.lang.Object attachment)
getSerialHost
in class SerialHandles
public void connectRemoteNode(java.util.UUID nodeId, SerialContext host, Actor mainActor)
public void disconnectRemoteNode(java.util.UUID nodeId)
public void onDisconnect(SerialContext host)
private void onDisconnectForLocalNodes(RemoteNode t)