Package zmq

Class ZMQ.Event

java.lang.Object
zmq.ZMQ.Event
Enclosing class:
ZMQ

public static class ZMQ.Event extends Object
  • Field Details

    • VALUE_INTEGER

      private static final int VALUE_INTEGER
      See Also:
    • VALUE_CHANNEL

      private static final int VALUE_CHANNEL
      See Also:
    • event

      public final int event
    • addr

      public final String addr
    • arg

      public final Object arg
    • flag

      private final int flag
  • Constructor Details

    • Event

      public Event(int event, String addr, Object arg)
    • Event

      private Event(int event, String addr, Object arg, int flag)
  • Method Details

    • write

      public boolean write(SocketBase s)
    • getChannel

      public 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)