|
||||||||||
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.UnknownCommandResolver
public class UnknownCommandResolver
Wrapper for an URIResolver, which gives failures on specific specific URLs, and forwards all others to the wrapped handler. This allows you to reserve a specific host for commands and get a well-defined error if giving an undefined command.
Field Summary |
---|
Fields inherited from class dk.netarkivet.viewerproxy.CommandResolver |
---|
ur, VIEWERPROXY_COMMAND_NAME |
Fields inherited from interface dk.netarkivet.viewerproxy.URIResolver |
---|
NOT_FOUND |
Constructor Summary | |
---|---|
UnknownCommandResolver(URIResolver ur)
Make a new UnknownCommandResolver, which gives an error for any command- like URL and forwards other URLs to the given URIResolver |
Method Summary | |
---|---|
protected boolean |
executeCommand(Request request,
Response response)
Helper method that checks if this is a command URL and throw an error if it is. |
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 |
Constructor Detail |
---|
public UnknownCommandResolver(URIResolver ur)
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
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |