Package com.zeroc.Ice

Interface Router

All Superinterfaces:
Object
All Known Subinterfaces:
Router

public interface Router extends Object
Represents an intermediary object that routes requests and replies between clients and Ice objects that are not directly reachable from these clients.
  • Method Details

    • getClientProxy

      Router.GetClientProxyResult getClientProxy(Current current)
      Gets the router's client proxy, i.e. the proxy to use for forwarding requests from the client to the router. If a null proxy is returned, the client will forward requests to the router's endpoints.

      Remarks: Introduced in Ice 3.7.

      Parameters:
      current - The Current object of the incoming request.
      Returns:
      An instance of Router.GetClientProxyResult.
    • getServerProxy

      ObjectPrx getServerProxy(Current current)
      Gets the router's server proxy, i.e. the proxy to use for forwarding requests from the server to the router. The Ice runtime uses the endpoints of this proxy as the published endpoints of bi-dir object adapters.
      Parameters:
      current - The Current object of the incoming request.
      Returns:
      The router's server proxy.
    • addProxies

      ObjectPrx[] addProxies(ObjectPrx[] proxies, Current current)
      Adds new proxy information to the router's routing table.
      Parameters:
      proxies - The proxies to add. Adding a null proxy is an error.
      current - The Current object of the incoming request.
      Returns:
      Proxies discarded by the router. These proxies are all non-null.
    • ice_staticId

      static String ice_staticId()
      Gets the type ID of the associated Slice interface.
      Returns:
      the string "::Ice::Router"
    • dispatch

      default CompletionStage<OutgoingResponse> dispatch(IncomingRequest request) throws UserException
      Dispatches an incoming request to one of the methods of this generated interface, based on the operation name carried by the request.
      Specified by:
      dispatch in interface Object
      Parameters:
      request - the incoming request
      Returns:
      the outgoing response
      Throws:
      UserException - if a UserException is thrown, Ice will marshal it as the response payload.