org.w3c.jigsaw.ssi.commands
Class ExecCommand
java.lang.Object
|
+--org.w3c.jigsaw.ssi.commands.BasicCommand
|
+--org.w3c.jigsaw.ssi.commands.ExecCommand
- public class ExecCommand
- extends BasicCommand
Implementation of the SSI exec
command.
It inserts the output from a CGI script or a shell command in the
document. Note that in the Jigsaw architecture CGI scripts are just
another resource class, so that no distinction is made between
executing a CGI script or including a file.
Relies on variables set by DefaultCommandRegistry.
Method Summary |
boolean |
acceptCaching()
return true if reply can be cached. |
Reply |
execute(SSIFrame ssiframe,
Request request,
ArrayDictionary parameters,
java.util.Dictionary variables)
Executes this command. |
java.lang.String |
getName()
Returns the name of this command. |
java.lang.String |
getValue(java.util.Dictionary variables,
java.lang.String variable,
Request request)
Returns the (String) value of the given variable. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
ExecCommand
public ExecCommand()
execute
public Reply execute(SSIFrame ssiframe,
Request request,
ArrayDictionary parameters,
java.util.Dictionary variables)
- Description copied from interface: Command
- Executes this command. Might modify variables.
Must not modify the parameters.
It may handle conditional requests, except that if
it replies with a status of HTTP.NOT_MODIFIED, it must
still reply with a content (the same content that it would have
returned for an inconditional request). This is because
further SSI commands down the line may decide thay they have
been modified, and then a content must be emitted by SSIFrame.
- Tags copied from interface: Command
- Parameters:
request
- the original HTTP requestparameters
- The parameters for this commandvariables
- The global variables for the parse- Returns:
- a Reply with the output from the command
acceptCaching
public boolean acceptCaching()
- return true if reply can be cached.
- Overrides:
- acceptCaching in class BasicCommand
- Returns:
- a boolean.
getName
public java.lang.String getName()
- Description copied from interface: Command
- Returns the name of this command. (Case sensitivity is up to
the
lookupCommand
method in the command registry.)- Tags copied from interface: Command
- Returns:
- the name of the command
- See Also:
CommandRegistry.lookupCommand(java.lang.String)
getValue
public java.lang.String getValue(java.util.Dictionary variables,
java.lang.String variable,
Request request)
- Description copied from interface: Command
- Returns the (String) value of the given variable.
- Tags copied from interface: Command
- Returns:
- a String instance.