|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.granite.messaging.service.ServiceInvoker<T>
org.granite.tide.TideServiceInvoker<T>
public class TideServiceInvoker<T extends ServiceFactory>
Base class for Tide service invokers Adapts the Tide invocation model with Granite
| Field Summary | |
|---|---|
static String |
VALIDATOR_CLASS_NAME
|
static String |
VALIDATOR_KEY
|
static String |
VALIDATOR_NAME
|
static String |
VALIDATOR_NOT_AVAILABLE
|
| Fields inherited from class org.granite.messaging.service.ServiceInvoker |
|---|
destination, factory, invocationListeners, invokee |
| Constructor Summary | |
|---|---|
TideServiceInvoker(Destination destination,
T factory)
|
|
TideServiceInvoker(Destination destination,
T factory,
TideServiceContext tideContext)
|
|
| Method Summary | |
|---|---|
protected Object |
adjustInvokee(RemotingMessage request,
String methodName,
Object[] args)
Called at the beginning of the ServiceInvoker.invoke(RemotingMessage) method. |
protected Object |
afterInvocation(ServiceInvocationContext context,
Object result)
Called after a successful invocation of the service's method. |
protected void |
afterInvocationError(ServiceInvocationContext context,
Throwable error)
Called after a failed invocation of the service's method, possibly after a new attempt (see ServiceInvoker.retryInvocation(ServiceInvocationContext, Throwable). |
protected void |
beforeInvocation(ServiceInvocationContext context)
Called before the invocation of the services method. |
protected Object[] |
beforeMethodSearch(Object invokee,
String methodName,
Object[] args)
Called before the ServiceInvoker.invoke(RemotingMessage) method starts to search for a method named methodName
with the arguments args on the invokee object. |
protected TideServiceContext |
getTideContext()
|
Object |
initializeObject(Object parent,
String[] propertyNames)
|
protected void |
initValidator()
|
void |
login()
|
void |
logout()
|
protected TideServiceContext |
lookupContext()
|
protected void |
prepareDataObserver(DataEnabled dataEnabled)
|
protected void |
publishDataUpdates()
|
void |
resyncContext()
|
InvalidValue[] |
validateObject(Object entity,
String propertyName,
Object value)
|
| Methods inherited from class org.granite.messaging.service.ServiceInvoker |
|---|
invoke, retryInvocation |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String VALIDATOR_KEY
public static final String VALIDATOR_NOT_AVAILABLE
public static final String VALIDATOR_NAME
public static final String VALIDATOR_CLASS_NAME
| Constructor Detail |
|---|
public TideServiceInvoker(Destination destination,
T factory)
throws ServiceException
ServiceException
public TideServiceInvoker(Destination destination,
T factory,
TideServiceContext tideContext)
throws ServiceException
ServiceException| Method Detail |
|---|
public Object initializeObject(Object parent,
String[] propertyNames)
protected void initValidator()
public InvalidValue[] validateObject(Object entity,
String propertyName,
Object value)
public void login()
public void logout()
public void resyncContext()
protected TideServiceContext lookupContext()
protected TideServiceContext getTideContext()
protected Object adjustInvokee(RemotingMessage request,
String methodName,
Object[] args)
throws ServiceException
ServiceInvokerServiceInvoker.invoke(RemotingMessage) method. Give a chance to modify the
the services (invokee) about to be called. Does nothing by default. The default invokee object is
created by actual implementations of this abstract class.
adjustInvokee in class ServiceInvoker<T extends ServiceFactory>request - the current remoting message (sent from Flex).methodName - the name of the method to be called.args - the method parameter values.
ServiceException - if anything goes wrong.
protected Object[] beforeMethodSearch(Object invokee,
String methodName,
Object[] args)
ServiceInvokerServiceInvoker.invoke(RemotingMessage) method starts to search for a method named methodName
with the arguments args on the invokee object. Give a chance to modify the method name or the paramaters.
Does nothing by default.
beforeMethodSearch in class ServiceInvoker<T extends ServiceFactory>invokee - the service instance used for searching the method with the specified arguments.methodName - the method name.args - the arguments of the method.
protected void beforeInvocation(ServiceInvocationContext context)
ServiceInvoker
beforeInvocation in class ServiceInvoker<T extends ServiceFactory>context - the current invocation context.protected void prepareDataObserver(DataEnabled dataEnabled)
protected Object afterInvocation(ServiceInvocationContext context,
Object result)
ServiceInvoker
afterInvocation in class ServiceInvoker<T extends ServiceFactory>context - the current invocation context.result - the result of the invocation (returned by the called method).protected void publishDataUpdates()
protected void afterInvocationError(ServiceInvocationContext context,
Throwable error)
ServiceInvokerServiceInvoker.retryInvocation(ServiceInvocationContext, Throwable). Does nothing by default.
afterInvocationError in class ServiceInvoker<T extends ServiceFactory>context - the current invocation context.error - the exception that caused the invocation failure.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||