|
GigaSpaces XAP 8.0 API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openspaces.remoting.ExecutorRemotingTask<T>
public class ExecutorRemotingTask<T extends Serializable>
A Task that can be used to simulate remote invcation with
SpaceRemotingServiceExporter. When executed, the task searches
for a service exporter (first under the hardwired name serviceExporter, then any
bean that define this class), and based on paramters passed on the task itself (such as method
name, lookup name and arguments) invokes service methods that are registered with the service
exporter.
| Nested Class Summary | |
|---|---|
static class |
ExecutorRemotingTask.InternalExecutorException
A wrapper executor exception that holds more information on the exception, such as the instance id. |
static class |
ExecutorRemotingTask.InternalExecutorResult<T extends Serializable>
A wrapper executor result that holds more information on the exception, such as the instance id. |
| Constructor Summary | |
|---|---|
ExecutorRemotingTask()
Should not be used. |
|
ExecutorRemotingTask(String lookupName,
String methodName,
RemotingUtils.MethodHash methodHash,
Object[] arguments)
|
|
| Method Summary | |
|---|---|
ExecutorRemotingTask.InternalExecutorResult<T> |
execute()
Computes a result, or throws an exception if unable to do so. |
Object[] |
getArguments()
The arguments for the service method execution. |
String |
getLookupName()
The lookup name of the service. |
Object[] |
getMetaArguments()
Meta arguments that can be passed as part of the invocation. |
RemotingUtils.MethodHash |
getMethodHash()
|
String |
getMethodName()
The method name of the service that will be executed. |
Integer |
getRouting()
Returns the routing of the task. |
void |
readExternal(ObjectInput in)
|
List<AsyncResult<ExecutorRemotingTask.InternalExecutorResult<T>>> |
reduce(List<AsyncResult<ExecutorRemotingTask.InternalExecutorResult<T>>> results)
|
void |
setApplicationContext(ApplicationContext applicationContext)
|
void |
setClusterInfo(ClusterInfo clusterInfo)
Sets the cluster information. |
void |
writeExternal(ObjectOutput out)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ExecutorRemotingTask()
public ExecutorRemotingTask(String lookupName,
String methodName,
RemotingUtils.MethodHash methodHash,
Object[] arguments)
| Method Detail |
|---|
public void setApplicationContext(ApplicationContext applicationContext)
setApplicationContext in interface ApplicationContextAwarepublic void setClusterInfo(ClusterInfo clusterInfo)
ClusterInfoAwareNote, the cluster information is obtained externally from the application context which means
that this feature need to be supported by specific containers (and is not supported by plain
Spring application context). This means that beans that implement ClusterInfoAware
should take into account the fact that the cluster info provided might be null.
setClusterInfo in interface ClusterInfoAwareclusterInfo - The cluster information to be injected
public ExecutorRemotingTask.InternalExecutorResult<T> execute()
throws Exception
Task
execute in interface Task<ExecutorRemotingTask.InternalExecutorResult<T extends Serializable>>Exception - if unable to compute a result
public List<AsyncResult<ExecutorRemotingTask.InternalExecutorResult<T>>> reduce(List<AsyncResult<ExecutorRemotingTask.InternalExecutorResult<T>>> results)
throws Exception
reduce in interface AsyncResultsReducer<ExecutorRemotingTask.InternalExecutorResult<T extends Serializable>,List<AsyncResult<ExecutorRemotingTask.InternalExecutorResult<T extends Serializable>>>>Exceptionpublic Integer getRouting()
TaskRoutingProvider
getRouting in interface TaskRoutingProvidergetRouting in interface SpaceRemotingInvocationpublic String getLookupName()
SpaceRemotingInvocation
getLookupName in interface SpaceRemotingInvocationpublic String getMethodName()
SpaceRemotingInvocation
getMethodName in interface SpaceRemotingInvocationpublic RemotingUtils.MethodHash getMethodHash()
public Object[] getArguments()
SpaceRemotingInvocation
getArguments in interface SpaceRemotingInvocationpublic Object[] getMetaArguments()
SpaceRemotingInvocation
getMetaArguments in interface SpaceRemotingInvocation
public void writeExternal(ObjectOutput out)
throws IOException
writeExternal in interface ExternalizableIOException
public void readExternal(ObjectInput in)
throws IOException,
ClassNotFoundException
readExternal in interface ExternalizableIOException
ClassNotFoundException
|
GigaSpaces XAP 8.0 API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||