|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwt.services.applicationcontext.ACServicesAdapter
Supported API: false
Extendable: false
Field Summary | |
private ApplicationContext |
applicationContext
|
private static String |
CLASSNAME
|
static long |
EXTERNALIZATION_VERSION_UID
|
private static String |
RESOURCE
|
(package private) static long |
serialVersionUID
|
private ACServices |
services
|
Fields inherited from interface wt.services.applicationcontext.ApplicationContextServices |
SERVICE |
Fields inherited from interface wt.services.applicationcontext.ApplicationContextChild |
APPLICATION_CONTEXT |
Constructor Summary | |
ACServicesAdapter()
Supported API: false |
|
ACServicesAdapter(ACServices services)
Supported API: false |
Method Summary | |
boolean |
addAllServices(ApplicationContextServiceProvider serviceProvider)
Create map entries for all service classes which the passed service provider can manufacture. |
boolean |
addService(String serviceName,
ApplicationContextServiceProvider serviceProvider)
Add an entry which maps the serviceClass argument to the serviceProvider object. |
ApplicationContext |
getApplicationContext()
Gets the object for the association that plays role: applicationContext. |
ApplicationContextServices |
getApplicationContextServices()
Conveniance operation used to cast getApplicationContext to ApplicationContextServices. |
private String |
getMessage(String service_name,
Object requestor,
Object selector)
|
Object |
getService(ApplicationContextChild contextChild,
Object requestor,
Class serviceClass,
Object selector)
Get a service based on the context, the requesting object, the selector, and the logical service class. |
Object |
getService(ApplicationContextChild contextChild,
Object requestor,
String serviceName,
Object selector)
Get a service based on the context, the requesting object, the selector, and the logical service name. |
String |
getServiceImplementationName(ApplicationContextChild childContext,
Object requestor,
String serviceName,
Object selector)
Get the name of the service implementation. |
Map |
getServiceImplementationNameMap(ApplicationContextChild childContext,
ACRequestor requestor,
String serviceName,
Object selector)
Get the name of the service implementation. |
Map |
getServiceImplementationNameMap(ApplicationContextChild childContext,
Object[] requestors,
String serviceName,
Object selector)
Get the name of the service implementation. |
Map |
getServiceMap(ApplicationContextChild contextChild,
ACRequestor requestor,
Class serviceClass,
Object selector)
Get a service based on the context, the requesting object, the selector, and the logical service class. |
Map |
getServiceMap(ApplicationContextChild contextChild,
ACRequestor requestor,
String serviceName,
Object selector)
Get a service based on the context, the requesting object, the selector, and the logical service name. |
Map |
getServiceMap(ApplicationContextChild contextChild,
Object[] requestors,
Class serviceClass,
Object selector)
Get a service based on the context, the requesting object, the selector, and the logical service class. |
Map |
getServiceMap(ApplicationContextChild contextChild,
Object[] requestors,
String serviceName,
Object selector)
Get a service based on the context, the requesting object, the selector, and the logical service name. |
ACServices |
getServices()
Gets the object for the association that plays role: services. |
Object[] |
getServices(ApplicationContextChild contextChild,
Object requestor,
String serviceName,
Object selector)
Get all available services based on the context, the requesting object, the selector, and the logical service name. |
Enumeration |
getServiceSelectors(ApplicationContextChild contextChild,
String serviceName,
Object requestor)
A service selector is an optional qualifier which can be used to help identify which version of a service is desired. |
Map |
getServicesMap(ApplicationContextChild contextChild,
ACRequestor requestor,
String serviceName,
Object selector)
Get all available services based on the context, the requesting object, the selector, and the logical service name. |
Map |
getServicesMap(ApplicationContextChild contextChild,
Object[] requestors,
String serviceName,
Object selector)
Get all available services based on the context, the requesting object, the selector, and the logical service name. |
boolean |
hasService(String serviceName)
Returns true if there is a mapping from the serviceClass to a service provider. |
void |
readExternal(ObjectInput input)
Reads the non-transient fields of this class from an external source. |
private void |
servicesValidate(ACServices a_Services)
|
void |
setApplicationContext(ApplicationContext a_ApplicationContext)
Sets the object for the association that plays role: applicationContext. |
void |
setServices(ACServices a_Services)
Sets the object for the association that plays role: services. |
void |
writeExternal(ObjectOutput output)
Writes the non-transient fields of this class to an external source. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static final String RESOURCE
private static final String CLASSNAME
private ACServices services
private ApplicationContext applicationContext
static final long serialVersionUID
public static final long EXTERNALIZATION_VERSION_UID
Constructor Detail |
public ACServicesAdapter()
public ACServicesAdapter(ACServices services) throws WTPropertyVetoException
services
-
WTPropertyVetoException
Method Detail |
public void writeExternal(ObjectOutput output) throws IOException
writeExternal
in interface Externalizable
output
-
IOException
public void readExternal(ObjectInput input) throws IOException, ClassNotFoundException
readExternal
in interface Externalizable
input
-
IOException
ClassNotFoundException
public ACServices getServices()
public void setServices(ACServices a_Services) throws WTPropertyVetoException
a_Services
-
WTPropertyVetoException
private void servicesValidate(ACServices a_Services) throws WTPropertyVetoException
a_Services
-
WTPropertyVetoException
public ApplicationContextServices getApplicationContextServices()
getApplicationContextServices
in interface ApplicationContextServices
public boolean addService(String serviceName, ApplicationContextServiceProvider serviceProvider)
addService
in interface ApplicationContextServices
serviceName
- serviceProvider
-
public boolean hasService(String serviceName)
hasService
in interface ApplicationContextServices
serviceName
-
public boolean addAllServices(ApplicationContextServiceProvider serviceProvider)
addAllServices
in interface ApplicationContextServices
serviceProvider
-
public Object getService(ApplicationContextChild contextChild, Object requestor, String serviceName, Object selector) throws UnableToCreateServiceException, ServiceNotFoundException
getService
in interface ApplicationContextServices
contextChild
- The context child making the service request.requestor
- The target of the service request.serviceName
- The logical name of the service.selector
- An optional selector to further identify the service.
UnableToCreateServiceException
ServiceNotFoundException
public Object getService(ApplicationContextChild contextChild, Object requestor, Class serviceClass, Object selector) throws UnableToCreateServiceException, ServiceNotFoundException
getService
in interface ApplicationContextServices
contextChild
- requestor
- serviceClass
- selector
- An optional selector to further identify the service.
UnableToCreateServiceException
ServiceNotFoundException
public Object[] getServices(ApplicationContextChild contextChild, Object requestor, String serviceName, Object selector) throws UnableToCreateServiceException, ServiceNotFoundException
getServices
in interface ApplicationContextServices
contextChild
- The context child making the service request.requestor
- The target of the service request.serviceName
- The logical name of the service.selector
- An optional selector to further identify the service.
UnableToCreateServiceException
ServiceNotFoundException
public Map getServiceMap(ApplicationContextChild contextChild, Object[] requestors, String serviceName, Object selector) throws UnableToCreateServiceException, ServiceNotFoundException
getServiceMap
in interface ApplicationContextServices
contextChild
- The context child making the service request.requestors
- The target of the service request.serviceName
- The logical name of the service.selector
- An optional selector to further identify the service.
UnableToCreateServiceException
ServiceNotFoundException
public Map getServiceMap(ApplicationContextChild contextChild, Object[] requestors, Class serviceClass, Object selector) throws UnableToCreateServiceException, ServiceNotFoundException
getServiceMap
in interface ApplicationContextServices
contextChild
- requestors
- serviceClass
- selector
- An optional selector to further identify the service.
UnableToCreateServiceException
ServiceNotFoundException
public Map getServiceMap(ApplicationContextChild contextChild, ACRequestor requestor, Class serviceClass, Object selector) throws UnableToCreateServiceException, ServiceNotFoundException
getServiceMap
in interface ApplicationContextServices
contextChild
- requestor
- serviceClass
- selector
- An optional selector to further identify the service.
UnableToCreateServiceException
ServiceNotFoundException
public Map getServiceMap(ApplicationContextChild contextChild, ACRequestor requestor, String serviceName, Object selector) throws UnableToCreateServiceException, ServiceNotFoundException
getServiceMap
in interface ApplicationContextServices
contextChild
- The context child making the service request.requestor
- serviceName
- The logical name of the service.selector
- An optional selector to further identify the service.
UnableToCreateServiceException
ServiceNotFoundException
public Map getServicesMap(ApplicationContextChild contextChild, Object[] requestors, String serviceName, Object selector) throws UnableToCreateServiceException, ServiceNotFoundException
getServicesMap
in interface ApplicationContextServices
contextChild
- The context child making the service request.requestors
- The target of the service request.serviceName
- The logical name of the service.selector
- An optional selector to further identify the service.
UnableToCreateServiceException
ServiceNotFoundException
public Map getServicesMap(ApplicationContextChild contextChild, ACRequestor requestor, String serviceName, Object selector) throws UnableToCreateServiceException, ServiceNotFoundException
getServicesMap
in interface ApplicationContextServices
contextChild
- The context child making the service request.requestor
- serviceName
- The logical name of the service.selector
- An optional selector to further identify the service.
UnableToCreateServiceException
ServiceNotFoundException
public Enumeration getServiceSelectors(ApplicationContextChild contextChild, String serviceName, Object requestor)
getServiceSelectors
in interface ApplicationContextServices
contextChild
- serviceName
- requestor
-
public String getServiceImplementationName(ApplicationContextChild childContext, Object requestor, String serviceName, Object selector) throws ServiceNotFoundException
getServiceImplementationName
in interface ApplicationContextServices
childContext
- The context child requesting the service implementation name. May be used to determine which specific service implementation should be provided.requestor
- The requestor or target of the service. Used to help determine which specific service implementation should be provided.serviceName
- The logical name of the service.selector
- An optional selector to further identify the service.
ServiceNotFoundException
public Map getServiceImplementationNameMap(ApplicationContextChild childContext, Object[] requestors, String serviceName, Object selector) throws ServiceNotFoundException
getServiceImplementationNameMap
in interface ApplicationContextServices
childContext
- The context child requesting the service implementation name. May be used to determine which specific service implementation should be provided.requestors
- The requestor or target of the service. Used to help determine which specific service implementation should be provided.serviceName
- The logical name of the service.selector
- An optional selector to further identify the service.
ServiceNotFoundException
public Map getServiceImplementationNameMap(ApplicationContextChild childContext, ACRequestor requestor, String serviceName, Object selector) throws ServiceNotFoundException
getServiceImplementationNameMap
in interface ApplicationContextServices
childContext
- The context child requesting the service implementation name. May be used to determine which specific service implementation should be provided.requestor
- serviceName
- The logical name of the service.selector
- An optional selector to further identify the service.
ServiceNotFoundException
public ApplicationContext getApplicationContext()
getApplicationContext
in interface ApplicationContextChild
public void setApplicationContext(ApplicationContext a_ApplicationContext) throws WTPropertyVetoException
setApplicationContext
in interface ApplicationContextChild
a_ApplicationContext
-
WTPropertyVetoException
private String getMessage(String service_name, Object requestor, Object selector)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |