// Path: src/main/java/org/zeromq/api/LoopHandler.java
// public interface LoopHandler {
//     /**
//      * Execute a loop operation.
//      * 
//      * @param reactor The Reactor
//      * @param pollable The Pollable containing the socket or channel
//      */
//     void execute(Reactor reactor, Pollable pollable);
// }
// 
// Path: src/main/java/org/zeromq/api/PollAdapter.java
// public class PollAdapter implements PollListener {
//     @Override
//     public void handleIn(Pollable pollable) {
//         handleIn(pollable.getSocket());
//         handleIn(pollable.getChannel());
//     }
// 
//     @Override
//     public void handleOut(Pollable pollable) {
//         handleOut(pollable.getSocket());
//         handleOut(pollable.getChannel());
//     }
// 
//     @Override
//     public void handleError(Pollable pollable) {
//         handleError(pollable.getSocket());
//         handleError(pollable.getChannel());
//     }
// 
//     protected void handleIn(Socket socket) {
//     }
// 
//     protected void handleOut(Socket socket) {
//     }
// 
//     protected void handleError(Socket socket) {
//     }
// 
//     protected void handleIn(SelectableChannel channel) {
//     }
// 
//     protected void handleOut(SelectableChannel channel) {
//     }
// 
//     protected void handleError(SelectableChannel channel) {
//     }
// }
// 
// Path: src/main/java/org/zeromq/api/Pollable.java
// public interface Pollable {
//     /**
//      * Get the socket (if any) for this poll item.
//      * 
//      * @return The socket, or null if this is a SelectableChannel Pollable
//      */
//     Socket getSocket();
// 
//     /**
//      * Get the SelectableChannel (if any) for this poll item.
//      * 
//      * @return The channel, or null if this is a Socket Pollable
//      */
//     SelectableChannel getChannel();
// 
//     /**
//      * Get the options used for this poll item
//      * 
//      * @return The options used for this Pollable
//      */
//     EnumSet<PollerType> getOptions();
// }
// 
// Path: src/main/java/org/zeromq/api/Reactor.java
// public interface Reactor {
//     /**
//      * Start the reactor.
//      */
//     void start();
// 
//     /**
//      * Stop the reactor.
//      */
//     void stop();
// 
//     /**
//      * Add a new Pollable to this Reactor.
//      * <p>
//      * This method is not thread-safe, and should only be done from inside the
//      * LoopHandler when invoked by the Reactor on its own thread.
//      * 
//      * @param pollable The Pollable with the socket to poll
//      * @param handler The loop handler
//      */
//     void addPollable(Pollable pollable, LoopHandler handler);
// 
//     /**
//      * Add a new ReactorTimer to this Reactor.
//      * <p>
//      * This method is not thread-safe, and should only be done from inside the
//      * LoopHandler when invoked by the Reactor on its own thread.
//      * 
//      * @param initialDelay The initial delay, in milliseconds
//      * @param numIterations The number of iterations, after which this timer stop
//      * @param handler The loop handler
//      */
//     void addTimer(long initialDelay, int numIterations, LoopHandler handler);
// 
//     /**
//      * Cancel an existing Pollable or ReactorTimer and remove the corresponding
//      * LoopHandler from executing.
//      * <p>
//      * This method is not thread-safe, and should only be done from inside the
//      * LoopHandler when invoked by the Reactor on its own thread.
//      * 
//      * @param handler The loop handler
//      */
//     void cancel(LoopHandler handler);
// }


import org.zeromq.api.LoopHandler;
import org.zeromq.api.PollAdapter;
import org.zeromq.api.Pollable;
import org.zeromq.api.Reactor;
package org.zeromq.jzmq.reactor;


class PollItem extends PollAdapter {
    private Reactor reactor;

