public static class ZActor.Duo extends Object implements ZActor.Actor
Constructor and Description |
---|
Duo(ZActor.Actor main,
ZActor.Actor shadow) |
Modifier and Type | Method and Description |
---|---|
boolean |
backstage(ZMQ.Socket pipe,
ZPoller poller,
int events)
Called when the actor received a control message from its pipe during a loop.
|
void |
closed(ZMQ.Socket socket)
Called when a created socket has been closed.
|
List<ZMQ.Socket> |
createSockets(ZContext ctx,
Object[] args)
Creates and initializes sockets for the double.
|
boolean |
destroyed(ZContext ctx,
ZMQ.Socket pipe,
ZPoller poller)
Called when the current double has been destroyed.
|
boolean |
finished(ZMQ.Socket pipe)
Called when the stage is finished.
|
boolean |
looped(ZMQ.Socket pipe,
ZPoller poller)
Called at the end of each loop.
|
long |
looping(ZMQ.Socket pipe,
ZPoller poller)
Called every time just before a loop starts.
|
String |
premiere(ZMQ.Socket pipe)
This is the grand premiere!
Called before the creation of the first double and the sockets
2nd in the order call of the global acting.
|
boolean |
stage(ZMQ.Socket socket,
ZMQ.Socket pipe,
ZPoller poller,
int events)
The actor received a message from the created sockets during a loop.
|
void |
start(ZMQ.Socket pipe,
List<ZMQ.Socket> sockets,
ZPoller poller)
Called when the double is started, before the first loop.
|
public Duo(ZActor.Actor main, ZActor.Actor shadow)
public String premiere(ZMQ.Socket pipe)
ZActor.Actor
premiere
in interface ZActor.Actor
pipe
- the backstage control pipepublic List<ZMQ.Socket> createSockets(ZContext ctx, Object[] args)
ZActor.Actor
createSockets
in interface ZActor.Actor
ctx
- the context used to create socketsargs
- the arguments passed as parameters of the ZActorpublic void start(ZMQ.Socket pipe, List<ZMQ.Socket> sockets, ZPoller poller)
ZActor.Actor
start
in interface ZActor.Actor
pipe
- the backstage control pipesockets
- the managed sockets that were created in the previous steppoller
- the poller where to eventually register the sockets for eventspublic long looping(ZMQ.Socket pipe, ZPoller poller)
ZActor.Actor
looping
in interface ZActor.Actor
pipe
- the backstage control pipepoller
- the poller of the doublepublic boolean backstage(ZMQ.Socket pipe, ZPoller poller, int events)
ZActor.Actor
backstage
in interface ZActor.Actor
pipe
- the backstage control pipe receiving the messagepoller
- the poller of the double.events
- the events source of the callpublic boolean stage(ZMQ.Socket socket, ZMQ.Socket pipe, ZPoller poller, int events)
ZActor.Actor
stage
in interface ZActor.Actor
socket
- the socket receiving the messagepipe
- the backstage control pipepoller
- the poller of the double.events
- the events source of the callpublic boolean looped(ZMQ.Socket pipe, ZPoller poller)
ZActor.Actor
looped
in interface ZActor.Actor
pipe
- the backstage control pipepoller
- the poller of the double.public void closed(ZMQ.Socket socket)
ZActor.Actor
closed
in interface ZActor.Actor
socket
- the closed socked.public boolean destroyed(ZContext ctx, ZMQ.Socket pipe, ZPoller poller)
ZActor.Actor
destroyed
in interface ZActor.Actor
ctx
- the context.pipe
- the backstage control pipe.poller
- the poller of the double.public boolean finished(ZMQ.Socket pipe)
ZActor.Actor
finished
in interface ZActor.Actor
pipe
- the backstage control pipeCopyright © 2017. All rights reserved.