org.glassfish.examples.ctm
Class EnvironmentFactory

java.lang.Object
  extended by org.glassfish.examples.ctm.EnvironmentFactory
All Implemented Interfaces:
Factory<Environment>

@Service
@Singleton
public class EnvironmentFactory
extends Object
implements Factory<Environment>

Author:
jwells

Constructor Summary
EnvironmentFactory()
           
 
Method Summary
 void dispose(Environment instance)
           
 Environment provide()
          This method creates environments based on the current tenant.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EnvironmentFactory

public EnvironmentFactory()
Method Detail

provide

public Environment provide()
This method creates environments based on the current tenant. Each tenant will have a backing ServiceLocator. It is not the job of the factory to keep track of the items it produces, that will be done by the scoped context

Specified by:
provide in interface Factory<Environment>

dispose

public void dispose(Environment instance)
Specified by:
dispose in interface Factory<Environment>


Copyright © 2012 Oracle Corporation. All Rights Reserved.