|
||||||||||
| 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.seam.AbstractSeamServiceContext
public abstract class AbstractSeamServiceContext
| Field Summary | |
|---|---|
static String |
COMPONENT_NAME
|
protected Log |
log
|
| Fields inherited from class org.granite.tide.TideServiceContext |
|---|
COMPONENT_ATTR, COMPONENT_CLASS_ATTR, EMPTY_ARGS |
| Constructor Summary | |
|---|---|
AbstractSeamServiceContext()
|
|
| Method Summary | |
|---|---|
void |
addResultEval(ScopedContextResult result)
|
protected abstract void |
clearTideMessages()
|
void |
endSession()
Clear current session from user events registry |
List<org.granite.tide.invocation.ContextUpdate> |
evaluateResults(Component component,
Object target,
boolean nothing)
Evaluate results from context |
Object |
findComponent(String componentName,
Class<?> componentClass)
Implementation of component lookup for Seam service |
Set<Class<?>> |
findComponentClasses(String componentName,
Class<?> componentClass)
Implementation of component lookup for Seam service |
AsyncContext |
getAsyncContext()
Constructs an asynchronous context object |
protected org.granite.tide.async.AsyncPublisher |
getAsyncPublisher()
Factory for Seam async publisher |
protected abstract org.granite.tide.TideStatusMessages |
getTideMessages()
Retrieve current messages |
protected org.granite.tide.TidePersistenceManager |
getTidePersistenceManager(boolean create)
|
void |
initCall()
Determines the current sessionId for web invocations |
protected abstract void |
initTideMessages()
|
Object |
invokeAsynchronous(AsyncContext asyncContext,
String targetComponentName,
Class<?> targetComponentClass,
String methodName,
Class<?>[] paramTypes,
Object[] params)
Implementations of intercepted asynchronous calls Send asynchronous event to client |
static Object[] |
lookupInStatefulContexts(String name,
ScopeType scope)
Search for a named attribute in all contexts, in the following order: method, event, page, conversation, session, business process, application. |
void |
observeBeginConversation()
|
org.granite.tide.IInvocationResult |
postCall(org.granite.messaging.service.ServiceInvocationContext context,
Object result,
String componentName,
Class<?> componentClass)
Builds the result object for the invocation |
void |
postCallFault(org.granite.messaging.service.ServiceInvocationContext context,
Throwable t,
String componentName,
Class<?> componentClass)
Intercepts a fault on the invocation |
void |
prepareCall(org.granite.messaging.service.ServiceInvocationContext context,
org.granite.tide.IInvocationCall c,
String componentName,
Class<?> componentClass)
Synchronizes server context with data provided by the client |
void |
raiseEvent(String type,
Object... params)
Add an event in the current context |
void |
restoreContext(List<org.granite.tide.invocation.ContextUpdate> updates,
Component component,
Object target)
Evaluate updates in current server context |
void |
setAsyncContext(AsyncContext asyncContext)
Restores an asynchronous context |
void |
setSessionId(String sessionId)
Initialize current sessionId and event listeners for this context |
| Methods inherited from class org.granite.tide.TideServiceContext |
|---|
adjustInvokee, beforeMethodSearch, equals, getSessionId, lazyInitialize, mergeExternal, mergeExternal, sendEvent |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String COMPONENT_NAME
@Logger protected Log log
| Constructor Detail |
|---|
public AbstractSeamServiceContext()
throws org.granite.messaging.service.ServiceException
org.granite.messaging.service.ServiceException| Method Detail |
|---|
public void initCall()
initCall in class org.granite.tide.TideServiceContextpublic void setSessionId(String sessionId)
setSessionId in class org.granite.tide.TideServiceContextsessionId - current sessionId@Destroy public void endSession()
public AsyncContext getAsyncContext()
public void setAsyncContext(AsyncContext asyncContext)
asyncContext - saved contextprotected abstract org.granite.tide.TideStatusMessages getTideMessages()
protected abstract void initTideMessages()
protected abstract void clearTideMessages()
public Object findComponent(String componentName,
Class<?> componentClass)
findComponent in class org.granite.tide.TideServiceContextcomponentName - component name
public Set<Class<?>> findComponentClasses(String componentName,
Class<?> componentClass)
findComponentClasses in class org.granite.tide.TideServiceContextcomponentName - component name@Observer(value="org.jboss.seam.beginConversation") public void observeBeginConversation()
public void raiseEvent(String type,
Object... params)
type - event typeparams - event parametersprotected org.granite.tide.async.AsyncPublisher getAsyncPublisher()
getAsyncPublisher in class org.granite.tide.TideServiceContext
public void prepareCall(org.granite.messaging.service.ServiceInvocationContext context,
org.granite.tide.IInvocationCall c,
String componentName,
Class<?> componentClass)
prepareCall in class org.granite.tide.TideServiceContextcontext - invocation contextc - client callcomponentName - name of the component which will be invoked
public org.granite.tide.IInvocationResult postCall(org.granite.messaging.service.ServiceInvocationContext context,
Object result,
String componentName,
Class<?> componentClass)
postCall in class org.granite.tide.TideServiceContextcontext - invocation contextresult - result of the method invocationcomponentName - name of the invoked component
public void postCallFault(org.granite.messaging.service.ServiceInvocationContext context,
Throwable t,
String componentName,
Class<?> componentClass)
postCallFault in class org.granite.tide.TideServiceContextcontext - invocation contextt - exception throwncomponentName - name of the invoked componentpublic void addResultEval(ScopedContextResult result)
public void restoreContext(List<org.granite.tide.invocation.ContextUpdate> updates,
Component component,
Object target)
updates - list of updatescomponent - the target componenttarget - the target instance
public List<org.granite.tide.invocation.ContextUpdate> evaluateResults(Component component,
Object target,
boolean nothing)
component - the target componenttarget - the target instancenothing - used by initializer to avoid interactions with context sync
public Object invokeAsynchronous(AsyncContext asyncContext,
String targetComponentName,
Class<?> targetComponentClass,
String methodName,
Class<?>[] paramTypes,
Object[] params)
asyncContext - current context (session id)targetComponentName - target component namemethodName - method nameparamTypes - method argument typesparams - argument values
protected org.granite.tide.TidePersistenceManager getTidePersistenceManager(boolean create)
getTidePersistenceManager in class org.granite.tide.TideServiceContext
public static Object[] lookupInStatefulContexts(String name,
ScopeType scope)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||