Package jade.core
Interface Command
-
- All Known Subinterfaces:
HorizontalCommand,VerticalCommand
- All Known Implementing Classes:
GenericCommand
public interface CommandTheCommandinterface has to be implemented by all JADE kernel-level commands, used by the various platform services.- Author:
- Giovanni Rimassa - FRAMeTech s.r.l.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description CredentialsgetCredentials()Get the credentials that the actor of this command wants to use while processing this command.StringgetName()Query the name of this command object.ObjectgetParam(int index)Obtain the parameter list, as an array of Java objects.Object[]getParams()Obtain the parameter list, as an array of Java objects.JADEPrincipalgetPrincipal()Get the JADEPrincipal of the actor, respnsible for this Command object.ObjectgetReturnValue()Obtain the return value for this command.StringgetService()Query the service this command object belongs to.voidsetCredentials(Credentials creds)voidsetPrincipal(JADEPrincipal p)voidsetReturnValue(Object rv)Assign a return value to this command, so that the original command issuer can retrieve it.
-
-
-
Method Detail
-
getName
String getName()
Query the name of this command object.- Returns:
- A string containing the name of the given command.
-
getService
String getService()
Query the service this command object belongs to.- Returns:
- The name of the service this command object belongs to.
-
getParam
Object getParam(int index)
Obtain the parameter list, as an array of Java objects.- Returns:
- The parameters associated with this command object.
-
getParams
Object[] getParams()
Obtain the parameter list, as an array of Java objects.- Returns:
- The parameters associated with this command object.
-
setReturnValue
void setReturnValue(Object rv)
Assign a return value to this command, so that the original command issuer can retrieve it.- Parameters:
rv- The desired return value for this command object.
-
getReturnValue
Object getReturnValue()
Obtain the return value for this command.- Returns:
- The value that is to be returned back to the issuer of
this
Commandobject.
-
getPrincipal
JADEPrincipal getPrincipal()
Get the JADEPrincipal of the actor, respnsible for this Command object.- Returns:
-
setPrincipal
void setPrincipal(JADEPrincipal p)
-
getCredentials
Credentials getCredentials()
Get the credentials that the actor of this command wants to use while processing this command.- Returns:
-
setCredentials
void setCredentials(Credentials creds)
-
-