|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object dk.netarkivet.viewerproxy.CommandResolver dk.netarkivet.viewerproxy.distribute.HTTPControllerServer
public class HTTPControllerServer
Wrapper for an URIResolver, which calls the controller methods on given specific URLs, and forwards all others to the wrapped handler. This allows you to access control methods by giving specific urls to this class.
Field Summary | |
---|---|
(package private) static java.lang.String |
CHANGE_INDEX_COMMAND
Command for changing index. |
(package private) static java.lang.String |
CLEAR_COMMAND
Command for clearing collected urls. |
(package private) static java.lang.String |
GET_RECORDED_URIS_COMMAND
Command for getting collected urls. |
(package private) static java.lang.String |
GET_STATUS_COMMAND
Command for getting status. |
(package private) static java.lang.String |
INDEX_LABEL_PARAMETER
Parameter for label of an index. |
(package private) static java.lang.String |
JOB_ID_PARAMETER
Parameter for ids of jobs to change index to. |
(package private) static java.lang.String |
LOCALE_PARAMETER
Parameter for locale to generate status. |
(package private) static java.lang.String |
RETURN_URL_PARAMETER
Parameter defining the url to return to after doing start, stop, clear, or changeIndex. |
(package private) static java.lang.String |
START_COMMAND
Command for starting url collection. |
(package private) static java.lang.String |
STOP_COMMAND
Command for stopping url collection. |
Fields inherited from class dk.netarkivet.viewerproxy.CommandResolver |
---|
ur, VIEWERPROXY_COMMAND_NAME |
Fields inherited from interface dk.netarkivet.viewerproxy.URIResolver |
---|
NOT_FOUND |
Constructor Summary | |
---|---|
HTTPControllerServer(Controller c,
URIResolver ur)
Make a new HTTPControllerServer, which calls commands on the given controller, and forwards all other requests to the given URIResolver. |
Method Summary | |
---|---|
protected boolean |
executeCommand(Request request,
Response response)
Handles parsing of the URL and delegating to relevant methods. |
Methods inherited from class dk.netarkivet.viewerproxy.CommandResolver |
---|
isCommandHostRequest, lookup, setURIResolver |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
static final java.lang.String START_COMMAND
static final java.lang.String STOP_COMMAND
static final java.lang.String CLEAR_COMMAND
static final java.lang.String GET_RECORDED_URIS_COMMAND
static final java.lang.String CHANGE_INDEX_COMMAND
static final java.lang.String GET_STATUS_COMMAND
static final java.lang.String RETURN_URL_PARAMETER
static final java.lang.String JOB_ID_PARAMETER
static final java.lang.String INDEX_LABEL_PARAMETER
static final java.lang.String LOCALE_PARAMETER
Constructor Detail |
---|
public HTTPControllerServer(Controller c, URIResolver ur)
c
- The controller which handles commands given in command URLs.ur
- The URIResolver to handle all other uris.
ArgumentNotValid
- if either argument is null.Method Detail |
---|
protected boolean executeCommand(Request request, Response response)
executeCommand
in class CommandResolver
request
- The request to checkresponse
- The response to give command results to if it is a
command. If the request is one of these commands, the
response code is set to 303 if page is redirected to
return url; 200 if command url returns data; otherwise
whatever is returned by the wrapped resolver
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |