Package zmq
Class ZMQ.Event
- java.lang.Object
-
- zmq.ZMQ.Event
-
- Enclosing class:
- ZMQ
public static class ZMQ.Event extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description java.lang.String
addr
java.lang.Object
arg
int
event
private int
flag
private static int
VALUE_CHANNEL
private static int
VALUE_INTEGER
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.nio.channels.SelectableChannel
getChannel(SocketBase socket)
Resolve the channel that was associated with this event.static ZMQ.Event
read(SocketBase s)
static ZMQ.Event
read(SocketBase s, int flags)
boolean
write(SocketBase s)
-
-
-
Field Detail
-
VALUE_INTEGER
private static final int VALUE_INTEGER
- See Also:
- Constant Field Values
-
VALUE_CHANNEL
private static final int VALUE_CHANNEL
- See Also:
- Constant Field Values
-
event
public final int event
-
addr
public final java.lang.String addr
-
arg
public final java.lang.Object arg
-
flag
private final int flag
-
-
Method Detail
-
write
public boolean write(SocketBase s)
-
getChannel
public java.nio.channels.SelectableChannel getChannel(SocketBase socket)
Resolve the channel that was associated with this event. Implementation note: to be backward compatible,arg
only store Integer value, so the channel is resolved using this call.Internally socket are kept using weak values, so it's better to retrieve the channel as early as possible, otherwise it might get lost.
- Parameters:
socket
- the socket that send the event- Returns:
- the channel in the event, or null if was not a channel event.
-
read
public static ZMQ.Event read(SocketBase s, int flags)
-
read
public static ZMQ.Event read(SocketBase s)
-
-