Package org.zeromq
Class ZProxy.Proxy.SimpleProxy
- java.lang.Object
-
- org.zeromq.ZProxy.Proxy.SimpleProxy
-
- All Implemented Interfaces:
ZProxy.Proxy
- Enclosing interface:
- ZProxy.Proxy
public abstract static class ZProxy.Proxy.SimpleProxy extends java.lang.Object implements ZProxy.Proxy
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.zeromq.ZProxy.Proxy
ZProxy.Proxy.SimpleProxy
-
-
Constructor Summary
Constructors Constructor Description SimpleProxy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanconfigure(ZMQ.Socket pipe, ZMsg cfg, ZMQ.Socket frontend, ZMQ.Socket backend, ZMQ.Socket capture, java.lang.Object... args)Configures the proxy with a custom message.booleancustom(ZMQ.Socket pipe, java.lang.String cmd, ZMQ.Socket frontend, ZMQ.Socket backend, ZMQ.Socket capture, java.lang.Object... args)Handles a custom command not recognized by the proxy.booleanrestart(ZMsg cfg, ZMQ.Socket socket, ZProxy.Plug place, java.lang.Object... args)Performs a hot restart of the given socket.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.zeromq.ZProxy.Proxy
configure, create
-
-
-
-
Method Detail
-
restart
public boolean restart(ZMsg cfg, ZMQ.Socket socket, ZProxy.Plug place, java.lang.Object... args) throws java.io.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:
java.io.IOException
-
configure
public boolean configure(ZMQ.Socket pipe, ZMsg cfg, ZMQ.Socket frontend, ZMQ.Socket backend, ZMQ.Socket capture, java.lang.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, java.lang.String cmd, ZMQ.Socket frontend, ZMQ.Socket backend, ZMQ.Socket capture, java.lang.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
-
-