public interface ZAgent
An agent is a mechanism allowing to send messages from one thread to another, and to receive messages from this other thread.
Its built-in implementation provides an easy communication-lock system that will close the access once the remote thread is finished.
Are proposed for you a restrained set of simple but powerful messaging commands for a quick learning curve and an access to the underlying Socket for advanced usage.
Modifier and Type | Interface and Description |
---|---|
static class |
ZAgent.Creator |
static interface |
ZAgent.SelectorCreator
Creates a selector and destroys it.
|
static class |
ZAgent.SimpleAgent
Creates a very simple agent with an easy lock mechanism.
|
static class |
ZAgent.VerySimpleSelectorCreator |
Modifier and Type | Method and Description |
---|---|
void |
nova()
Deprecated.
not sure it is useful or recommended
|
ZMQ.Socket |
pipe()
Returns the socket used for communication.
|
ZMsg |
recv()
Receives a control message sent from the Plateau in the Corbeille.
|
ZMsg |
recv(boolean wait)
Receives a control message sent from the Plateau in the Corbeille.
|
boolean |
send(String word)
Sends a control message from the Corbeille to the Plateau side.
|
boolean |
send(String word,
boolean more)
Sends a control message from the Corbeille to the Plateau side.
|
boolean |
send(ZMsg message)
Sends a control message from the Corbeille to the Plateau.
|
boolean |
send(ZMsg msg,
boolean destroy)
Sends a control message from Corbeille side to the Plateau side.
|
boolean |
sign()
Gives a sign if the distant Star is here.
|
ZMsg recv()
ZMsg recv(boolean wait)
wait
- true to make a blocking call, false to not wait, and possibly return nullboolean send(ZMsg message)
message
- the message to sendboolean send(ZMsg msg, boolean destroy)
msg
- the message to senddestroy
- true to destroy the message after sending it.boolean send(String word)
word
- the message to sendboolean send(String word, boolean more)
word
- the message to sendmore
- true to send more strings in a single messageboolean sign()
@Deprecated void nova()
ZMQ.Socket pipe()
Copyright © 2024. All rights reserved.