Class ZAuth.AuthActor
java.lang.Object
org.zeromq.ZActor.SimpleActor
org.zeromq.ZAuth.AuthActor
- All Implemented Interfaces:
ZActor.Actor
- Enclosing class:
ZAuth
AuthActor is the backend actor which we talk to over a pipe. This lets
the actor do work asynchronously in the background while our application
does other things. This is invisible to the caller, who sees a classic
API.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Stringprivate final Map<String, ZAuth.Auth> private final Propertiesprivate static final Stringprivate ZMQ.Socketprivate final Stringprivate booleanprivate booleanprivate final Properties -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanbackstage(ZMQ.Socket pipe, ZPoller poller, int events) Called when the actor received a control message from its pipe during a loop.private ZAgentcreateAgent(ZContext ctx) createSockets(ZContext ctx, Object... args) Creates and initializes sockets for the double.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.booleanstage(ZMQ.Socket socket, ZMQ.Socket pipe, ZPoller poller, int events) The actor received a message from the created sockets during a loop.voidstart(ZMQ.Socket pipe, List<ZMQ.Socket> sockets, ZPoller poller) Called when the double is started, before the first loop.
-
Field Details
-
OK
- See Also:
-
actorName
-
whitelist
-
blacklist
-
auths
-
repliesAddress
-
repliesEnabled
private boolean repliesEnabled -
replies
-
verbose
private boolean verbose
-
-
Constructor Details
-
AuthActor
-
-
Method Details
-
createAgent
-
premiere
Description copied from interface:ZActor.ActorThis is the grand premiere! Called before the creation of the first double and the sockets 2nd in the order call of the global acting. It return the name that will be used for the thread. If it's null, a default one will be picked by ZActor.- Specified by:
premierein interfaceZActor.Actor- Overrides:
premierein classZActor.SimpleActor- Parameters:
pipe- the backstage control pipe- Returns:
- the name of the upcoming performance.
-
createSockets
Description copied from interface:ZActor.ActorCreates and initializes sockets for the double. This is done at each creation of a new double. 3rd in the order call of the global acting. 1st in the order call of the new double.- Specified by:
createSocketsin interfaceZActor.Actor- Overrides:
createSocketsin classZActor.SimpleActor- Parameters:
ctx- the context used to create socketsargs- the arguments passed as parameters of the ZActor- Returns:
- a list of created sockets that will be managed by the double. Not null.
-
start
Description copied from interface:ZActor.ActorCalled when the double is started, before the first loop. 4th in the order call of the global acting. 2nd in the order call of the new double.- Specified by:
startin interfaceZActor.Actor- Overrides:
startin classZActor.SimpleActor- Parameters:
pipe- the backstage control pipesockets- the managed sockets that were created in the previous steppoller- the poller where to eventually register the sockets for events
-
backstage
Description copied from interface:ZActor.ActorCalled when the actor received a control message from its pipe during a loop. 2nd in the order call of the new loop.- Specified by:
backstagein interfaceZActor.Actor- Overrides:
backstagein classZActor.SimpleActor- Parameters:
pipe- the backstage control pipe receiving the messagepoller- the poller of the double.events- the events source of the call- Returns:
- true in case of success, false to stop the actor.
-
stage
Description copied from interface:ZActor.ActorThe actor received a message from the created sockets during a loop. 2nd ex-aequo in the order call of the new loop.- Specified by:
stagein interfaceZActor.Actor- Overrides:
stagein classZActor.SimpleActor- Parameters:
socket- the socket receiving the messagepipe- the backstage control pipepoller- the poller of the double.events- the events source of the call- Returns:
- true in case of success, false to stop the actor.
-