public static class ZMQ.Event
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
address |
private int |
event |
private java.lang.Object |
resolvedValue |
private java.lang.Object |
value |
Modifier | Constructor and Description |
---|---|
private |
Event(int event,
java.lang.Object value,
java.lang.Object resolvedValue,
java.lang.String address) |
|
Event(int event,
java.lang.Object value,
java.lang.String address) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getAddress() |
int |
getEvent() |
java.lang.Object |
getValue() |
boolean |
isError()
Used to check if the event is an error.
|
boolean |
isWarn()
Used to check if the event is a warning.
|
static ZMQ.Event |
recv(ZMQ.Socket socket)
Receive an event from a monitor socket.
|
static ZMQ.Event |
recv(ZMQ.Socket socket,
int flags)
Receive an event from a monitor socket.
|
<M> M |
resolveValue()
Return the argument as an integer or a Enum of the appropriate type if available.
|
private final int event
private final java.lang.Object value
private final java.lang.Object resolvedValue
private final java.lang.String address
public Event(int event, java.lang.Object value, java.lang.String address)
private Event(int event, java.lang.Object value, java.lang.Object resolvedValue, java.lang.String address)
public static ZMQ.Event recv(ZMQ.Socket socket, int flags)
socket
- the socketflags
- the flags to apply to the receive operation.ZMQException
public static ZMQ.Event recv(ZMQ.Socket socket)
socket
- the socketZMQException
public int getEvent()
public java.lang.Object getValue()
public java.lang.String getAddress()
public boolean isError()
Generally, any event that define the errno is considered as an error.
public boolean isWarn()
Generally, any event that return an authentication failure is considered as a warning.
public <M> M resolveValue()
ZMonitor.ProtocolCode
for a handshake protocol error.ZMQ.Error
for any other error.Integer
when available.M
- The expected type of the returned object