    All Packages  Class Hierarchy  This Package  Previous  Next  Index

# Interface org.w3c.jigsaw.ssi.commands.Command

public interface Command

This interface is used to supply implementations of SSI commands. They have to be registered in a CommandRegistry, which in turn is used by the SSIFrame.

See Also:
  CommandRegistry

##

acceptCaching()
  return true if reply can be cached.
execute(SSIFrame, Request, ArrayDictionary, Dictionary)
  Executes this command.
getName()
  Returns the name of this command.
getValue(Dictionary, String, Request)
  Returns the (String) value of the given variable.

##

execute

     public abstract Reply execute(SSIFrame resource,
                                   Request request,
                                   ArrayDictionary parameters,
                                   Dictionary variables)

  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.

  Parameters:
    request - the original HTTP request
    parameters - The parameters for this command
    variables - The global variables for the parse
  Returns:
    a Reply with the output from the command

getName

     public abstract String getName()

  Returns the name of this command. (Case sensitivity is up to the `lookupCommand` method in the command registry.)

  Returns:
    the name of the command
  See Also:
    lookupCommand

getValue

     public abstract String getValue(Dictionary variables,
                                     String variable,
                                     Request request)

  Returns the (String) value of the given variable.

  Returns:
    a String instance.

acceptCaching

     public abstract boolean acceptCaching()

  return true if reply can be cached.

  Returns:
    a boolean.

    All Packages  Class Hierarchy  This Package  Previous  Next  Index