com.xenonsoft.bridgetown.soa.impl
Class ServiceAssemblerImpl

java.lang.Object
  extended bycom.xenonsoft.bridgetown.soa.impl.AbstractServiceAssembler
      extended bycom.xenonsoft.bridgetown.soa.impl.ServiceAssemblerImpl
All Implemented Interfaces:
IDisposable, IServiceAssembler, IServiceObjectFactory, IStartable, java.io.Serializable
Direct Known Subclasses:
ApplicationAssemblerImpl

public class ServiceAssemblerImpl
extends AbstractServiceAssembler

A basic implementation of the service assembly contract. This assembler can be used in J2EE enterprise applications in order to wire dependencies between service JavaBeans.

Once the assembler starts it creates the services beans dynamically. Dependencies between service beans and any reference value object are injected by the assembler.

For an assemblers that supports the web container environment please see WebApplicationAssembler.

Version:
$Id: ServiceAssemblerImpl.java,v 1.2 2005/02/23 01:31:08 peter_pilgrim Exp $
Author:
Peter Pilgrim, July 2004
See Also:
ApplicationAssemblerImpl, WebApplicationAssembler, Serialized Form

Field Summary
 
Fields inherited from class com.xenonsoft.bridgetown.soa.impl.AbstractServiceAssembler
assembly, beanPropertyValueResolver, classLoader, instanceCache, proxyBeanBuilder
 
Constructor Summary
ServiceAssemblerImpl()
          Default constructor
 
Method Summary
 java.lang.Object getName(java.lang.String contextName, java.lang.String beanName)
          Retrieves the service bean implementation registered by name.
 java.lang.Object getName(java.lang.String contextName, java.lang.String beanName, java.lang.Class interfaceClass)
          Retrieves the service bean implementation registered by name.
 java.lang.Object getService(java.lang.String contextName, java.lang.Class interfaceClass)
          Returns the service implementation for a registered interface class name
 
Methods inherited from class com.xenonsoft.bridgetown.soa.impl.AbstractServiceAssembler
checkFactory, configureServiceBeanProperties, configureServiceBeanReferences, containsContext, containsService, createBeanBuilder, createRetrieveServiceBean, createServiceBean, createServiceBean, createServiceBean, dispose, fixupServiceBeanReferences, getAssemblyConfig, getBeanPropertyValueResolver, getClassListFromNameList, getClassLoader, getContextConfig, getContextNameList, getProxyBeanBuilder, getServiceConfig, getServiceNameList, getServicesConfig, invokeServiceBeanMethod, invokeServiceBeanMethods, load, merge, recursiveCreateServiceBean, resolveValueReferences, setBeanPropertyValueResolver, setClassLoader, setProxyBeanBuilder, start
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServiceAssemblerImpl

public ServiceAssemblerImpl()
Default constructor

Method Detail

getName

public java.lang.Object getName(java.lang.String contextName,
                                java.lang.String beanName,
                                java.lang.Class interfaceClass)
Retrieves the service bean implementation registered by name.

Parameters:
contextName - the context identifier
beanName - the bean identifier
interfaceClass - the interface class the bean must implement (optional)
Returns:
the service bean with the matching identifier
Throws:
AssemblyFactoryException - - if the service cannot be instantiated, if it reports an error, or cannot be syntactically created with violating class encapsulation, or simply has not been defined at all.
See Also:
IServiceObjectFactory.getName(java.lang.String, java.lang.String, java.lang.Class)

getName

public java.lang.Object getName(java.lang.String contextName,
                                java.lang.String beanName)
Retrieves the service bean implementation registered by name.

Parameters:
contextName - the context identifier
beanName - the bean identifier
Returns:
the service bean with the matching identifier
Throws:
AssemblyFactoryException - - if the service cannot be instantiated, if it reports an error, or cannot be syntactically created with violating class encapsulation, or simply has not been defined at all.
See Also:
IServiceObjectFactory.getName(java.lang.String, java.lang.String)

getService

public java.lang.Object getService(java.lang.String contextName,
                                   java.lang.Class interfaceClass)
Returns the service implementation for a registered interface class name

Parameters:
contextName - the context name
interfaceClass - the interface class name
Returns:
the actual registered implementation of the interface.
Throws:
AssemblyFactoryException - - if the service cannot be instantiated, if it reports an error, or cannot be syntactically created with violating class encapsulation, or simply has not been defined at all.


Copyright © 2005 XeNoNSoFT.com. All Rights Reserved.