|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.granite.tide.TideServiceContext
org.granite.tide.cdi.CDIServiceContext
@SessionScoped public class CDIServiceContext
| Field Summary |
|---|
| Fields inherited from class org.granite.tide.TideServiceContext |
|---|
COMPONENT_ATTR, COMPONENT_CLASS_ATTR, EMPTY_ARGS |
| Constructor Summary | |
|---|---|
CDIServiceContext()
|
|
| Method Summary | |
|---|---|
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 |
| Methods inherited from class org.granite.tide.TideServiceContext |
|---|
adjustInvokee, beforeMethodSearch, getSessionId, isBeanAnnotationPresent, lazyInitialize, mergeExternal, mergeExternal, sendEvent |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CDIServiceContext()
| Method Detail |
|---|
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 name
public 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 TideServiceContext
public 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 invoked
public 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 component
public 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 instance
public List<ContextUpdate> evaluateResults(Object target,
boolean nothing)
target - the target instancenothing - used by initializer to avoid interactions with context sync
protected TidePersistenceManager getTidePersistenceManager(boolean create)
TideServiceContext
getTidePersistenceManager 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)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||