org.cougaar.core.relay
Class PingServlet
java.lang.Object
javax.servlet.GenericServlet
javax.servlet.http.HttpServlet
org.cougaar.core.servlet.ComponentServlet
org.cougaar.core.relay.PingServlet
- All Implemented Interfaces:
- java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig, org.cougaar.core.component.Component, org.cougaar.util.GenericStateModel
public class PingServlet
- extends ComponentServlet
This servlet shows our ping relays as an HTML page.
Supports an optional Servlet path parameter, which defaults to "/ping".
For simplicity, it's easiest to load a copy of this servlet into every
agent.
- See Also:
- Serialized Form
| Fields inherited from interface org.cougaar.util.GenericStateModel |
ACTIVE, IDLE, LOADED, UNINITIALIZED, UNLOADED |
|
Method Summary |
void |
doGet(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
This method is called whenever the browser loads our URL. |
protected java.lang.String |
getPath()
Get the path for the Servlet's registration. |
void |
load()
This method is called when the agent is created |
| Methods inherited from class org.cougaar.core.servlet.ComponentServlet |
getAgentIdentifier, getEncodedAgentName, getModelState, getServiceBroker, halt, initialize, resume, setAgentIdentificationService, setBindingSite, setParameter, setServiceBroker, start, stop, suspend, unload |
| Methods inherited from class javax.servlet.http.HttpServlet |
doDelete, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service, service |
| Methods inherited from class javax.servlet.GenericServlet |
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, log, log |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PingServlet
public PingServlet()
getPath
protected java.lang.String getPath()
- Description copied from class:
ComponentServlet
- Get the path for the Servlet's registration.
Typically supplied by the component parameter, but
subclasses can hard-code the path by overriding
this method.
- Overrides:
getPath in class ComponentServlet
- Returns:
- a default path if a plugin parameter is not specified
load
public void load()
- This method is called when the agent is created
- Specified by:
load in interface org.cougaar.util.GenericStateModel- Overrides:
load in class ComponentServlet
doGet
public void doGet(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws java.io.IOException
- This method is called whenever the browser loads our URL.
- Overrides:
doGet in class javax.servlet.http.HttpServlet
- Throws:
java.io.IOException