Package org.zeromq

Class ZPoller.ComposeEventsHandler

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private BiFunction<java.nio.channels.SelectableChannel,​java.lang.Integer,​java.lang.Boolean> channels  
      private BiFunction<ZMQ.Socket,​java.lang.Integer,​java.lang.Boolean> sockets  
    • Constructor Summary

      Constructors 
      Constructor Description
      ComposeEventsHandler​(BiFunction<ZMQ.Socket,​java.lang.Integer,​java.lang.Boolean> sockets, BiFunction<java.nio.channels.SelectableChannel,​java.lang.Integer,​java.lang.Boolean> channels)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean events​(java.nio.channels.SelectableChannel channel, int events)
      Called when the poller intercepts events.
      boolean events​(ZMQ.Socket socket, int events)
      Called when the poller intercepts events.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • channels

        private final BiFunction<java.nio.channels.SelectableChannel,​java.lang.Integer,​java.lang.Boolean> channels
    • Constructor Detail

      • ComposeEventsHandler

        public ComposeEventsHandler​(BiFunction<ZMQ.Socket,​java.lang.Integer,​java.lang.Boolean> sockets,
                                    BiFunction<java.nio.channels.SelectableChannel,​java.lang.Integer,​java.lang.Boolean> channels)
    • Method Detail

      • events

        public boolean events​(ZMQ.Socket socket,
                              int events)
        Description copied from interface: ZPoller.EventsHandler
        Called when the poller intercepts events.
        Specified by:
        events in interface ZPoller.EventsHandler
        Parameters:
        socket - the socket with events
        events - the interesting events as an ORed combination of IN, OUT, ERR
        Returns:
        true to continue the polling, false to stop it
      • events

        public boolean events​(java.nio.channels.SelectableChannel channel,
                              int events)
        Description copied from interface: ZPoller.EventsHandler
        Called when the poller intercepts events.
        Specified by:
        events in interface ZPoller.EventsHandler
        Parameters:
        channel - the channel with events
        events - the interesting events as an ORed combination of IN, OUT, ERR
        Returns:
        true to continue the polling, false to stop it