com.xenonsoft.bridgetown.soa
Interface IObjectFactory

All Known Implementing Classes:
WeblogicTransactionManagerFactory

public interface IObjectFactory

An interface factory bean to create an object. This interface decouples the calling process or class from knowing the exactly details of how an object, Java Bean is created or retrieved.

The object factory can create a bean, or it can retrieve a bean, from say a cache. The choice is reveal by calling the accessor #isSingleton() . The calling process can also interrogate the type of object that will be returned with getObjectType().

NB: This class is the simplest use of the creational pattern FACTORY. Most of the literature on the web or in book demonstrate the pattern with a discriminator.

Version:
$Id: IObjectFactory.java,v 1.3 2005/03/17 02:45:41 peter_pilgrim Exp $
Author:
peterp, 22-Feb-2005

Method Summary
 ContainmentEnum getContainmentType()
          Returns the containment type that this object factory creates.
 java.lang.Object getObject()
          Creates or retrieves the object as defined by this factory bean.
 java.lang.Class getObjectType()
          Returns the type of object that is or will be created.
 

Method Detail

getObject

public java.lang.Object getObject()
                           throws AssemblyFactoryException
Creates or retrieves the object as defined by this factory bean.

Returns:
the object
Throws:
AssemblyFactoryException

getObjectType

public java.lang.Class getObjectType()
Returns the type of object that is or will be created.

Returns:
the object type class

getContainmentType

public ContainmentEnum getContainmentType()
Returns the containment type that this object factory creates.

Returns:
the containment type enumeration


Copyright © 2005 XeNoNSoFT.com. All Rights Reserved.