Package zmq.socket.pubsub
Class XSub
- java.lang.Object
-
- zmq.ZObject
-
- zmq.Own
-
- zmq.SocketBase
-
- zmq.socket.pubsub.XSub
-
- All Implemented Interfaces:
Pipe.IPipeEvents
,IPollEvents
- Direct Known Subclasses:
Sub
public class XSub extends SocketBase
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private class
XSub.SendSubscription
-
Field Summary
Fields Modifier and Type Field Description private Dist
dist
private FQ
fq
private boolean
hasMessage
private Msg
message
private boolean
more
private Trie.ITrieHandler
sendSubscription
private Trie
subscriptions
-
Fields inherited from class zmq.SocketBase
connectRid
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Blob
getCredential()
private boolean
match(Msg msg)
private boolean
sendSubscription(byte[] data, int size, Pipe pipe)
protected void
xattachPipe(Pipe pipe, boolean subscribe2all, boolean isLocallyInitiated)
protected boolean
xhasIn()
protected boolean
xhasOut()
protected void
xhiccuped(Pipe pipe)
protected void
xpipeTerminated(Pipe pipe)
protected void
xreadActivated(Pipe pipe)
protected Msg
xrecv()
protected boolean
xsend(Msg msg)
protected void
xwriteActivated(Pipe pipe)
-
Methods inherited from class zmq.SocketBase
bind, close, connect, destroy, errno, eventAccepted, eventAcceptFailed, eventBindFailed, eventClosed, eventCloseFailed, eventConnectDelayed, eventConnected, eventConnectRetried, eventDisconnected, eventHandshaken, eventListening, getFD, getSocketOpt, getSocketOptx, hiccuped, inEvent, monitor, monitorEvent, pipeTerminated, processBind, processDestroy, processStop, processTerm, readActivated, recv, send, setSocketOpt, termEndpoint, toString, typeString, writeActivated, xsetsockopt
-
Methods inherited from class zmq.Own
incSeqnum, isTerminating, launchChild, processOwn, processSeqnum, processTermAck, processTermReq, termChild, terminate
-
Methods inherited from class zmq.ZObject
chooseIoThread, connectPending, destroySocket, findEndpoint, getCtx, getTid, pendConnection, processActivateRead, processActivateWrite, processAttach, processHiccup, processPipeTerm, processPipeTermAck, processPlug, processReap, processReaped, registerEndpoint, sendActivateRead, sendActivateWrite, sendAttach, sendAttach, sendBind, sendBind, sendDone, sendHiccup, sendInprocConnected, sendOwn, sendPipeTerm, sendPipeTermAck, sendPlug, sendPlug, sendReap, sendReaped, sendStop, sendTerm, sendTermAck, sendTermReq, setTid, unregisterEndpoint, unregisterEndpoints
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface zmq.poll.IPollEvents
acceptEvent, connectEvent, outEvent, timerEvent
-
-
-
-
Field Detail
-
fq
private final FQ fq
-
dist
private final Dist dist
-
subscriptions
private final Trie subscriptions
-
hasMessage
private boolean hasMessage
-
message
private Msg message
-
more
private boolean more
-
sendSubscription
private final Trie.ITrieHandler sendSubscription
-
-
Constructor Detail
-
XSub
public XSub(Ctx parent, int tid, int sid)
-
-
Method Detail
-
xattachPipe
protected void xattachPipe(Pipe pipe, boolean subscribe2all, boolean isLocallyInitiated)
- Specified by:
xattachPipe
in classSocketBase
-
xreadActivated
protected void xreadActivated(Pipe pipe)
- Overrides:
xreadActivated
in classSocketBase
-
xwriteActivated
protected void xwriteActivated(Pipe pipe)
- Overrides:
xwriteActivated
in classSocketBase
-
xpipeTerminated
protected void xpipeTerminated(Pipe pipe)
- Specified by:
xpipeTerminated
in classSocketBase
-
xhiccuped
protected void xhiccuped(Pipe pipe)
- Overrides:
xhiccuped
in classSocketBase
-
xsend
protected boolean xsend(Msg msg)
- Overrides:
xsend
in classSocketBase
-
xhasOut
protected boolean xhasOut()
- Overrides:
xhasOut
in classSocketBase
-
xrecv
protected Msg xrecv()
- Overrides:
xrecv
in classSocketBase
-
xhasIn
protected boolean xhasIn()
- Overrides:
xhasIn
in classSocketBase
-
getCredential
protected Blob getCredential()
- Overrides:
getCredential
in classSocketBase
-
match
private boolean match(Msg msg)
-
sendSubscription
private boolean sendSubscription(byte[] data, int size, Pipe pipe)
-
-