private static class ZMonitor.MonitorActor extends ZActor.SimpleActor
| Modifier and Type | Field and Description |
|---|---|
private java.lang.String |
address |
private static java.lang.String |
ERROR |
private int |
events |
private ZMQ.Socket |
monitor |
private ZMQ.Socket |
monitored |
private static java.lang.String |
OK |
private boolean |
verbose |
| Constructor and Description |
|---|
MonitorActor(ZMQ.Socket socket) |
| Modifier and Type | Method and Description |
|---|---|
private boolean |
addEvents(ZMQ.Socket pipe) |
boolean |
backstage(ZMQ.Socket pipe,
ZPoller poller,
int evts)
Called when the actor received a control message from its pipe during a loop.
|
private boolean |
close(ZPoller poller,
ZMQ.Socket pipe) |
java.util.List<ZMQ.Socket> |
createSockets(ZContext ctx,
java.lang.Object... args)
Creates and initializes sockets for the double.
|
private void |
log(java.lang.String action,
boolean rc,
java.lang.String err) |
java.lang.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.
|
private boolean |
removeEvents(ZMQ.Socket pipe) |
boolean |
stage(ZMQ.Socket socket,
ZMQ.Socket pipe,
ZPoller poller,
int evts)
The actor received a message from the created sockets during a loop.
|
void |
start(ZMQ.Socket pipe,
java.util.List<ZMQ.Socket> sockets,
ZPoller poller)
Called when the double is started, before the first loop.
|
private boolean |
start(ZPoller poller,
ZMQ.Socket pipe) |
private static final java.lang.String ERROR
private static final java.lang.String OK
private final ZMQ.Socket monitored
private final java.lang.String address
private ZMQ.Socket monitor
private int events
private boolean verbose
public MonitorActor(ZMQ.Socket socket)
public java.lang.String premiere(ZMQ.Socket pipe)
ZActor.Actorpremiere in interface ZActor.Actorpremiere in class ZActor.SimpleActorpipe - the backstage control pipepublic java.util.List<ZMQ.Socket> createSockets(ZContext ctx, java.lang.Object... args)
ZActor.ActorcreateSockets in interface ZActor.ActorcreateSockets in class ZActor.SimpleActorctx - the context used to create socketsargs - the arguments passed as parameters of the ZActorpublic void start(ZMQ.Socket pipe, java.util.List<ZMQ.Socket> sockets, ZPoller poller)
ZActor.Actorstart in interface ZActor.Actorstart in class ZActor.SimpleActorpipe - the backstage control pipesockets - the managed sockets that were created in the previous steppoller - the poller where to eventually register the sockets for eventspublic boolean stage(ZMQ.Socket socket, ZMQ.Socket pipe, ZPoller poller, int evts)
ZActor.Actorstage in interface ZActor.Actorstage in class ZActor.SimpleActorsocket - the socket receiving the messagepipe - the backstage control pipepoller - the poller of the double.evts - the events source of the callpublic boolean backstage(ZMQ.Socket pipe, ZPoller poller, int evts)
ZActor.Actorbackstage in interface ZActor.Actorbackstage in class ZActor.SimpleActorpipe - the backstage control pipe receiving the messagepoller - the poller of the double.evts - the events source of the callprivate boolean addEvents(ZMQ.Socket pipe)
private boolean removeEvents(ZMQ.Socket pipe)
private boolean start(ZPoller poller, ZMQ.Socket pipe)
private boolean close(ZPoller poller, ZMQ.Socket pipe)
private void log(java.lang.String action,
boolean rc,
java.lang.String err)