class Pub extends XPub
{
    public Pub(Ctx parent, int tid, int sid)
    {
        super(parent, tid, sid);
        options.type = ZMQ.ZMQ_PUB;
    }

    @Override
    protected void xattachPipe(Pipe pipe, boolean subscribeToAll, boolean isLocallyInitiated)
    {<FILL_FUNCTION_BODY>}

    @Override
    protected Msg xrecv()
    {
        errno.set(ZError.ENOTSUP);
        //  Messages cannot be received from PUB socket.
        throw new UnsupportedOperationException();
    }

    @Override
    protected boolean xhasIn()
    {
        return false;
    }
}

        assert (pipe != null);

        //  Don't delay pipe termination as there is no one
        //  to receive the delimiter.
        pipe.setNoDelay();

        super.xattachPipe(pipe, subscribeToAll, isLocallyInitiated);
    
<methods>public void <init>(zmq.Ctx, int, int) ,public boolean xsetsockopt(int, java.lang.Object) <variables>private final non-sealed zmq.socket.pubsub.Dist dist,private zmq.pipe.Pipe lastPipe,private boolean lossy,private boolean manual,private final non-sealed zmq.socket.pubsub.Mtrie manualSubscriptions,private static final zmq.socket.pubsub.Mtrie.IMtrieHandler markAsMatching,private boolean more,private final non-sealed Deque<zmq.util.Blob> pendingData,private final non-sealed Deque<java.lang.Integer> pendingFlags,private final non-sealed Deque<zmq.pipe.Pipe> pendingPipes,private static final zmq.socket.pubsub.Mtrie.IMtrieHandler sendUnsubscription,private final non-sealed zmq.socket.pubsub.Mtrie subscriptions,private boolean verboseSubs,private boolean verboseUnsubs