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, finished
private 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.Actor
premiere
in interface ZActor.Actor
premiere
in class ZActor.SimpleActor
pipe
- the backstage control pipepublic java.util.List<ZMQ.Socket> createSockets(ZContext ctx, java.lang.Object... args)
ZActor.Actor
createSockets
in interface ZActor.Actor
createSockets
in class ZActor.SimpleActor
ctx
- 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.Actor
start
in interface ZActor.Actor
start
in class ZActor.SimpleActor
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 boolean backstage(ZMQ.Socket pipe, ZPoller poller, int events)
ZActor.Actor
backstage
in interface ZActor.Actor
backstage
in class ZActor.SimpleActor
pipe
- 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.Actor
looping
in interface ZActor.Actor
looping
in class ZActor.SimpleActor
pipe
- the backstage control pipepoller
- the poller of the doublepublic boolean stage(ZMQ.Socket socket, ZMQ.Socket pipe, ZPoller poller, int events)
ZActor.Actor
stage
in interface ZActor.Actor
stage
in class ZActor.SimpleActor
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
looped
in class ZActor.SimpleActor
pipe
- the backstage control pipepoller
- the poller of the double.public boolean destroyed(ZContext ctx, ZMQ.Socket pipe, ZPoller poller)
ZActor.Actor
destroyed
in interface ZActor.Actor
destroyed
in class ZActor.SimpleActor
ctx
- the context.pipe
- the backstage control pipe.poller
- the poller of the double.