Class ZActor.Double
java.lang.Object
org.zeromq.ZActor.Double
- All Implemented Interfaces:
ZPoller.EventsHandler, ZStar.Star
- Enclosing class:
ZActor
private static final class ZActor.Double
extends Object
implements ZPoller.EventsHandler, ZStar.Star
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ZActor.Actorprivate final ZContextprivate final ZMQ.Socketprivate final ZPollerprivate final List<ZMQ.Socket> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanact(int events) Where acting takes place ...
Hint: Can be used to process the events or input acquired from the previous step, or ...
Key point: in the middle of a loop.
Decision: to act on the next loop or notintbreathe()Called when the star in on stage, just before acting.
Hint: Can be used to poll events or get input/events from other sources, or ...
Key point: a loop just started.booleanentract()Called as an interval between each act.
Hint: Can be used to perform decisions to continue next loop or not, or to send computed data to outputs, or ...
Key point: at the end of a loop.
Decision: to act on the next loop or notbooleanevents(SelectableChannel channel, int events) Called when the poller intercepts events.booleanevents(ZMQ.Socket socket, int events) Called when the poller intercepts events.voidprepare()Called when the star is in the wings.
Hint: Can be used to initialize the service, or ...
Key point: no loop has started already.booleanrenews()Does the star want to renew for a new performance ? Hint: Can be used to perform decisions to continue looping or not, or to send computed data to outputs, or ...
Key point: the inner looping mechanism just ended
Decision: to exit or not
-
Field Details
-
poller
-
pipe
-
sockets
-
actor
-
context
-
-
Constructor Details
-
Double
-
-
Method Details
-
prepare
public void prepare()Description copied from interface:ZStar.StarCalled when the star is in the wings.
Hint: Can be used to initialize the service, or ...
Key point: no loop has started already.- Specified by:
preparein interfaceZStar.Star
-
breathe
public int breathe()Description copied from interface:ZStar.StarCalled when the star in on stage, just before acting.
Hint: Can be used to poll events or get input/events from other sources, or ...
Key point: a loop just started.- Specified by:
breathein interfaceZStar.Star- Returns:
- the number of events to process
-
act
public boolean act(int events) Description copied from interface:ZStar.StarWhere acting takes place ...
Hint: Can be used to process the events or input acquired from the previous step, or ...
Key point: in the middle of a loop.
Decision: to act on the next loop or not- Specified by:
actin interfaceZStar.Star- Parameters:
events- the number of events to process- Returns:
- true to continue till the end of the act, false to stop loopS here.
-
entract
public boolean entract()Description copied from interface:ZStar.StarCalled as an interval between each act.
Hint: Can be used to perform decisions to continue next loop or not, or to send computed data to outputs, or ...
Key point: at the end of a loop.
Decision: to act on the next loop or not- Specified by:
entractin interfaceZStar.Star- Returns:
- true to continue acting, false to stop loopS here.
-
renews
public boolean renews()Description copied from interface:ZStar.StarDoes the star want to renew for a new performance ? Hint: Can be used to perform decisions to continue looping or not, or to send computed data to outputs, or ...
Key point: the inner looping mechanism just ended
Decision: to exit or not- Specified by:
renewsin interfaceZStar.Star- Returns:
- true to restart acting, false to leave here
-
events
Description copied from interface:ZPoller.EventsHandlerCalled when the poller intercepts events.- Specified by:
eventsin interfaceZPoller.EventsHandler- Parameters:
channel- the channel with eventsevents- the interesting events as an ORed combination of IN, OUT, ERR- Returns:
- true to continue the polling, false to stop it
-
events
Description copied from interface:ZPoller.EventsHandlerCalled when the poller intercepts events.- Specified by:
eventsin interfaceZPoller.EventsHandler- Parameters:
socket- the socket with eventsevents- the interesting events as an ORed combination of IN, OUT, ERR- Returns:
- true to continue the polling, false to stop it
-