Interface Query

All Superinterfaces:
Object

public interface Query extends Object
Finds well-known Ice objects registered with the IceGrid registry.
  • Method Details

    • findObjectById

      ObjectPrx findObjectById(Identity id, Current current)
      Finds a well-known object by identity.
      Parameters:
      id - The identity.
      current - The Current object of the incoming request.
      Returns:
      A proxy to the well-known object, or null if no such object is registered.
    • findObjectByType

      ObjectPrx findObjectByType(String type, Current current)
      Finds a well-known object by type. If there are several objects registered for the given type, the object is randomly selected.
      Parameters:
      type - The object type.
      current - The Current object of the incoming request.
      Returns:
      A proxy to a well-known object with the specified type, or null if no such object is registered.
    • findObjectByTypeOnLeastLoadedNode

      ObjectPrx findObjectByTypeOnLeastLoadedNode(String type, LoadSample sample, Current current)
      Finds a well-known object by type on the least-loaded node. If the registry does not know which node hosts the object (for example, because the object was registered with a direct proxy), the registry assumes the object is hosted on a node that has a load average of 1.0.
      Parameters:
      type - The object type.
      sample - The sampling interval.
      current - The Current object of the incoming request.
      Returns:
      A proxy to the well-known object, or null if no such object is registered.
    • findAllObjectsByType

      ObjectPrx[] findAllObjectsByType(String type, Current current)
      Finds all the well-known objects with the given type.
      Parameters:
      type - The object type.
      current - The Current object of the incoming request.
      Returns:
      A list of proxies to the well-known objects with the specified type. Can be empty.
    • findAllReplicas

      ObjectPrx[] findAllReplicas(ObjectPrx proxy, Current current)
      Finds all the replicas of a well-known object.
      Parameters:
      proxy - A proxy that identifies the well-known object.
      current - The Current object of the incoming request.
      Returns:
      A list of proxies to the replicas of the well-known object specified by proxy. Can be empty.
    • ice_staticId

      static String ice_staticId()
      Gets the type ID of the associated Slice interface.
      Returns:
      the string "::IceGrid::Query"
    • 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.