|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
T - This must be the type for which this is a context. For example,
if your scope is SecureScope, then your context must implement Context<SecureScope>@Contract public interface Context<T>
An implementation of this must be put into the system in order to create contextual instances of services. If there is more than one active implementation available for the same scope on the same thread a runtime exception will be thrown when the scope is accessed.
An implementation of Context must be in the Singleton scope
| Method Summary | ||
|---|---|---|
|
find(ActiveDescriptor<U> descriptor)
Finds an existing contextual instance, without creating or loading any objects |
|
|
findOrCreate(ActiveDescriptor<U> activeDescriptor,
ServiceHandle<?> root)
Creates a contextual instance of this ActiveDescriptor by calling its create method if there is no other matching contextual instance. |
|
Class<? extends Annotation> |
getScope()
The scope for which this is the context |
|
boolean |
isActive()
True if this context is active, false otherwise |
|
| Method Detail |
|---|
Class<? extends Annotation> getScope()
<U> U findOrCreate(ActiveDescriptor<U> activeDescriptor,
ServiceHandle<?> root)
activeDescriptor - The descriptor to use when creating instancesroot - The extended provider for the outermost parent being created
<U> U find(ActiveDescriptor<U> descriptor)
descriptor - The descriptor to look for in this context
boolean isActive()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||