Class SocketBase
java.lang.Object
zmq.ZObject
zmq.Own
zmq.SocketBase
- All Implemented Interfaces:
Pipe.IPipeEvents, IPollEvents
- Direct Known Subclasses:
Channel, Client, Dealer, Dish, Gather, Pair, Pull, Push, Radio, Router, Scatter, Server, Stream, XPub, XSub
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedSocketBase(Ctx parent, int tid, int sid) protectedSocketBase(Ctx parent, int tid, int sid, boolean threadSafe) -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanfinal voidcancel(AtomicBoolean canceled) final voidclose()final booleanfinal intconnectPeer(String addr) protected voiddestroy()booleandisconnectPeer(int routingId) final interrno()final voideventAccepted(String addr, SelectableChannel ch) final voideventAcceptFailed(String addr, int errno) final voideventBindFailed(String addr, int errno) final voideventClosed(String addr, SelectableChannel ch) final voideventCloseFailed(String addr, int errno) final voideventConnectDelayed(String addr, int errno) final voideventConnected(String addr, SelectableChannel ch) final voideventConnectRetried(String addr, int interval) final voideventDisconnected(String addr, SelectableChannel ch) final voideventHandshakeFailedAuth(String addr, int errno) final voideventHandshakeFailedNoDetail(String addr, int errno) final voideventHandshakeFailedProtocol(String addr, int errno) final voideventHandshaken(String addr, int zmtpVersion) final voideventHandshakeSucceeded(String addr, int errno) final voideventListening(String addr, SelectableChannel ch) protected Blobfinal SelectableChannelgetFD()final intgetSocketOpt(int option) final ObjectgetSocketOptx(int option) final voidfinal voidinEvent()Called by I/O thread when file descriptor is ready for reading.final booleanfinal booleanfinal booleanRegister the address for a monitor.protected final voidmonitorEvent(ZMQ.Event event) final voidpipeTerminated(Pipe pipe) final intpoll(int interest, int timeout, AtomicBoolean canceled) protected final voidprocessBind(Pipe pipe) protected final voidprotected final voidprotected final voidprocessTerm(int linger) final voidreadActivated(Pipe pipe) final Msgrecv(int flags) final Msgrecv(int flags, AtomicBoolean canceled) final booleanfinal booleansend(Msg msg, int flags, AtomicBoolean canceled) final booleansetSocketOpt(int option, Object optval) final booleantermEndpoint(String addr) toString()final voidwriteActivated(Pipe pipe) protected abstract voidxattachPipe(Pipe pipe, boolean subscribe2all, boolean isLocallyInitiated) protected booleanxdisconnectPeer(int routingId) protected booleanxhasIn()protected booleanxhasOut()protected voidprotected booleanprotected booleanprotected abstract voidxpipeTerminated(Pipe pipe) protected voidxreadActivated(Pipe pipe) protected Msgxrecv()protected booleanprotected booleanxsetsockopt(int option, Object optval) protected voidxwriteActivated(Pipe pipe) Methods inherited from class Own
incSeqnum, isTerminating, launchChild, processOwn, processSeqnum, processTermAck, processTermReq, termChild, terminateMethods inherited from class ZObject
chooseIoThread, connectPending, destroySocket, findEndpoint, getCtx, getTid, pendConnection, processActivateRead, processActivateWrite, processAttach, processCancel, processHiccup, processPipeTerm, processPipeTermAck, processPlug, processReap, processReapAck, processReaped, registerEndpoint, sendActivateRead, sendActivateWrite, sendAttach, sendAttach, sendBind, sendBind, sendCancel, sendDone, sendHiccup, sendInprocConnected, sendOwn, sendPipeTerm, sendPipeTermAck, sendPlug, sendPlug, sendReap, sendReapAck, sendReaped, sendStop, sendTerm, sendTermAck, sendTermReq, setTid, unregisterEndpoint, unregisterEndpointsMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface IPollEvents
acceptEvent, connectEvent, outEvent, timerEvent
-
Field Details
-
connectRid
-
-
Constructor Details
-
SocketBase
-
SocketBase
-
-
Method Details
-
xattachPipe
-
xpipeTerminated
-
destroy
-
setSocketOpt
-
getSocketOpt
public final int getSocketOpt(int option) -
getSocketOptx
-
bind
-
connect
-
connectPeer
-
disconnectPeer
public boolean disconnectPeer(int routingId) -
termEndpoint
-
send
-
send
-
recv
-
recv
-
join
-
leave
-
cancel
-
poll
-
close
public final void close() -
processStop
protected final void processStop()- Overrides:
processStopin classZObject
-
processBind
- Overrides:
processBindin classZObject
-
processTerm
protected final void processTerm(int linger) - Overrides:
processTermin classOwn
-
processDestroy
protected final void processDestroy()- Overrides:
processDestroyin classOwn
-
xsetsockopt
-
xhasOut
protected boolean xhasOut() -
xsend
-
xhasIn
protected boolean xhasIn() -
xrecv
-
getCredential
-
xreadActivated
-
xwriteActivated
-
xhiccuped
-
xjoin
-
xleave
-
xdisconnectPeer
protected boolean xdisconnectPeer(int routingId) -
inEvent
public final void inEvent()Description copied from interface:IPollEventsCalled by I/O thread when file descriptor is ready for reading.- Specified by:
inEventin interfaceIPollEvents
-
readActivated
- Specified by:
readActivatedin interfacePipe.IPipeEvents
-
writeActivated
- Specified by:
writeActivatedin interfacePipe.IPipeEvents
-
hiccuped
- Specified by:
hiccupedin interfacePipe.IPipeEvents
-
pipeTerminated
- Specified by:
pipeTerminatedin interfacePipe.IPipeEvents
-
monitor
Register the address for a monitor. It must be a inproc PAIR.- Parameters:
addr- or null for unregister.events- an event mask to monitor.- Returns:
- true if creation succeeded.
- Throws:
IllegalStateException- if a previous monitor was already registered.
-
eventHandshaken
-
eventConnected
-
eventConnectDelayed
-
eventConnectRetried
-
eventListening
-
eventBindFailed
-
eventAccepted
-
eventAcceptFailed
-
eventClosed
-
eventCloseFailed
-
eventDisconnected
-
eventHandshakeFailedNoDetail
-
eventHandshakeFailedProtocol
-
eventHandshakeFailedAuth
-
eventHandshakeSucceeded
-
monitorEvent
-
toString
-
getFD
-
typeString
-
errno
public final int errno()
-