@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(Object obj1,
Object obj2) |
List<ContextUpdate> |
evaluateResults(Object target,
boolean nothing)
Evaluate results from context
|
Object |
findComponent(String componentName,
Class<?> componentClass)
Implementation of component lookup for CDI service
|
Set<Class<?>> |
findComponentClasses(String componentName,
Class<?> componentClass)
Implementation of component lookup for CDI service
|
protected AsyncPublisher |
getAsyncPublisher()
Factory for Seam async publisher
|
Map<ContextResult,Boolean> |
getResultsEval() |
protected TidePersistenceManager |
getTidePersistenceManager(boolean create)
Create a TidePersistenceManager
|
void |
initCall()
Determines the current sessionId for web invocations
|
static boolean |
isImmutable(Object o) |
IInvocationResult |
postCall(ServiceInvocationContext context,
Object result,
String componentName,
Class<?> componentClass)
Builds the result object for the invocation
|
void |
postCallFault(ServiceInvocationContext context,
Throwable t,
String componentName,
Class<?> componentClass)
Intercepts a fault on the invocation
|
void |
prepareCall(ServiceInvocationContext context,
IInvocationCall c,
String componentName,
Class<?> componentClass)
Synchronizes server context with data provided by the client
|
void |
processEvent(Object event)
Add an event in the current context
|
void |
restoreContext(List<ContextUpdate> updates,
Object target)
Evaluate updates in current server context
|
void |
setLogin(boolean isLogin) |
void |
setSessionId(String sessionId)
Initialize current sessionId and event listeners for this context
|
adjustInvokee, beforeMethodSearch, getSessionId, isBeanAnnotationPresent, lazyInitialize, mergeExternal, mergeExternal, sendEventpublic CDIServiceContext()
public void initCall()
initCall in class TideServiceContextpublic void setSessionId(String sessionId)
setSessionId in class TideServiceContextsessionId - current sessionId@PreDestroy public void endSession()
public void setLogin(boolean isLogin)
public Map<ContextResult,Boolean> getResultsEval()
public Object findComponent(String componentName, Class<?> componentClass)
findComponent in class TideServiceContextcomponentName - component namepublic Set<Class<?>> findComponentClasses(String componentName, Class<?> componentClass)
findComponentClasses in class TideServiceContextcomponentName - component namepublic void processEvent(Object event)
event - the eventprotected AsyncPublisher getAsyncPublisher()
getAsyncPublisher in class TideServiceContextpublic void prepareCall(ServiceInvocationContext context, IInvocationCall c, String componentName, Class<?> componentClass)
prepareCall in class TideServiceContextcontext - invocation contextc - client callcomponentName - name of the component which will be invokedpublic IInvocationResult postCall(ServiceInvocationContext context, Object result, String componentName, Class<?> componentClass)
postCall in class TideServiceContextcontext - invocation contextresult - result of the method invocationcomponentName - name of the invoked componentpublic void postCallFault(ServiceInvocationContext context, Throwable t, String componentName, Class<?> componentClass)
postCallFault in class TideServiceContextcontext - invocation contextt - exception throwncomponentName - name of the invoked componentpublic void addResultEval(ContextResult result)
public void restoreContext(List<ContextUpdate> updates, Object target)
updates - list of updatestarget - the target instancepublic List<ContextUpdate> evaluateResults(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(Object obj1, Object obj2)
equals in class TideServiceContextpublic static boolean isImmutable(Object o)