Package com.zeroc.Ice

Interface Locator

All Superinterfaces:
Object
All Known Subinterfaces:
Locator

public interface Locator extends Object
Client applications use the Locator object to resolve Ice indirect proxies. This object also allows server applications to retrieve a proxy to the associated LocatorRegistryPrx object where they can register their object adapters.
  • Method Details

    • findObjectByIdAsync

      CompletionStage<ObjectPrx> findObjectByIdAsync(Identity id, Current current) throws ObjectNotFoundException
      Finds an object by identity and returns a dummy proxy with the endpoint(s) that can be used to reach this object. This dummy proxy may be an indirect proxy that requires further resolution using LocatorPrx.findAdapterById(java.lang.String).
      Parameters:
      id - The identity.
      current - The Current object of the incoming request.
      Returns:
      A dummy proxy, or null if an object with the requested identity was not found.
      Throws:
      ObjectNotFoundException - Thrown when an object with the requested identity was not found. The caller should treat this exception like a null return value.
    • findAdapterByIdAsync

      CompletionStage<ObjectPrx> findAdapterByIdAsync(String id, Current current) throws AdapterNotFoundException
      Finds an object adapter by adapter ID and returns a dummy proxy with the object adapter's endpoint(s).
      Parameters:
      id - The adapter ID.
      current - The Current object of the incoming request.
      Returns:
      A dummy proxy with the adapter's endpoints, or null if an object adapter with id was not found.
      Throws:
      AdapterNotFoundException - Thrown when an object adapter with this adapter ID was not found. The caller should treat this exception like a null return value.
    • getRegistry

      LocatorRegistryPrx getRegistry(Current current)
      Gets a proxy to the locator registry.
      Parameters:
      current - The Current object of the incoming request.
      Returns:
      A proxy to the locator registry, or null if this locator has no associated registry.
    • ice_staticId

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