//
// Copyright (c) ZeroC, Inc. All rights reserved.
//
//
// Ice version 3.7.11
//
//
//
// Generated from file `ServantLocator.ice'
//
// Warning: do not edit this file.
//
//
//
export namespace Ice
{
/**
* A servant locator is called by an object adapter to
* locate a servant that is not found in its active servant map.
* @see ObjectAdapter
* @see ObjectAdapter#addServantLocator
* @see ObjectAdapter#findServantLocator
*/
interface ServantLocator
{
/**
* Called before a request is dispatched if a
* servant cannot be found in the object adapter's active servant
* map. Note that the object adapter does not automatically insert
* the returned servant into its active servant map. This must be
* done by the servant locator implementation, if this is desired.
*
* locate can throw any user exception. If it does, that exception
* is marshaled back to the client. If the Slice definition for the
* corresponding operation includes that user exception, the client
* receives that user exception; otherwise, the client receives
* {@link UnknownUserException}.
*
* If locate throws any exception, the Ice run time does not
* call finished.
*
*
If you call locate from your own code, you
* must also call finished when you have finished using the
* servant, provided that locate returned a non-null servant;
* otherwise, you will get undefined behavior if you use
* servant locators such as the Freeze Evictor.
* @param curr Information about the current operation for which
* a servant is required.
* @param cookie A "cookie" that will be passed to finished.
* @return The located servant, or null if no suitable servant has
* been found.
* @throws UserException The implementation can raise a UserException
* and the run time will marshal it as the result of the invocation.
* @see ObjectAdapter
* @see Current
* @see #finished
*/
locate(curr:Current, cookie:Holder