Groovy Documentation

gpars.remote
[Java] Class LocalHost

java.lang.Object
  groovyx.gpars.serial.SerialHandles
      gpars.remote.LocalHost

public class LocalHost
extends SerialHandles

Represents communication point with other local hosts. Usually it is enough to have one LocalHost per JVM but it is possible to have several.

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 - remote hosts connected with this one - remote nodes known to this host - local nodes available on this host

Authors:
Alex Tkachman


Field Summary
protected Map localNodes

Local nodes known to the provider

protected Map remoteHosts

Hosts known to the provider

protected HashMap remoteNodes

Registry of remote nodes known to the provider

 
Method Summary
void connect(LocalNode node)

Connect local node to the provider

void connectRemoteNode(UUID nodeId, SerialContext host, Actor mainActor)

void disconnect(LocalNode node)

Disconnect local node from the provider

void disconnect()

void disconnectRemoteNode(UUID nodeId)

SerialContext getSerialHost(UUID hostId, Object conn)

void onDisconnect(SerialContext host)

 

Field Detail

localNodes

protected final Map localNodes
Local nodes known to the provider


remoteHosts

protected final Map remoteHosts
Hosts known to the provider


remoteNodes

protected final HashMap remoteNodes
Registry of remote nodes known to the provider


 
Method Detail

connect

public void connect(LocalNode node)
Connect local node to the provider
Parameters:
node - local node


connectRemoteNode

public void connectRemoteNode(UUID nodeId, SerialContext host, Actor mainActor)


disconnect

public void disconnect(LocalNode node)
Disconnect local node from the provider
Parameters:
node - local node


disconnect

public void disconnect()


disconnectRemoteNode

public void disconnectRemoteNode(UUID nodeId)


getSerialHost

public SerialContext getSerialHost(UUID hostId, Object conn)


onDisconnect

public void onDisconnect(SerialContext host)


 

Groovy Documentation