    public Pollable pollable;
    public LoopHandler handler;
    public Object[] args;

// Path: src/main/java/org/zeromq/api/LoopHandler.java
// public interface LoopHandler {
//     /**
//      * Execute a loop operation.
//      * 
//      * @param reactor The Reactor
//      * @param pollable The Pollable containing the socket or channel
//      */
//     void execute(Reactor reactor, Pollable pollable);
// }
// 
// Path: src/main/java/org/zeromq/api/PollAdapter.java
// public class PollAdapter implements PollListener {
//     @Override
//     public void handleIn(Pollable pollable) {
//         handleIn(pollable.getSocket());
//         handleIn(pollable.getChannel());
//     }
// 
//     @Override
//     public void handleOut(Pollable pollable) {
//         handleOut(pollable.getSocket());
//         handleOut(pollable.getChannel());
//     }
// 
//     @Override
//     public void handleError(Pollable pollable) {
//         handleError(pollable.getSocket());
//         handleError(pollable.getChannel());
//     }
// 
//     protected void handleIn(Socket socket) {
//     }
// 
//     protected void handleOut(Socket socket) {
//     }
// 
//     protected void handleError(Socket socket) {
//     }
// 
//     protected void handleIn(SelectableChannel channel) {
//     }
// 
//     protected void handleOut(SelectableChannel channel) {
//     }
// 
//     protected void handleError(SelectableChannel channel) {
//     }
// }
// 
// Path: src/main/java/org/zeromq/api/Pollable.java
// public interface Pollable {
//     /**
//      * Get the socket (if any) for this poll item.
//      * 
//      * @return The socket, or null if this is a SelectableChannel Pollable
//      */
//     Socket getSocket();
// 
//     /**
//      * Get the SelectableChannel (if any) for this poll item.
//      * 
//      * @return The channel, or null if this is a Socket Pollable
//      */
//     SelectableChannel getChannel();
// 
//     /**
//      * Get the options used for this poll item
//      * 
//      * @return The options used for this Pollable
//      */
//     EnumSet<PollerType> getOptions();
// }
// 
// Path: src/main/java/org/zeromq/api/Reactor.java
// public interface Reactor {
//     /**
//      * Start the reactor.
//      */
//     void start();
// 
//     /**
//      * Stop the reactor.
//      */
//     void stop();
// 
//     /**
//      * Add a new Pollable to this Reactor.
//      * <p>
//      * This method is not thread-safe, and should only be done from inside the
//      * LoopHandler when invoked by the Reactor on its own thread.
//      * 
//      * @param pollable The Pollable with the socket to poll
//      * @param handler The loop handler
//      */
//     void addPollable(Pollable pollable, LoopHandler handler);
// 
//     /**
//      * Add a new ReactorTimer to this Reactor.
//      * <p>
//      * This method is not thread-safe, and should only be done from inside the
//      * LoopHandler when invoked by the Reactor on its own thread.
//      * 
//      * @param initialDelay The initial delay, in milliseconds
//      * @param numIterations The number of iterations, after which this timer stop
//      * @param handler The loop handler
//      */
//     void addTimer(long initialDelay, int numIterations, LoopHandler handler);
// 
//     /**
//      * Cancel an existing Pollable or ReactorTimer and remove the corresponding
//      * LoopHandler from executing.
//      * <p>
//      * This method is not thread-safe, and should only be done from inside the
//      * LoopHandler when invoked by the Reactor on its own thread.
//      * 
//      * @param handler The loop handler
//      */
//     void cancel(LoopHandler handler);
// }


// Path: src/main/java/org/zeromq/jzmq/reactor/PollItem.java
import org.zeromq.api.LoopHandler;
import org.zeromq.api.PollAdapter;
import org.zeromq.api.Pollable;
import org.zeromq.api.Reactor;

package org.zeromq.jzmq.reactor;


class PollItem extends PollAdapter {
    private Reactor reactor;

    public Pollable pollable;
    public LoopHandler handler;
    public Object[] args;

    public PollItem(Reactor reactor, Pollable pollable, LoopHandler handler) {