private static final class ZProxy.ProxyActor extends ZActor.SimpleActor
| Modifier and Type | Class and Description |
|---|---|
private static class |
ZProxy.ProxyActor.State |
| Modifier and Type | Field and Description |
|---|---|
private java.lang.Object[] |
args |
private ZMQ.Socket |
backend |
private ZMQ.Socket |
capture |
private ZMQ.Socket |
frontend |
private java.lang.String |
name |
private ZProxy.Proxy |
provider |
private ZProxy.ProxyActor.State |
state |
private ZProxy.Pump |
transport |
| Constructor and Description |
|---|
ProxyActor(java.lang.String name,
ZProxy.Pump transport,
int id) |
| 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.
|
java.util.List<ZMQ.Socket> |
createSockets(ZContext ctx,
java.lang.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 |
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.
|
private boolean |
pause(ZPoller poller,
boolean pause) |
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 |
restart(ZMQ.Socket pipe,
boolean hot) |
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,
java.util.List<ZMQ.Socket> sockets,
ZPoller poller)
Called when the double is started, before the first loop.
|
private boolean |
start(ZPoller poller) |
private ZMsg |
status() |
private boolean |
stop() |
closed, finishedprivate final ZProxy.ProxyActor.State state
private final ZProxy.Pump transport
private final java.lang.String name
private ZProxy.Proxy provider
private java.lang.Object[] args
private ZMQ.Socket frontend
private ZMQ.Socket backend
private ZMQ.Socket capture
public ProxyActor(java.lang.String name,
ZProxy.Pump transport,
int id)
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 backstage(ZMQ.Socket pipe, ZPoller poller, int events)
ZActor.Actorbackstage in interface ZActor.Actorbackstage in class ZActor.SimpleActorpipe - the backstage control pipe receiving the messagepoller - the poller of the double.events - the events source of the callprivate ZMsg status()
private boolean start(ZPoller poller)
private boolean pause(ZPoller poller, boolean pause)
private boolean stop()
private boolean restart(ZMQ.Socket pipe, boolean hot)
public long looping(ZMQ.Socket pipe, ZPoller poller)
ZActor.Actorlooping in interface ZActor.Actorlooping in class ZActor.SimpleActorpipe - the backstage control pipepoller - the poller of the doublepublic boolean stage(ZMQ.Socket socket, ZMQ.Socket pipe, ZPoller poller, int events)
ZActor.Actorstage in interface ZActor.Actorstage in class ZActor.SimpleActorsocket - 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.Actorlooped in interface ZActor.Actorlooped in class ZActor.SimpleActorpipe - the backstage control pipepoller - the poller of the double.public boolean destroyed(ZContext ctx, ZMQ.Socket pipe, ZPoller poller)
ZActor.Actordestroyed in interface ZActor.Actordestroyed in class ZActor.SimpleActorctx - the context.pipe - the backstage control pipe.poller - the poller of the double.