ZAgent.Creator, ZAgent.SelectorCreator, ZAgent.SimpleAgent
Modifier and Type | Field and Description |
---|---|
private byte[] |
lock |
private boolean |
locked |
private ZMQ.Socket |
pipe |
Constructor and Description |
---|
SimpleAgent(ZMQ.Socket pipe,
java.lang.String lock)
Creates a new simple agent.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes the pipe.
|
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.
|
ZMsg |
recv(int timeout)
Receives a control message sent from the Plateau in the Corbeille.
|
boolean |
send(java.lang.String word)
Sends a control message from the Corbeille to the Plateau side.
|
boolean |
send(java.lang.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.
|
private final ZMQ.Socket pipe
private final byte[] lock
private boolean locked
public SimpleAgent(ZMQ.Socket pipe, java.lang.String lock)
pipe
- the pipe used to send control messages to the distant IStar.lock
- the lock to use. If null, the locking mechanism is omitted.public boolean sign()
ZAgent
public void close()
ZAgent
public ZMsg recv()
ZAgent
public ZMsg recv(int timeout)
ZAgent
public ZMsg recv(boolean wait)
ZAgent
public boolean send(ZMsg message)
ZAgent
public boolean send(java.lang.String word)
ZAgent
public boolean send(java.lang.String word, boolean more)
ZAgent
public boolean send(ZMsg msg, boolean destroy)
ZAgent
public ZMQ.Socket pipe()
ZAgent