GigaSpaces XAP 7.0 API

org.openspaces.remoting
Class EventDrivenSpaceRemotingEntry

java.lang.Object
  extended by com.j_spaces.core.client.MetaDataEntry
      extended by org.openspaces.remoting.EventDrivenSpaceRemotingEntry
All Implemented Interfaces:
IMetaDataEntry, Externalizable, Serializable, Cloneable, net.jini.core.entry.Entry, SpaceRemotingInvocation, SpaceRemotingResult

public class EventDrivenSpaceRemotingEntry
extends MetaDataEntry
implements SpaceRemotingInvocation, SpaceRemotingResult, Cloneable, Externalizable

Default implementation of a remoting entry that acts both as a remote invocation and a remote result.

Author:
kimchy
See Also:
Serialized Form

Field Summary
 Object[] arguments
           
 Throwable ex
           
 Integer instanceId
           
 Boolean isInvocation
           
 String lookupName
           
 Object[] metaArguments
           
 String methodName
           
 Boolean oneWay
           
 Object result
           
 Integer routing
           
 
Constructor Summary
EventDrivenSpaceRemotingEntry()
          Constructs a new Async remoting entry.
 
Method Summary
static String[] __getSpaceIndexedFields()
           
 EventDrivenSpaceRemotingEntry buildInvocation(String lookupName, String methodName, Object[] arguments)
           
 EventDrivenSpaceRemotingEntry buildResult(Object result)
           
 EventDrivenSpaceRemotingEntry buildResult(Throwable e)
           
 EventDrivenSpaceRemotingEntry buildResultTemplate()
           
protected  Object clone()
           
 Object[] getArguments()
          The arguments for the service method execution.
 Throwable getException()
          An exception that occured during the remote invocation.
 Integer getInstanceId()
          The cluster instance id this result was executed on.
 String getLookupName()
          The lookup name of the service.
 Object[] getMetaArguments()
          Meta arguments that can be passed as part of the invocation.
 String getMethodName()
          The method name of the service that will be executed.
 Object getResult()
          The result of the remote invocation.
 Integer getRouting()
          Routing field controls the partition the invocation will be directed to when working with a partitioned space.
 void readExternal(ObjectInput in)
           
 void setRouting(Object routing)
           
 String toString()
           
 void writeExternal(ObjectOutput out)
           
 
Methods inherited from class com.j_spaces.core.client.MetaDataEntry
__getEntryInfo, __setEntryInfo, _readExternal, _writeExternal, isFifo, isNOWriteLeaseMode, isTransient, makePersistent, makeTransient, setFifo, setNOWriteLeaseMode, setTransient
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

isInvocation

public Boolean isInvocation

lookupName

public String lookupName

methodName

public String methodName

arguments

public Object[] arguments

metaArguments

public Object[] metaArguments

oneWay

public Boolean oneWay

routing

public Integer routing

result

public Object result

ex

public Throwable ex

instanceId

public Integer instanceId
Constructor Detail

EventDrivenSpaceRemotingEntry

public EventDrivenSpaceRemotingEntry()
Constructs a new Async remoting entry. By default a transient one witn that does not return a lease. Also, by default, this is an invocation entry.

Method Detail

getLookupName

public String getLookupName()
Description copied from interface: SpaceRemotingInvocation
The lookup name of the service. Usually the actual interface class name that is proxied on the client side and implemented on the server side.

Specified by:
getLookupName in interface SpaceRemotingInvocation

getMethodName

public String getMethodName()
Description copied from interface: SpaceRemotingInvocation
The method name of the service that will be executed.

Specified by:
getMethodName in interface SpaceRemotingInvocation

getArguments

public Object[] getArguments()
Description copied from interface: SpaceRemotingInvocation
The arguments for the service method execution.

Specified by:
getArguments in interface SpaceRemotingInvocation

getMetaArguments

public Object[] getMetaArguments()
Description copied from interface: SpaceRemotingInvocation
Meta arguments that can be passed as part of the invocation. This arguments are not used to invoke the method, but can be used to control ceratin pluggable invocation "aspects".

Specified by:
getMetaArguments in interface SpaceRemotingInvocation

getRouting

public Integer getRouting()
Description copied from interface: SpaceRemotingInvocation
Routing field controls the partition the invocation will be directed to when working with a partitioned space.

Specified by:
getRouting in interface SpaceRemotingInvocation
Specified by:
getRouting in interface SpaceRemotingResult

setRouting

public void setRouting(Object routing)

getResult

public Object getResult()
Description copied from interface: SpaceRemotingResult
The result of the remote invocation. Note, null value might mean that remote service returned null/void, but it also might means that there might be an SpaceRemotingResult.getException().

Specified by:
getResult in interface SpaceRemotingResult

getException

public Throwable getException()
Description copied from interface: SpaceRemotingResult
An exception that occured during the remote invocation. null value means there was no exception.

Specified by:
getException in interface SpaceRemotingResult

getInstanceId

public Integer getInstanceId()
Description copied from interface: SpaceRemotingResult
The cluster instance id this result was executed on.

Specified by:
getInstanceId in interface SpaceRemotingResult

__getSpaceIndexedFields

public static String[] __getSpaceIndexedFields()

buildInvocation

public EventDrivenSpaceRemotingEntry buildInvocation(String lookupName,
                                                     String methodName,
                                                     Object[] arguments)

buildResultTemplate

public EventDrivenSpaceRemotingEntry buildResultTemplate()

buildResult

public EventDrivenSpaceRemotingEntry buildResult(Throwable e)

buildResult

public EventDrivenSpaceRemotingEntry buildResult(Object result)

clone

protected Object clone()
                throws CloneNotSupportedException
Overrides:
clone in class Object
Throws:
CloneNotSupportedException

writeExternal

public void writeExternal(ObjectOutput out)
                   throws IOException
Specified by:
writeExternal in interface Externalizable
Throws:
IOException

readExternal

public void readExternal(ObjectInput in)
                  throws IOException,
                         ClassNotFoundException
Specified by:
readExternal in interface Externalizable
Throws:
IOException
ClassNotFoundException

toString

public String toString()
Overrides:
toString in class Object

GigaSpaces XAP 7.0 API

Copyright © GigaSpaces.