| java.lang.Object org.cougaar.planning.servlet.ServletWorker
All known Subclasses: org.cougaar.glm.servlet.GLMStimulatorWorker, org.cougaar.planning.servlet.HierarchyWorker, org.cougaar.logistics.servlet.ConditionWorker, org.cougaar.glm.servlet.CompletionWatcherWorker,
ServletWorker | public class ServletWorker (Code) | |
ServletWorker is the base class for all servlet workers.
ServletWorkers assume that the result can be returned in any of
three formats : html, xml, or serialized java object. These
formats are specified by the URL format parameter, i.e.
http://localhost:8800/$AGENT_NAME/SERVLET_NAME?format=html
The format parameter is set in the getSettings method. This should
be called from a subclass if overridden.
Defines the writeResponse method, which returns the type of result
indicated by the format parameter to the output stream of the servlet
response.
Note that if you make a mistake and don't provide a value for a
parameter, e.g.
http://localhost:8800/$AGENT_NAME/SERVLET_NAME?format
^^^^ - no value
the ServletUtil object will throw an exception.
|
DEBUG | final public static boolean DEBUG(Code) | | |
FORMAT_DATA | final public static int FORMAT_DATA(Code) | | |
FORMAT_HTML | final public static int FORMAT_HTML(Code) | | |
FORMAT_XML | final public static int FORMAT_XML(Code) | | |
VERBOSE | public static boolean VERBOSE(Code) | | |
format | protected int format(Code) | | |
getSettings | protected void getSettings(String name, String value)(Code) | |
sets format
format is either data, xml, or html
see class description for what these values mean
|
isDataFormat | protected boolean isDataFormat()(Code) | | |
isHtmlFormat | protected boolean isHtmlFormat()(Code) | | |
isXmlFormat | protected boolean isXmlFormat()(Code) | | |
|
|