@SessionScoped public class CDIServiceContext extends TideServiceContext
COMPONENT_ATTR, COMPONENT_CLASS_ATTR, EMPTY_ARGS| Constructor and Description |
|---|
CDIServiceContext() |
| Modifier and Type | Method and Description |
|---|---|
void |
addResultEval(ContextResult result) |
void |
endSession()
Clear current session from user events registry
|
protected boolean |
equals(java.lang.Object obj1,
java.lang.Object obj2) |
java.util.List<ContextUpdate> |
evaluateResults(java.lang.Object target,
boolean nothing)
Evaluate results from context
|
java.lang.Object |
findComponent(java.lang.String componentName,
java.lang.Class<?> componentClass,
java.lang.String methodName)
Implementation of component lookup for CDI service
|
java.util.Set<java.lang.Class<?>> |
findComponentClasses(java.lang.String componentName,
java.lang.Class<?> componentClass,
java.lang.String methodName)
Implementation of component lookup for CDI service
|
protected AsyncPublisher |
getAsyncPublisher()
Factory for Seam async publisher
|
java.util.Map<ContextResult,java.lang.Boolean> |
getResultsEval() |
protected TidePersistenceManager |
getTidePersistenceManager(boolean create)
Create a TidePersistenceManager
|
void |
initCall()
Determines the current sessionId for web invocations
|
static boolean |
isImmutable(java.lang.Object o) |
IInvocationResult |
postCall(ServiceInvocationContext context,
java.lang.Object result,
java.lang.String componentName,
java.lang.Class<?> componentClass)
Builds the result object for the invocation
|
void |
postCallFault(ServiceInvocationContext context,
java.lang.Throwable t,
java.lang.String componentName,
java.lang.Class<?> componentClass)
Intercepts a fault on the invocation
|
void |
prepareCall(ServiceInvocationContext context,
IInvocationCall c,
java.lang.String componentName,
java.lang.Class<?> componentClass)
Synchronizes server context with data provided by the client
|
void |
processEvent(java.lang.Object event)
Add an event in the current context
|
void |
restoreContext(java.util.List<ContextUpdate> updates,
java.lang.Object target)
Evaluate updates in current server context
|
void |
setLogin(boolean isLogin) |
void |
setSessionId(java.lang.String sessionId)
Initialize current sessionId and event listeners for this context
|
adjustInvokee, beforeMethodSearch, getSessionId, isBeanAnnotationPresent, lazyInitialize, mergeExternal, mergeExternal, sendEventpublic void initCall()
initCall in class TideServiceContextpublic void setSessionId(java.lang.String sessionId)
setSessionId in class TideServiceContextsessionId - current sessionId@PreDestroy public void endSession()
public void setLogin(boolean isLogin)
public java.util.Map<ContextResult,java.lang.Boolean> getResultsEval()
public java.lang.Object findComponent(java.lang.String componentName,
java.lang.Class<?> componentClass,
java.lang.String methodName)
findComponent in class TideServiceContextcomponentName - component namepublic java.util.Set<java.lang.Class<?>> findComponentClasses(java.lang.String componentName,
java.lang.Class<?> componentClass,
java.lang.String methodName)
findComponentClasses in class TideServiceContextcomponentName - component namepublic void processEvent(java.lang.Object event)
event - the eventprotected AsyncPublisher getAsyncPublisher()
getAsyncPublisher in class TideServiceContextpublic void prepareCall(ServiceInvocationContext context, IInvocationCall c, java.lang.String componentName, java.lang.Class<?> componentClass)
prepareCall in class TideServiceContextcontext - invocation contextc - client callcomponentName - name of the component which will be invokedpublic IInvocationResult postCall(ServiceInvocationContext context, java.lang.Object result, java.lang.String componentName, java.lang.Class<?> componentClass)
postCall in class TideServiceContextcontext - invocation contextresult - result of the method invocationcomponentName - name of the invoked componentpublic void postCallFault(ServiceInvocationContext context, java.lang.Throwable t, java.lang.String componentName, java.lang.Class<?> componentClass)
postCallFault in class TideServiceContextcontext - invocation contextt - exception throwncomponentName - name of the invoked componentpublic void addResultEval(ContextResult result)
public void restoreContext(java.util.List<ContextUpdate> updates, java.lang.Object target)
updates - list of updatestarget - the target instancepublic java.util.List<ContextUpdate> evaluateResults(java.lang.Object target, boolean nothing)
target - the target instancenothing - used by initializer to avoid interactions with context syncprotected TidePersistenceManager getTidePersistenceManager(boolean create)
TideServiceContextgetTidePersistenceManager in class TideServiceContextcreate - create if not existent (can be false for use in entity merge)protected boolean equals(java.lang.Object obj1,
java.lang.Object obj2)
equals in class TideServiceContextpublic static boolean isImmutable(java.lang.Object o)