Interface Router

All Superinterfaces:
Object, Router

public interface Router extends Router
The Glacier2 specialization of the Ice::Router interface.
  • Method Details

    • getCategoryForClient

      String getCategoryForClient(Current current)
      This category must be used in the identities of all of the client's callback objects. This is necessary in order for the router to forward callback requests to the intended client. If the Glacier2 server endpoints are not set, the returned category is an empty string.
      Parameters:
      current - The Current object for the invocation.
      Returns:
      The category.
    • createSessionAsync

      CompletionStage<SessionPrx> createSessionAsync(String userId, String password, Current current) throws CannotCreateSessionException, PermissionDeniedException
      Create a per-client session with the router. If a SessionManager has been installed, a proxy to a Session object is returned to the client. Otherwise, null is returned and only an internal session (i.e., not visible to the client) is created. If a session proxy is returned, it must be configured to route through the router that created it. This will happen automatically if the router is configured as the client's default router at the time the session proxy is created in the client process, otherwise the client must configure the session proxy explicitly.
      Parameters:
      userId - The user id for which to check the password.
      password - The password for the given user id.
      current - The Current object for the invocation.
      Returns:
      A proxy for the newly created session, or null if no SessionManager has been installed.
      Throws:
      CannotCreateSessionException - Raised if the session cannot be created.
      PermissionDeniedException - Raised if the password for the given user id is not correct, or if the user is not allowed access.
      See Also:
    • createSessionFromSecureConnectionAsync

      CompletionStage<SessionPrx> createSessionFromSecureConnectionAsync(Current current) throws CannotCreateSessionException, PermissionDeniedException
      Create a per-client session with the router. The user is authenticated through the SSL certificates that have been associated with the connection. If a SessionManager has been installed, a proxy to a Session object is returned to the client. Otherwise, null is returned and only an internal session (i.e., not visible to the client) is created. If a session proxy is returned, it must be configured to route through the router that created it. This will happen automatically if the router is configured as the client's default router at the time the session proxy is created in the client process, otherwise the client must configure the session proxy explicitly.
      Parameters:
      current - The Current object for the invocation.
      Returns:
      A proxy for the newly created session, or null if no SessionManager has been installed.
      Throws:
      CannotCreateSessionException - Raised if the session cannot be created.
      PermissionDeniedException - Raised if the user cannot be authenticated or if the user is not allowed access.
      See Also:
    • refreshSessionAsync

      CompletionStage<Void> refreshSessionAsync(Current current) throws SessionNotExistException
      Keep the calling client's session with this router alive.
      Parameters:
      current - The Current object for the invocation.
      Returns:
      A completion stage that the servant will complete when the invocation completes.
      Throws:
      SessionNotExistException - Raised if no session exists for the calling client.
    • destroySession

      void destroySession(Current current) throws SessionNotExistException
      Destroy the calling client's session with this router.
      Parameters:
      current - The Current object for the invocation.
      Throws:
      SessionNotExistException - Raised if no session exists for the calling client.
    • getSessionTimeout

      long getSessionTimeout(Current current)
      Get the value of the session timeout. Sessions are destroyed if they see no activity for this period of time.
      Parameters:
      current - The Current object for the invocation.
      Returns:
      The timeout (in seconds).
    • getACMTimeout

      int getACMTimeout(Current current)
      Get the value of the ACM timeout. Clients supporting connection heartbeats can enable them instead of explicitly sending keep alives requests. NOTE: This method is only available since Ice 3.6.
      Parameters:
      current - The Current object for the invocation.
      Returns:
      The timeout (in seconds).
    • ice_ids

      default String[] ice_ids(Current current)
      Description copied from interface: Object
      Returns the Slice type IDs of the interfaces supported by this object.
      Specified by:
      ice_ids in interface Object
      Specified by:
      ice_ids in interface Router
      Parameters:
      current - The Current object for the invocation.
      Returns:
      The Slice type IDs of the interfaces supported by this object, in base-to-derived order. The first element of the returned array is always ::Ice::Object.
    • ice_id

      default String ice_id(Current current)
      Description copied from interface: Object
      Returns the Slice type ID of the most-derived interface supported by this object.
      Specified by:
      ice_id in interface Object
      Specified by:
      ice_id in interface Router
      Parameters:
      current - The Current object for the invocation.
      Returns:
      The Slice type ID of the most-derived interface.
    • ice_staticId

      static String ice_staticId()
      Description copied from interface: Object
      Returns the Slice type ID of the interface supported by this object.
      Returns:
      The return value is always ::Ice::Object.