com.ibm.commerce.context.factory

Class AbstractBusinessContextFactory

  • java.lang.Object
    • com.ibm.commerce.context.factory.AbstractBusinessContextFactory
  • All Implemented Interfaces:
    BusinessContextFactory
    Direct Known Subclasses:
    com.ibm.commerce.context.factory.SimpleBusinessContextFactory


    public abstract class AbstractBusinessContextFactory
    extends java.lang.Object
    implements BusinessContextFactory
    This class provides an abstract implementation of the business context factory. This factory class is used to create service provider interface objects for a specified business context. It also provides some helper methods that concrete business context factory class can use.
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static java.lang.String COPYRIGHT
      IBM copyright notice field.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      ContextSPI createContextSPI(ActivityToken token, com.ibm.commerce.component.contextservice.ActivityData initData)
      This method creates a service provider interface object for the context associated with a given activity and initialization data.
      void destroyContextSPI(ContextSPI ctxSPI)
      This method returns a given context service provider interface object to the pool.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • COPYRIGHT

        public static final java.lang.String COPYRIGHT
        IBM copyright notice field.
        See Also:
        Constant Field Values
    • Constructor Detail

      • AbstractBusinessContextFactory

        public AbstractBusinessContextFactory()
        The do-nothing zero-argument constructor.
      • AbstractBusinessContextFactory

        public AbstractBusinessContextFactory(java.util.List paramList)
        This method constructs an AbstractBusinessContextFactory object with the given parameters.
        Parameters:
        paramList - the list of parameters for this factory
    • Method Detail

      • createContextSPI

        public ContextSPI createContextSPI(ActivityToken token,
                                           com.ibm.commerce.component.contextservice.ActivityData initData)
        This method creates a service provider interface object for the context associated with a given activity and initialization data. As there could be more than one context implementation, this method first calls the getContextSPIImplClassname(ActivityToken, ActivityData) method. The getContextSPIImplClassname(ActivityToken, ActivityData) method uses the initialization data to determine which implementation class to use. Once the appropriate implementation class is known, this method calls the createContextSPIClass(String) method to retrieve its instance.
        Specified by:
        createContextSPI in interface BusinessContextFactory
        Parameters:
        token - the token of the activity that the context is to be associated with
        initData - the data that will determine which implementation class to use. If the factory class is not attribute-based, this parameter is ignored.
        Returns:
        The service provider interface object.
      • destroyContextSPI

        public void destroyContextSPI(ContextSPI ctxSPI)
        This method returns a given context service provider interface object to the pool.
        Specified by:
        destroyContextSPI in interface BusinessContextFactory
        Parameters:
        ctxSPI - the service provider interface object to be returned