Package org.zeromq
Class ZAgent.SimpleAgent
java.lang.Object
org.zeromq.ZAgent.SimpleAgent
- All Implemented Interfaces:
ZAgent
- Enclosing interface:
- ZAgent
Creates a very simple agent with an easy lock mechanism.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.zeromq.ZAgent
ZAgent.Creator, ZAgent.SelectorCreator, ZAgent.SimpleAgent
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Closes the pipe.pipe()
Returns the socket used for communication.recv()
Receives a control message sent from the Plateau in the Corbeille.recv
(boolean wait) Receives a control message sent from the Plateau in the Corbeille.recv
(int timeout) Receives a control message sent from the Plateau in the Corbeille.boolean
Sends a control message from the Corbeille to the Plateau side.boolean
Sends a control message from the Corbeille to the Plateau side.boolean
Sends a control message from the Corbeille to the Plateau.boolean
Sends a control message from Corbeille side to the Plateau side.boolean
sign()
Gives a sign if the distant Star is here.
-
Field Details
-
pipe
-
lock
private final byte[] lock -
locked
private boolean locked
-
-
Constructor Details
-
SimpleAgent
Creates a new simple agent.- Parameters:
pipe
- the pipe used to send control messages to the distant IStar.lock
- the lock to use. If null, the locking mechanism is omitted.
-
-
Method Details
-
sign
public boolean sign()Description copied from interface:ZAgent
Gives a sign if the distant Star is here. -
close
public void close()Description copied from interface:ZAgent
Closes the pipe. -
recv
Description copied from interface:ZAgent
Receives a control message sent from the Plateau in the Corbeille. The call is blocking. -
recv
Description copied from interface:ZAgent
Receives a control message sent from the Plateau in the Corbeille. The call times out if there is no message after the elapsed time. -
recv
Description copied from interface:ZAgent
Receives a control message sent from the Plateau in the Corbeille. The call is blocking depending on the parameter. -
send
Description copied from interface:ZAgent
Sends a control message from the Corbeille to the Plateau. -
send
Description copied from interface:ZAgent
Sends a control message from the Corbeille to the Plateau side. -
send
Description copied from interface:ZAgent
Sends a control message from the Corbeille to the Plateau side. -
send
Description copied from interface:ZAgent
Sends a control message from Corbeille side to the Plateau side. -
pipe
Description copied from interface:ZAgent
Returns the socket used for communication. For advanced usage.
-