Package com.ms.object
 In this topic

*Methods

 

Packages
  PreviousThis PackageNext
Package com.ms.object   Previous This
Package
Next

 


Interface IServiceObjectProvider

public interface IServiceObjectProvider
{
  // Methods
  public Object queryService(Object id) throws ServiceNotFoundException;
}

This interface defines a method that is used to request a service from an object.

Methods

queryService

public Object queryService(Object id) throws ServiceNotFoundException;

Requests a service from an object. The object that provides the service can be the current object or a different object.

To determine whether the object supports the requested service, a typical implementation would check to see if any of the following items are true:

  • The object is an instance of the requested service.
  • The object implements the requested service.
  • The object can construct or use another object that is an instance of or implements the requested service.

If the object does not support the requested service, it delegates the method call to an upper level object (such as a containing frame). Finally, if no object in the chain supports the requested service, a ServiceNotFoundException is thrown.

Return Value:

Returns the service object, if it is available.

ParameterDescription
id The identifier of the requested service.

Exceptions:

ServiceNotFoundException if no object supports the requested service.

upnrm.gif