class Double implements EventsHandler, Star
    {
        // poller used for the loop
        private final ZPoller poller;

        // control pipe for Backstage side
        private final Socket pipe;

        // managed sockets
        private final List<Socket> sockets;

        // actor responsible for processing messages
        private final Actor actor;

        // context used for the closing of the sockets
        private final ZContext context;

        // creates a new double
        public Double(final ZContext ctx, final Socket pipe, final Actor actor, final Object... args)
        {
            this.context = ctx;
            this.pipe = pipe;
            this.actor = actor;

            final List<Socket> created = actor.createSockets(ctx, args);
            assert (created != null);

            sockets = new ArrayList<>(created);

            poller = new ZPoller(ctx);
            poller.setGlobalHandler(this);
        }

        // before starting the loops
        @Override
        public void prepare()
        {
            poller.register(pipe, ZPoller.POLLIN);
            actor.start(pipe, Collections.unmodifiableList(sockets), poller);
        }

        // gives the number of events to process
        @Override
        public int breathe()
        {
            long timeout = actor.looping(pipe, poller);
            return poller.poll(timeout);
            // events have been dispatched,
        }

        // acting takes place, return true to continue till the end
        @Override
        public boolean act(int events)
        {
            // act is actually already finished for handlers
            return events >= 0; //  Context is not shut down
        }

        // a loop just finished, return true to continue acting
        @Override
        public boolean entract()
        {
            return actor.looped(pipe, poller);
        }

        // destroys the double
        @Override
        public boolean renews()
        {<FILL_FUNCTION_BODY>}

        @Override
        public boolean events(SelectableChannel channel, int events)
        {
            // TODO dispatch events from channels
            return true;
        }

        // an event has occurred on a registered socket
        @Override
        public boolean events(final Socket socket, final int events)
        {
            if (socket != pipe) {
                // Process a stage message, time to play
                return actor.stage(socket, pipe, poller, events);
            }
            else {
                // Process a control message, time to update your playing
                return actor.backstage(pipe, poller, events);
            }
        }
    }

            // close every managed sockets
            Iterator<Socket> iter = sockets.iterator();
            while (iter.hasNext()) {
                final Socket socket = iter.next();
                iter.remove();
                if (socket != null) {
                    poller.unregister(socket);
                    socket.close();
                    // call back the actor to inform that a socket has been closed.
                    actor.closed(socket);
                }
            }
            // let the actor decide if the stage restarts a new double
            return actor.destroyed(context, pipe, poller);
        
<methods>public transient void <init>(org.zeromq.ZAgent.SelectorCreator, org.zeromq.ZStar.Fortune, java.lang.String, java.lang.Object[]) ,public transient void <init>(org.zeromq.ZStar.Fortune, java.lang.String, java.lang.Object[]) ,public transient void <init>(org.zeromq.ZContext, org.zeromq.ZAgent.SelectorCreator, org.zeromq.ZStar.Fortune, java.lang.String, java.lang.Object[]) ,public transient void <init>(org.zeromq.ZContext, org.zeromq.ZStar.Fortune, java.lang.String, java.lang.Object[]) ,public transient void <init>(org.zeromq.ZContext, org.zeromq.ZAgent.SelectorCreator, org.zeromq.ZStar.Fortune, BiFunction<org.zeromq.ZMQ.Socket,java.lang.String,org.zeromq.ZAgent>, java.lang.String, java.lang.Object[]) ,public transient void <init>(org.zeromq.ZContext, org.zeromq.ZStar.Fortune, BiFunction<org.zeromq.ZMQ.Socket,java.lang.String,org.zeromq.ZAgent>, java.lang.String, java.lang.Object[]) ,public org.zeromq.ZAgent agent() ,public void close() ,public org.zeromq.ZStar.Exit exit() ,public static void party(long, java.util.concurrent.TimeUnit) ,public org.zeromq.ZMQ.Socket pipe() ,public org.zeromq.ZMsg recv() ,public org.zeromq.ZMsg recv(int) ,public org.zeromq.ZMsg recv(boolean) ,public boolean send(org.zeromq.ZMsg) ,public boolean send(org.zeromq.ZMsg, boolean) ,public boolean send(java.lang.String) ,public boolean send(java.lang.String, boolean) ,public boolean sign() <variables>private final non-sealed org.zeromq.ZAgent agent,private final org.zeromq.ZStar.Plateau plateau