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 class
private static class
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate boolean
protected String
private boolean
private boolean
private final MultiMap<String,
SocketBase.EndpointPipe> private SocketChannel
private Poller.Handle
private long
private final Mailbox
private int
private SocketBase
private final ReentrantLock
private Poller
private boolean
private int
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate void
addEndpoint
(String addr, Own endpoint, Pipe pipe) private void
attachPipe
(Pipe pipe, boolean isLocallyInitiated) private void
attachPipe
(Pipe pipe, boolean subscribe2all, boolean isLocallyInitiated) final boolean
private void
private NetProtocol
checkProtocol
(String protocol) final void
close()
final boolean
protected void
destroy()
final int
errno()
private void
final void
eventAccepted
(String addr, SelectableChannel ch) final void
eventAcceptFailed
(String addr, int errno) final void
eventBindFailed
(String addr, int errno) final void
eventClosed
(String addr, SelectableChannel ch) final void
eventCloseFailed
(String addr, int errno) final void
eventConnectDelayed
(String addr, int errno) final void
eventConnected
(String addr, SelectableChannel ch) final void
eventConnectRetried
(String addr, int interval) final void
eventDisconnected
(String addr, SelectableChannel ch) final void
eventHandshaken
(String addr, int zmtpVersion) final void
eventListening
(String addr, SelectableChannel ch) private void
extractFlags
(Msg msg) protected Blob
final SelectableChannel
getFD()
(package private) final Mailbox
final int
getSocketOpt
(int option) final Object
getSocketOptx
(int option) (package private) final boolean
hasIn()
(package private) final boolean
hasOut()
final void
final void
inEvent()
Called by I/O thread when file descriptor is ready for reading.(package private) boolean
isActive()
final boolean
protected final void
monitorEvent
(ZMQ.Event event) final void
pipeTerminated
(Pipe pipe) protected final void
processBind
(Pipe pipe) private boolean
processCommands
(int timeout, boolean throttle) protected final void
protected final void
protected final void
processTerm
(int linger) final void
readActivated
(Pipe pipe) final Msg
recv
(int flags) final boolean
final boolean
setSocketOpt
(int option, Object optval) (package private) final void
startReaping
(Poller poller) (package private) final void
stop()
private void
final boolean
termEndpoint
(String addr) toString()
final void
writeActivated
(Pipe pipe) protected abstract void
xattachPipe
(Pipe pipe, boolean subscribe2all, boolean isLocallyInitiated) protected boolean
xhasIn()
protected boolean
xhasOut()
protected void
protected abstract void
xpipeTerminated
(Pipe pipe) protected void
xreadActivated
(Pipe pipe) protected Msg
xrecv()
protected boolean
protected boolean
xsetsockopt
(int option, Object optval) protected void
xwriteActivated
(Pipe pipe) Methods inherited from class zmq.Own
incSeqnum, isTerminating, launchChild, processOwn, processSeqnum, processTermAck, processTermReq, registerTermAcks, termChild, terminate, unregisterTermAck
Methods 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, 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 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:
processStop
in classZObject
-
processBind
- Overrides:
processBind
in classZObject
-
processTerm
protected final void processTerm(int linger) - Overrides:
processTerm
in classOwn
-
processDestroy
protected final void processDestroy()- Overrides:
processDestroy
in 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:IPollEvents
Called by I/O thread when file descriptor is ready for reading.- Specified by:
inEvent
in interfaceIPollEvents
-
checkDestroy
private void checkDestroy() -
readActivated
- Specified by:
readActivated
in interfacePipe.IPipeEvents
-
writeActivated
- Specified by:
writeActivated
in interfacePipe.IPipeEvents
-
hiccuped
- Specified by:
hiccuped
in interfacePipe.IPipeEvents
-
pipeTerminated
- Specified by:
pipeTerminated
in 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()
-