org.cougaar.lib.web.service |
This package contains the Cougaar
implementation of the {@link
org.cougaar.core.service.ServletService}, which provides HTTP
access into Cougaar agents.
This package defines the node-level {@link
org.cougaar.lib.web.service.RootServletServiceComponent}, which
creates the {@link org.cougaar.lib.web.arch.server.ServletEngine}
and advertises the {@link
org.cougaar.lib.web.service.RootServletService}. The standard {@link
org.cougaar.lib.web.arch.server.ServletEngine} implementation is
based on Tomcat and is
defined in the "webtomcat" module ("org.cougaar.lib.web.tomcat") to
avoid compile dependencies and allow for non-Tomcat implementations.
From the {@link org.cougaar.lib.web.arch.server.ServletEngine}'s
point of view, there is just one "gateway" servlet, the
{@link org.cougaar.lib.web.arch.root.RootServlet}.
Agents are loaded with the {@link
org.cougaar.lib.web.service.LeafServletServiceComponent}, which
obtains the {@link org.cougaar.lib.web.service.RootServletService},
registers the agent's "/$name" path, and advertises the {@link
org.cougaar.core.service.ServletService} for component use.
For more detail, including configuration options and example servlets,
see the
Cougaar Developers' Guide.
|
Java Source File Name | Type | Comment |
AgentsServlet.java | Class | A servlet that handles all "/agents" requests by optionally
displaying locally-registered names or globally-registered names
(in the nameserver).
The supported URL-parameter arguments are:
- "?suffix=" -- list the local agent names (default)
- "?suffix=text" -- list the agent names in the
global white pages with the matching suffix, where "."
is the root.
|
BlockRobotsServlet.java | Class | This servlet handles "/robots.txt" requests with a hard-coded disallow
response:
User-agent: *
Disallow: /
to keep out web-crawlers, such as Google. |
FavIconServlet.java | Class | This servlet handles "/favicon.ico" requests with our local "favicon.ico"
image file. |
FileServlet.java | Class | A servlet that provides directory and file read access.
For example, to read file "$CIP/foo/bar.txt" on agent "A":
http://localhost:8800/$A/file/foo/bar.txt
We ignore most security issues. |
LeafServletServiceComponent.java | Class | This component advertises the agent-internal
ServletService , based
upon the node-level
RootServletService . |
ListRegistryServlet.java | Class | A servlet that displays all the paths in a ServletRegistry ,
for leaf servlet service use (within an Agent). |
NamingServerRegistry.java | Class | An implementation of
GlobalRegistry that uses the
WhitePagesService . |
RootServletService.java | Interface | This service is the root-level ServletService, for use each
agent's
LeafServletServiceComponent to advertise the
org.cougaar.core.service.ServletService . |
RootServletServiceComponent.java | Class | This component uses the
ServletEngineService to advertise the
root-level
RootServletService , which is used by the
agent-level
LeafServletServiceComponent s to create the
agent-internal
org.cougaar.core.service.ServletService .
For example, node "N" creates the new root-level RootServletService
for all agents. |
UnknownLeafPathServlet.java | Class | A "/$name[/.*]" level servlet that:
- generates a help message for "/$name" and "/$name/"
requests, and
- generates an error message for all other (unknown)
paths
. |
WelcomeServlet.java | Class | A servlet that generates a top-level HTML welcome page in response
to the "/" path. |