org.glassfish.examples.ctm
Class EnvironmentFactory
java.lang.Object
org.glassfish.examples.ctm.EnvironmentFactory
- All Implemented Interfaces:
- Factory<Environment>
@Service
@Singleton
public class EnvironmentFactory
- extends Object
- implements Factory<Environment>
- Author:
- jwells
Method Summary |
void |
dispose(Environment instance)
This method will dispose of objects created with this scope. |
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 |
EnvironmentFactory
public EnvironmentFactory()
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>
- Returns:
- The produces object
dispose
public void dispose(Environment instance)
- Description copied from interface:
Factory
- This method will dispose of objects created with this scope. This method should
not be annotated, as it is naturally paired with the provide method
- Specified by:
dispose
in interface Factory<Environment>
- Parameters:
instance
- The instance to dispose of
Copyright © 2013 Oracle Corporation. All Rights Reserved.