Class ZProxy.Proxy.SimpleProxy
java.lang.Object
org.zeromq.ZProxy.Proxy.SimpleProxy
- All Implemented Interfaces:
ZProxy.Proxy
- Enclosing interface:
ZProxy.Proxy
-
Nested Class Summary
Nested classes/interfaces inherited from interface ZProxy.Proxy
ZProxy.Proxy.SimpleProxy -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanconfigure(ZMQ.Socket pipe, ZMsg cfg, ZMQ.Socket frontend, ZMQ.Socket backend, ZMQ.Socket capture, Object... args) Configures the proxy with a custom message.booleancustom(ZMQ.Socket pipe, String cmd, ZMQ.Socket frontend, ZMQ.Socket backend, ZMQ.Socket capture, Object... args) Handles a custom command not recognized by the proxy.booleanrestart(ZMsg cfg, ZMQ.Socket socket, ZProxy.Plug place, Object... args) Performs a hot restart of the given socket.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ZProxy.Proxy
configure, create
-
Constructor Details
-
SimpleProxy
public SimpleProxy()
-
-
Method Details
-
restart
public boolean restart(ZMsg cfg, ZMQ.Socket socket, ZProxy.Plug place, Object... args) throws IOException Description copied from interface:ZProxy.ProxyPerforms a hot restart of the given socket. Usually an unbind/bind but you can use whatever method you like.- Specified by:
restartin interfaceZProxy.Proxy- Parameters:
cfg- the custom configuration message sent by the control.socket- the socket to hot restartplace- the position for the socket in the proxyargs- the optional array of arguments that has been passed at the creation of the ZProxy.- Returns:
- true to perform a cold restart instead, false to do nothing. All the results will be collected from calls for all plugs. If any of them returns true, the cold restart is performed.
- Throws:
IOException
-
configure
public boolean configure(ZMQ.Socket pipe, ZMsg cfg, ZMQ.Socket frontend, ZMQ.Socket backend, ZMQ.Socket capture, Object... args) Description copied from interface:ZProxy.ProxyConfigures the proxy with a custom message. Note: you need to send one (1) mandatory custom response message with the pipe before the end of this call.- Specified by:
configurein interfaceZProxy.Proxy- Parameters:
pipe- the control pipecfg- the custom configuration message sent by the controlfrontend- the frontend socketbackend- the backend socketcapture- the optional capture socketargs- the optional array of arguments that has been passed at the creation of the ZProxy.- Returns:
- true to continue the proxy, false to exit
-
custom
public boolean custom(ZMQ.Socket pipe, String cmd, ZMQ.Socket frontend, ZMQ.Socket backend, ZMQ.Socket capture, Object... args) Description copied from interface:ZProxy.ProxyHandles a custom command not recognized by the proxy. Note: you need to send the current state at the end of the call.- Specified by:
customin interfaceZProxy.Proxy- Parameters:
pipe- the control pipecmd- the unrecognized commandfrontend- the frontend socketbackend- the backend socketcapture- the optional capture socketargs- the optional array of arguments that has been passed at the creation of the ZProxy.- Returns:
- true to continue the proxy, false to exit
-