Package com.levigo.jadice.web.server
Class ContextualFactories
java.lang.Object
com.levigo.jadice.web.server.ContextualFactories
Utilities for working with
ContextualFactory
objects.-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> ContextualFactory<T>
singleton
(T instance) Generate a singletonContextualFactory
providing the given instance.
-
Method Details
-
singleton
Generate a singletonContextualFactory
providing the given instance. The resultingContextualFactory
will always return the same instance, completely ignoring the givenInvocationContext
- Type Parameters:
T
- the type of object to be held as a singlton- Parameters:
instance
- the instance that shall be provided as a singleton- Returns:
- a
ContextualFactory
returning the giveninstance
.
-