|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjade.core.GenericCommand
public class GenericCommand
A generic implementation of the Command interface,
operating at the meta-level to provide a generic transformation of
method invocations.
Generic commands can be used both as vertical and horizontal commands.
Objects of this class can also be recycled to build command
pools, since every information they hold can be rewritten.
| Constructor Summary | |
|---|---|
GenericCommand(java.lang.String name,
java.lang.String service,
java.lang.String interaction)
Creates a new generic command, with the given name and belonging to the given service and interaction. |
|
| Method Summary | |
|---|---|
void |
addParam(java.lang.Object obj)
Add a new parameter to this command object. |
void |
clear()
|
jade.security.Credentials |
getCredentials()
Get the credentials that the actor of this command wants to use while processing this command. |
java.lang.String |
getInteraction()
Query the interaction this command object is a part of. |
java.lang.String |
getName()
Query the name of this command object. |
java.lang.Object |
getParam(int index)
Obtain the parameter list, as an array of Java objects. |
java.lang.Object[] |
getParams()
Obtain the parameter list, as an array of Java objects. |
jade.security.JADEPrincipal |
getPrincipal()
Get the JADEPrincipal of the actor, respnsible for this Command object. |
java.lang.Object |
getReturnValue()
Obtain the return value for this command. |
java.lang.String |
getService()
Query the service this command object belongs to. |
void |
removeParam(java.lang.Object obj)
Remove a parameter from this command object. |
void |
setCredentials(jade.security.Credentials creds)
|
void |
setPrincipal(jade.security.JADEPrincipal p)
|
void |
setReturnValue(java.lang.Object rv)
Assign a return value to this command, so that the original command issuer can retrieve it. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public GenericCommand(java.lang.String name,
java.lang.String service,
java.lang.String interaction)
name - The name of this command.svc - The name of the service this command belongs to.interaction - The identifier of the service interation this command belongs to.| Method Detail |
|---|
public java.lang.String getName()
Command
getName in interface Commandpublic java.lang.String getService()
Command
getService in interface CommandgetService in interface HorizontalCommandpublic java.lang.String getInteraction()
HorizontalCommandgetInteraction() on them yields the same result.
getInteraction in interface HorizontalCommandString serving as a service-unique
identifier for the interaction of this command object.public void addParam(java.lang.Object obj)
obj - The parameter to add. The actual type of
obj must be such that can be delivered over the
network by the concrete platform IMTP.jade.core.IMTPManagerpublic void removeParam(java.lang.Object obj)
obj - The parameter to remove.public void clear()
public void setReturnValue(java.lang.Object rv)
Command
setReturnValue in interface Commandrv - The desired return value for this command object.public final java.lang.Object getParam(int index)
Command
getParam in interface Commandpublic java.lang.Object[] getParams()
Command
getParams in interface Commandpublic java.lang.Object getReturnValue()
Command
getReturnValue in interface CommandCommand object.public jade.security.JADEPrincipal getPrincipal()
Command
getPrincipal in interface Commandpublic void setPrincipal(jade.security.JADEPrincipal p)
setPrincipal in interface Commandpublic jade.security.Credentials getCredentials()
Command
getCredentials in interface Commandpublic void setCredentials(jade.security.Credentials creds)
setCredentials in interface Command
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||