Package com.mackenziehigh.cascade
Interface Cascade.Stage.Actor.Output<T>
- Type Parameters:
T
- is the type of messages that the actor will produce.
- Enclosing interface:
- Cascade.Stage.Actor<I,
O>
public static interface Cascade.Stage.Actor.Output<T>
Output to an Actor.
-
Method Summary
Modifier and TypeMethodDescriptionactor()
Get the actor that this input pertains to.connect
(Cascade.Stage.Actor.Input<T> input) Connect this output to the given input of another actor.disconnect
(Cascade.Stage.Actor.Input<T> input) Disconnect this output from the given input.boolean
isConnected
(Cascade.Stage.Actor.Input<?> input) Determine whether this output is connected to the given input.
-
Method Details
-
actor
Cascade.Stage.Actor<?,T> actor()Get the actor that this input pertains to.- Returns:
- the enclosing actor.
-
connect
Connect this output to the given input of another actor.This method is a no-op, if the connection already exists.
When implementing this method, care must be taken to ensure that concurrent connections and/or disconnection do not lead to incorrect states, such as duplicate connections.
- Parameters:
input
- will be sent messages from this output.- Returns:
- this.
-
disconnect
Disconnect this output from the given input.This method is a no-op, if the connection does not exist.
When implementing this method, care must be taken to ensure that concurrent connections and/or disconnection do not lead to incorrect states, such as duplicate connections.
- Parameters:
input
- will no longer be connected.- Returns:
- this.
-
isConnected
Determine whether this output is connected to the given input.- Parameters:
input
- may be connected to this output.- Returns:
- true, if this output is currently connected to the input.
-