public final class RemoteActors extends LocalHost
| Modifier and Type | Field and Description |
|---|---|
private java.util.concurrent.ConcurrentMap<java.lang.String,Actor> |
publishedActors
Stores Actors published in context of this instance of RemoteActors.
|
private java.util.concurrent.ConcurrentMap<java.lang.String,DataflowVariable<Actor>> |
remoteActors
Stores promises to remote instances of Actors.
|
remoteHostsid| Modifier | Constructor and Description |
|---|---|
private |
RemoteActors() |
| Modifier and Type | Method and Description |
|---|---|
static RemoteActors |
create() |
<T> T |
get(java.lang.Class<T> klass,
java.lang.String name) |
Promise<Actor> |
get(java.lang.String host,
int port,
java.lang.String name)
Retrieves
Actor published under specified name on remote host. |
void |
publish(Actor actor,
java.lang.String name)
Publishes
Actor under given name. |
<T> void |
registerProxy(java.lang.Class<T> klass,
java.lang.String name,
T object) |
disconnect, getPromise, getSerialHost, onDisconnect, startServer, stopServeradd, finalizeHandle, get, getId, removeprivate final java.util.concurrent.ConcurrentMap<java.lang.String,Actor> publishedActors
private final java.util.concurrent.ConcurrentMap<java.lang.String,DataflowVariable<Actor>> remoteActors
public void publish(Actor actor, java.lang.String name)
Actor under given name.
It overrides previously published Actor if the same name is given.actor - the Actor to be publishedname - the name under which Actor is publishedpublic Promise<Actor> get(java.lang.String host, int port, java.lang.String name)
Actor published under specified name on remote host.host - the address of remote hostport - the port of remote hostname - the name under which Actor was publishedRemoteActorpublic static RemoteActors create()
public <T> void registerProxy(java.lang.Class<T> klass,
java.lang.String name,
T object)
registerProxy in class LocalHost