public class RemoteMethodInvocationCommand extends AbstractRemoteCommand
Modifier and Type | Field and Description |
---|---|
protected jadex.bridge.IComponentIdentifier |
caller
The caller.
|
protected java.lang.String |
callid
The call identifier.
|
protected java.lang.reflect.Method |
method
The method.
|
protected java.lang.String |
methodname
The methodname.
|
protected java.lang.Class<?>[] |
parametertypes
The parameter types.
|
protected java.lang.Object[] |
parametervalues
The parameter values.
|
protected boolean |
returnisref
The declared reference flag for the return value.
|
protected RemoteReference |
rr
The remote reference.
|
protected java.lang.String |
securitylevel
The security level (set by postprocessing).
|
protected java.lang.Object |
target
The target object (set by postprocessing).
|
nonfunc, receiver
Constructor and Description |
---|
RemoteMethodInvocationCommand()
Create a new remote method invocation command.
|
RemoteMethodInvocationCommand(RemoteReference rr,
java.lang.reflect.Method method,
java.lang.Object[] parametervalues,
java.lang.String callid,
jadex.bridge.IComponentIdentifier caller,
java.util.Map<java.lang.String,java.lang.Object> nonfunc)
Create a new remote method invocation command.
|
Modifier and Type | Method and Description |
---|---|
jadex.commons.future.IIntermediateFuture<IRemoteCommand> |
execute(jadex.bridge.IExternalAccess component,
RemoteServiceManagementService rsms)
Execute the command.
|
jadex.bridge.IComponentIdentifier |
getCaller()
Get the caller.
|
java.lang.String |
getCallId()
Get the callid.
|
java.lang.String |
getMethodName()
Get the methodname.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
getNFProps(boolean intermediate)
Get the non functional props from the executed call.
|
java.lang.Class[] |
getParameterTypes()
Get the parametertypes.
|
java.lang.Object[] |
getParameterValues()
Get the parametervalues.
|
jadex.bridge.IComponentIdentifier |
getRealReceiver()
Get the real receiver (other than rms).
|
RemoteReference |
getRemoteReference()
Get the remote reference.
|
java.lang.String |
getSecurityLevel()
Get the security level of the request.
|
jadex.bridge.IComponentIdentifier |
getSender()
Get the receiver component (if other than rms).
|
void |
handleResultFuture(boolean terminable,
RemoteServiceManagementService rsms,
java.lang.String callid,
java.lang.Object res,
boolean returnisref,
java.lang.String methodname,
jadex.bridge.IComponentIdentifier rec,
jadex.commons.future.IntermediateFuture<IRemoteCommand> ret)
Handle the result future by checking what future it is and
sending intermediate results as commands.
|
void |
invokeMethod(jadex.commons.future.IntermediateFuture<IRemoteCommand> ret,
RemoteServiceManagementService rsms)
Invoke remote method.
|
boolean |
isReturnValueReference()
Get the returnisref.
|
jadex.commons.future.IFuture<java.lang.Void> |
postprocessCommand(jadex.bridge.IInternalAccess component,
RemoteReferenceModule rrm,
jadex.bridge.IComponentIdentifier target)
Post-process a received command before execution
for e.g.
|
jadex.commons.future.IFuture<java.lang.Void> |
preprocessCommand(jadex.bridge.IInternalAccess component,
RemoteReferenceModule rrm,
jadex.bridge.IComponentIdentifier target)
Preprocess command and replace if they are remote references.
|
void |
setCaller(jadex.bridge.IComponentIdentifier caller)
Set the caller.
|
void |
setCallId(java.lang.String callid)
Set the callid.
|
void |
setMethodName(java.lang.String methodname)
Set the methodname.
|
void |
setParameterTypes(java.lang.Class[] parametertypes)
Set the parametertypes.
|
void |
setParameterValues(java.lang.Object[] parametervalues)
Set the parametervalues.
|
void |
setRemoteReference(RemoteReference rr)
Set the remote reference.
|
void |
setReturnValueReference(boolean returnisref)
Set the returnisref.
|
java.lang.String |
toString()
Get the string representation.
|
getNonFunctionalProperties, getNonFunctionalProperty, getOrigin, getReceiver, setNonFunctionalProperties
getAuthenticationData, getDigestContent, getTimestamp, getValidityDuration, setAuthenticationData, setDigestContent, setTimestamp, setValidityDuration
protected RemoteReference rr
protected java.lang.reflect.Method method
protected java.lang.String methodname
protected java.lang.Class<?>[] parametertypes
protected java.lang.Object[] parametervalues
protected boolean returnisref
protected java.lang.String callid
protected java.lang.String securitylevel
protected java.lang.Object target
protected jadex.bridge.IComponentIdentifier caller
public RemoteMethodInvocationCommand()
public RemoteMethodInvocationCommand(RemoteReference rr, java.lang.reflect.Method method, java.lang.Object[] parametervalues, java.lang.String callid, jadex.bridge.IComponentIdentifier caller, java.util.Map<java.lang.String,java.lang.Object> nonfunc)
public java.lang.String getSecurityLevel()
getSecurityLevel
in interface jadex.bridge.service.types.security.IAuthorizable
getSecurityLevel
in class jadex.bridge.service.types.security.DefaultAuthorizable
public jadex.commons.future.IFuture<java.lang.Void> preprocessCommand(jadex.bridge.IInternalAccess component, RemoteReferenceModule rrm, jadex.bridge.IComponentIdentifier target)
preprocessCommand
in class AbstractRemoteCommand
public jadex.commons.future.IFuture<java.lang.Void> postprocessCommand(jadex.bridge.IInternalAccess component, RemoteReferenceModule rrm, jadex.bridge.IComponentIdentifier target)
postprocessCommand
in class AbstractRemoteCommand
public jadex.commons.future.IIntermediateFuture<IRemoteCommand> execute(jadex.bridge.IExternalAccess component, RemoteServiceManagementService rsms)
lrms
- The local remote management service.public void invokeMethod(jadex.commons.future.IntermediateFuture<IRemoteCommand> ret, RemoteServiceManagementService rsms)
targetName
- The target object.ret
- The result future.public java.lang.String getMethodName()
public void setMethodName(java.lang.String methodname)
methodname
- The methodname to set.public java.lang.Class[] getParameterTypes()
public void setParameterTypes(java.lang.Class[] parametertypes)
parametertypes
- The parametertypes to set.public java.lang.Object[] getParameterValues()
public void setParameterValues(java.lang.Object[] parametervalues)
parametervalues
- The parametervalues to set.public java.lang.String getCallId()
public void setCallId(java.lang.String callid)
callid
- The callid to set.public jadex.bridge.IComponentIdentifier getCaller()
public void setCaller(jadex.bridge.IComponentIdentifier caller)
caller
- The caller to set.public RemoteReference getRemoteReference()
public void setRemoteReference(RemoteReference rr)
rr
- The remote reference to set.public boolean isReturnValueReference()
public void setReturnValueReference(boolean returnisref)
returnisref
- The returnisref to set.public jadex.bridge.IComponentIdentifier getSender()
getSender
in class AbstractRemoteCommand
public jadex.bridge.IComponentIdentifier getRealReceiver()
getRealReceiver
in class AbstractRemoteCommand
public java.lang.String toString()
toString
in class java.lang.Object
public void handleResultFuture(boolean terminable, RemoteServiceManagementService rsms, java.lang.String callid, java.lang.Object res, boolean returnisref, java.lang.String methodname, jadex.bridge.IComponentIdentifier rec, jadex.commons.future.IntermediateFuture<IRemoteCommand> ret)
protected java.util.Map<java.lang.String,java.lang.Object> getNFProps(boolean intermediate)