com.ptc.core.meta.type.runtime.common
Class TypeBasedServiceProvider

java.lang.Object
  extended by com.ptc.core.meta.type.runtime.common.TypeBasedServiceProvider
All Implemented Interfaces:
Externalizable, Serializable, wt.services.applicationcontext.ApplicationContextChild

public final class TypeBasedServiceProvider
extends Object
implements wt.services.applicationcontext.ApplicationContextChild, Externalizable



Supported API: true

Extendable: false

See Also:
Serialized Form

Method Summary
static Object getService(Class service_class)
          Returns an implementation of a service object based upon the supplied arguments.
static Object getService(Class service_class, Object requestor)
          Returns an implementation of a service object based upon the supplied arguments.
static Object getService(Class service_class, String selector)
          Returns an implementation of a service object based upon the supplied arguments.
static Object getService(Class service_class, String selector, Object requestor)
          Returns an implementation of a service object based upon the supplied arguments.
static Object getService(String service_name)
          Returns an implementation of a service object based upon the supplied arguments.
static Object getService(String service_name, Object requestor)
          Returns an implementation of a service object based upon the supplied arguments.
static Object getService(String service_name, String selector)
          Returns an implementation of a service object based upon the supplied arguments.
static Object getService(String service_name, String selector, Object requestor)
          Returns an implementation of a service object based upon the supplied arguments.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getService

public static Object getService(Class service_class,
                                String selector,
                                Object requestor)
                         throws wt.services.applicationcontext.UnableToCreateServiceException
Returns an implementation of a service object based upon the supplied arguments.

Supported API: true

Parameters:
service_class - Class of the service that is desired. This is required. In typical usage, this is a java Interface the service object returned must implement. The lookup for the particular service implementer is refined by indicating a selector and/or a target object (requestor) that is in need of the service.
selector - A selector further qualifies the request for the service. It may also be used instead of a requestor object to request the service. This latter technique is used when a simple string can indicate which variant of the service is needed, rather than supplying a java class.
requestor - An object that is the target of the request for service. The typical meaning is the the requestor object needs the service. Java inheritance using the class of the requestor to help determine which service implementation is returned. If the requestor is a Class object, inheritance based upon the class that the requestor represents is used in the determination.
Returns:
Object
Throws:
wt.services.applicationcontext.UnableToCreateServiceException

getService

public static Object getService(Class service_class,
                                String selector)
                         throws wt.services.applicationcontext.UnableToCreateServiceException
Returns an implementation of a service object based upon the supplied arguments.

Supported API: true

Parameters:
service_class - Class of the service that is desired. This is required. In typical usage, this is a java Interface the service object returned must implement. The lookup for the particular service implementer is refined by indicating a selector and/or a target object (requestor) that is in need of the service.
selector - A selector further qualifies the request for the service. It may also be used instead of a requestor object to request the service. This latter technique is used when a simple string can indicate which variant of the service is needed, rather than supplying a java class.
Returns:
Object
Throws:
wt.services.applicationcontext.UnableToCreateServiceException

getService

public static Object getService(Class service_class,
                                Object requestor)
                         throws wt.services.applicationcontext.UnableToCreateServiceException
Returns an implementation of a service object based upon the supplied arguments.

Supported API: true

Parameters:
service_class - Class of the service that is desired. This is required. In typical usage, this is a java Interface the service object returned must implement. The lookup for the particular service implementer is refined by indicating a selector and/or a target object (requestor) that is in need of the service.
requestor - A selector further qualifies the request for the service. It may also be used instead of a requestor object to request the service. This latter technique is used when a simple string can indicate which variant of the service is needed, rather than supplying a java class.
Returns:
Object
Throws:
wt.services.applicationcontext.UnableToCreateServiceException

getService

public static Object getService(Class service_class)
                         throws wt.services.applicationcontext.UnableToCreateServiceException
Returns an implementation of a service object based upon the supplied arguments.

Supported API: true

Parameters:
service_class - Class of the service that is desired. This is required. In typical usage, this is a java Interface the service object returned must implement. The lookup for the particular service implementer is refined by indicating a selector and/or a target object (requestor) that is in need of the service.
Returns:
Object
Throws:
wt.services.applicationcontext.UnableToCreateServiceException

getService

public static Object getService(String service_name,
                                String selector,
                                Object requestor)
                         throws wt.services.applicationcontext.UnableToCreateServiceException
Returns an implementation of a service object based upon the supplied arguments.

Supported API: true

Parameters:
service_name - Name of the service that is desired. This is required. The lookup for the particular service implementer can be refined by indicating a selector and/or a target object (requestor) that is in need of the service.
selector - A selector further qualifies the request for the service. It may also be used instead of a requestor object to request the service. This latter technique is used when a simple string can indicate which variant of the service is needed, rather than supplying a java class.
requestor - An object that is the target of the request for service. The typical meaning is the the requestor object needs the service. Java inheritance using the class of the requestor to help determine which service implementation is returned. If the requestor is a Class object, inheritance based upon the class that the requestor represents is used in the determination.
Returns:
Object
Throws:
wt.services.applicationcontext.UnableToCreateServiceException

getService

public static Object getService(String service_name,
                                String selector)
                         throws wt.services.applicationcontext.UnableToCreateServiceException
Returns an implementation of a service object based upon the supplied arguments.

Supported API: true

Parameters:
service_name - Name of the service that is desired. This is required. The lookup for the particular service implementer can be refined by indicating a selector and/or a target object (requestor) that is in need of the service.
selector - A selector further qualifies the request for the service. It may also be used instead of a requestor object to request the service. This latter technique is used when a simple string can indicate which variant of the service is needed, rather than supplying a java class.
Returns:
Object
Throws:
wt.services.applicationcontext.UnableToCreateServiceException

getService

public static Object getService(String service_name,
                                Object requestor)
                         throws wt.services.applicationcontext.UnableToCreateServiceException
Returns an implementation of a service object based upon the supplied arguments.

Supported API: true

Parameters:
service_name - Name of the service that is desired. This is required. The lookup for the particular service implementer can be refined by indicating a selector and/or a target object (requestor) that is in need of the service.
requestor - A selector further qualifies the request for the service. It may also be used instead of a requestor object to request the service. This latter technique is used when a simple string can indicate which variant of the service is needed, rather than supplying a java class.
Returns:
Object
Throws:
wt.services.applicationcontext.UnableToCreateServiceException

getService

public static Object getService(String service_name)
                         throws wt.services.applicationcontext.UnableToCreateServiceException
Returns an implementation of a service object based upon the supplied arguments.

Supported API: true

Parameters:
service_name - Name of the service that is desired. This is required. The lookup for the particular service implementer can be refined by indicating a selector and/or a target object (requestor) that is in need of the service.
Returns:
Object
Throws:
wt.services.applicationcontext.UnableToCreateServiceException