org.cougaar.core.servlet |
|
Java Source File Name | Type | Comment |
BaseServletComponent.java | Class | Abstract base-class for a Component that obtains the ServletService
and registers a Servlet. |
BlackboardServlet.java | Class | |
ComponentServlet.java | Class | Abstract base-class for a Component that is also a Servlet. |
ServletFrameset.java | Class | Base class for serlvets that generate a per-agent data page.
The page is split into three frames, with the agent selection
at the top, data in the middle, and a refresh button at the
bottom. |
ServletMultiFrameset.java | Class | Base class for serlvets that have multiple frames with an
agent selection list. |
ServletUtil.java | Class | Utility methods that may assist in writing Servlets. |
SimpleServletComponent.java | Class | Component that loads a Servlet and provides
the SimpleServletSupport .
Usage in an ".ini" file is:
...
plugin = <this-class>(<servlet-class>, <path>)
...
where
<this-class>
is "org.cougaar.core.servlet.SimpleServletComponent"
<servlet-class>
is the class name of a Servlet.
The servlet must have a zero-argument constructor.
If the Servlet has a
public void setSimpleServletSupport(SimpleServletSupport support)
method then a SimpleServletSupport is passed, which provides
limited access to Cougaar internals.
<path>
is the path for the Servlet, such as "/test".
Most of this code is "reflection-glue" to:
- capture the (classname, path) parameters
- construct the class instance
- examine the class's method(s)
- setup and create a
SimpleServletSupportImpl
instance
Most subclass developers have the classname and path hard-coded,
so they should consider not extending SimpleServletComponent and
instead use BaseServletComponent . |
SimpleServletSupport.java | Interface | This is a simple API for a Servlet to access
COUGAAR Services, such as the Blackboard.
This is for Servlets that are loaded by the
SimpleServletComponent . |
SimpleServletSupportImpl.java | Class | This is a generic API, provided by "SimpleServletComponent",
that allows a Servlet to access COUGAAR Services.
The SimpleServletComponent class passes an instance of
SimpleServletSupport to a Servlet's constructor. |