Package zmq

Class ZMQ.Event

  • Enclosing class:
    ZMQ

    public static class ZMQ.Event
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
        Event​(int event, java.lang.String addr, java.lang.Object arg)  
      private Event​(int event, java.lang.String addr, java.lang.Object arg, int flag)  
    • Field Detail

      • event

        public final int event
      • addr

        public final java.lang.String addr
      • arg

        public final java.lang.Object arg
      • flag

        private final int flag
    • Constructor Detail

      • Event

        public Event​(int event,
                     java.lang.String addr,
                     java.lang.Object arg)
      • Event

        private Event​(int event,
                      java.lang.String addr,
                      java.lang.Object arg,
                      int flag)
    • Method Detail

      • 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.