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 Object implements ZProxy.Proxy
  • 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.Proxy
      Performs a hot restart of the given socket. Usually an unbind/bind but you can use whatever method you like.
      Specified by:
      restart in interface ZProxy.Proxy
      Parameters:
      cfg - the custom configuration message sent by the control.
      socket - the socket to hot restart
      place - the position for the socket in the proxy
      args - 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.Proxy
      Configures 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:
      configure in interface ZProxy.Proxy
      Parameters:
      pipe - the control pipe
      cfg - the custom configuration message sent by the control
      frontend - the frontend socket
      backend - the backend socket
      capture - the optional capture socket
      args - 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.Proxy
      Handles a custom command not recognized by the proxy. Note: you need to send the current state at the end of the call.
      Specified by:
      custom in interface ZProxy.Proxy
      Parameters:
      pipe - the control pipe
      cmd - the unrecognized command
      frontend - the frontend socket
      backend - the backend socket
      capture - the optional capture socket
      args - the optional array of arguments that has been passed at the creation of the ZProxy.
      Returns:
      true to continue the proxy, false to exit