|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ContextsService
Contexts services provides demarcation methods for each context that is defined in the specification. SPI providers implement related method that it supports.
For example, web container supports request, session conversation, application, singleton and dependent contexts.
| Method Summary | |
|---|---|
void |
activateContext(Class<? extends Annotation> scopeType)
Activate the context with the given scope type. |
void |
deActivateContext(Class<? extends Annotation> scopeType)
Deactivates the context with the given scope type. |
void |
destroy(Object destroyObject)
Destroys container contexts service. |
void |
endContext(Class<? extends Annotation> scopeType,
Object endParameters)
Ends the context with the given scope type. |
Context |
getCurrentContext(Class<? extends Annotation> scopeType)
Gets current context with given scope type with respect to the current thread of execution. |
void |
init(Object initializeObject)
Initialize container contexts service. |
void |
startContext(Class<? extends Annotation> scopeType,
Object startParameter)
Starts the context with the given scope type. |
boolean |
supportsContext(Class<? extends Annotation> scopeType)
If container supports the given scope type it returns true, otherwise it return false. |
| Method Detail |
|---|
void init(Object initializeObject)
initializeObject - any initialize objectvoid destroy(Object destroyObject)
destroyObject - any destroy parameterContext getCurrentContext(Class<? extends Annotation> scopeType)
If there is not current context, it returns null.
scopeType - context scope type
boolean supportsContext(Class<? extends Annotation> scopeType)
scopeType - scope type
void startContext(Class<? extends Annotation> scopeType,
Object startParameter)
throws ContextException
scopeType - scope typestartParameter - any parameter
ContextException - if any exception thrown by starting context,
it is wrapped inside ContextException and thrown.
void endContext(Class<? extends Annotation> scopeType,
Object endParameters)
scopeType - scope typeendParameters - any end parametervoid activateContext(Class<? extends Annotation> scopeType)
scopeType - scope typevoid deActivateContext(Class<? extends Annotation> scopeType)
scopeType - scope type
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||