Package zmq
Class SocketBase
java.lang.Object
zmq.ZObject
zmq.Own
zmq.SocketBase
- All Implemented Interfaces:
Pipe.IPipeEvents,IPollEvents
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static classprivate static class -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanprotected Stringprivate booleanprivate booleanprivate final MultiMap<String, SocketBase.EndpointPipe> private SocketChannelprivate Poller.Handleprivate longprivate final Mailboxprivate intprivate SocketBaseprivate final ReentrantLockprivate Pollerprivate booleanprivate int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidaddEndpoint(String addr, Own endpoint, Pipe pipe) private voidattachPipe(Pipe pipe, boolean isLocallyInitiated) private voidattachPipe(Pipe pipe, boolean subscribe2all, boolean isLocallyInitiated) final booleanprivate voidprivate NetProtocolcheckProtocol(String protocol) final voidclose()final booleanprotected voiddestroy()final interrno()private voidfinal 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 voideventHandshaken(String addr, int zmtpVersion) final voideventListening(String addr, SelectableChannel ch) private voidextractFlags(Msg msg) protected Blobfinal SelectableChannelgetFD()(package private) final Mailboxfinal intgetSocketOpt(int option) final ObjectgetSocketOptx(int option) (package private) final booleanhasIn()(package private) final booleanhasOut()final voidfinal voidinEvent()Called by I/O thread when file descriptor is ready for reading.(package private) booleanisActive()final booleanprotected final voidmonitorEvent(ZMQ.Event event) final voidpipeTerminated(Pipe pipe) protected final voidprocessBind(Pipe pipe) private booleanprocessCommands(int timeout, boolean throttle) protected final voidprotected final voidprotected final voidprocessTerm(int linger) final voidreadActivated(Pipe pipe) final Msgrecv(int flags) final booleanfinal booleansetSocketOpt(int option, Object optval) (package private) final voidstartReaping(Poller poller) (package private) final voidstop()private voidfinal booleantermEndpoint(String addr) toString()final voidwriteActivated(Pipe pipe) protected abstract voidxattachPipe(Pipe pipe, boolean subscribe2all, boolean isLocallyInitiated) protected booleanxhasIn()protected booleanxhasOut()protected voidprotected 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 zmq.Own
incSeqnum, isTerminating, launchChild, processOwn, processSeqnum, processTermAck, processTermReq, registerTermAcks, termChild, terminate, unregisterTermAckMethods inherited from class zmq.ZObject
chooseIoThread, connectPending, destroySocket, findEndpoint, getCtx, getTid, pendConnection, processActivateRead, processActivateWrite, processAttach, processCommand, 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, unregisterEndpointsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface zmq.poll.IPollEvents
acceptEvent, connectEvent, outEvent, timerEvent
-
Field Details
-
endpoints
-
inprocs
-
active
private boolean active -
ctxTerminated
private boolean ctxTerminated -
destroyed
private boolean destroyed -
mailbox
-
pipes
-
poller
-
handle
-
lastTsc
private long lastTsc -
ticks
private int ticks -
rcvmore
private boolean rcvmore -
fileDesc
-
monitorSocket
-
monitorEvents
private int monitorEvents -
connectRid
-
monitorSync
-
-
Constructor Details
-
SocketBase
-
-
Method Details
-
xattachPipe
-
xpipeTerminated
-
isActive
boolean isActive()- Returns:
- false if object is not a socket.
-
destroy
protected void destroy() -
getMailbox
-
stop
final void stop() -
checkProtocol
-
attachPipe
-
attachPipe
-
setSocketOpt
-
getSocketOpt
public final int getSocketOpt(int option) -
getSocketOptx
-
bind
-
connect
-
addEndpoint
-
termEndpoint
-
send
-
recv
-
close
public final void close() -
hasIn
final boolean hasIn() -
hasOut
final boolean hasOut() -
startReaping
-
processCommands
private boolean processCommands(int timeout, boolean throttle) -
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
-
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
-
checkDestroy
private void checkDestroy() -
readActivated
- Specified by:
readActivatedin interfacePipe.IPipeEvents
-
writeActivated
- Specified by:
writeActivatedin interfacePipe.IPipeEvents
-
hiccuped
- Specified by:
hiccupedin interfacePipe.IPipeEvents
-
pipeTerminated
- Specified by:
pipeTerminatedin interfacePipe.IPipeEvents
-
extractFlags
-
monitor
-
eventHandshaken
-
eventConnected
-
eventConnectDelayed
-
eventConnectRetried
-
eventListening
-
eventBindFailed
-
eventAccepted
-
eventAcceptFailed
-
eventClosed
-
eventCloseFailed
-
eventDisconnected
-
event
-
monitorEvent
-
stopMonitor
private void stopMonitor() -
toString
-
getFD
-
typeString
-
errno
public final int errno()
-