Interface ConnectableActor
- All Superinterfaces:
java.io.Serializable
- All Known Implementing Classes:
LocalConnectable,TCPConnectable
public interface ConnectableActor
extends java.io.Serializable
Created by ruedi on 18/05/15.
Describes a connectable remote or local actor. (implementations hold technical details such as host port etc.)
To connect to a remote actor usually a connector is configured, then calling connect returns the reference to
the remote actor.
In peer to peer actor remoting model, this can be passed around (over network) in order to
tellMsg other actors/services on how to connect a certain actor directly (e.g. a Service Registry would
pass ConnectableActors to clients).
-
Method Summary
Modifier and Type Method Description ConnectableActoractorClass(java.lang.Class actorClz)default <T extends Actor>
IPromise<T>connect()default <T extends Actor>
IPromise<T>connect(Callback<ActorClientConnector> disconnectCallback)<T extends Actor>
IPromise<T>connect(Callback<ActorClientConnector> disconnectCallback, java.util.function.Consumer<Actor> actorDisconnecCB)java.lang.Class<? extends Actor>getActorClass()java.lang.StringgetKey()ConnectableActorinboundQueueSize(int inboundQueueSize)
-
Method Details
-
connect
<T extends Actor> IPromise<T> connect(Callback<ActorClientConnector> disconnectCallback, java.util.function.Consumer<Actor> actorDisconnecCB)- Type Parameters:
T-- Parameters:
disconnectCallback- - a callback called on disconnect, passing the ActorClientConnector instanceactorDisconnecCB- - a consumer called on disconnect passing the remoteactor ref. Rarely needed. added to avoid braking things- Returns:
-
connect
-
connect
-
actorClass
-
getActorClass
java.lang.Class<? extends Actor> getActorClass() -
inboundQueueSize
-
getKey
java.lang.String getKey()
-