com.xenonsoft.bridgetown.soa
Interface IServiceObjectFactory

All Known Subinterfaces:
IApplicationAssembler, IServiceAssembler
All Known Implementing Classes:
AbstractServiceAssembler, ApplicationAssemblerImpl, WebApplicationAssembler

public interface IServiceObjectFactory

An interface for a service object factory that knows about storing such beans inside namespaced contextes.

Version:
$Id: IServiceObjectFactory.java,v 1.1 2005/02/23 01:31:58 peter_pilgrim Exp $
Author:
peterp, 22-Feb-2005

Method Summary
 boolean containsContext(java.lang.String contextName)
          Return boolean value if a context is available or not
 boolean containsService(java.lang.String contextName, java.lang.String serviceName)
          Return boolean value if a particular named service in a context is available or not
 java.lang.String[] getContextNameList()
          Retrieve the list of context available in the assembly by name.
 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 bean implementation for a registered interface class name
 java.lang.String[] getServiceNameList(java.lang.String contextName)
          Retrieve the list of services by name available inside the named context in the assembly configuration.
 

Method Detail

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.

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
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.

getService

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

Parameters:
contextName - the context name
interfaceClass - the interface class the bean must implement
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.

containsContext

public boolean containsContext(java.lang.String contextName)
Return boolean value if a context is available or not

Parameters:
contextName - the context name
Returns:
true if the named context is available

getContextNameList

public java.lang.String[] getContextNameList()
Retrieve the list of context available in the assembly by name.

Returns:
array list of context name.

containsService

public boolean containsService(java.lang.String contextName,
                               java.lang.String serviceName)
Return boolean value if a particular named service in a context is available or not

Parameters:
contextName - the context name
serviceName - the servie bean name
Returns:
true if the named service is available

getServiceNameList

public java.lang.String[] getServiceNameList(java.lang.String contextName)
Retrieve the list of services by name available inside the named context in the assembly configuration.

Parameters:
contextName - the context name
Returns:
array list of context name.


Copyright © 2005 XeNoNSoFT.com. All Rights Reserved.