org.iges.anagram.service
Class ErrorService
java.lang.Object
|
+--org.iges.anagram.AbstractModule
|
+--org.iges.anagram.service.Service
|
+--org.iges.anagram.service.ErrorService
- All Implemented Interfaces:
- Module
- Direct Known Subclasses:
- DODSErrorService, WebErrorService
- public abstract class ErrorService
- extends Service
A special type of service called when normal request processing
produces an error.
Methods inherited from class org.iges.anagram.AbstractModule |
configModule, configure, debug, debug, error, fail, fail, fail, getModuleName, info, init, toString, verbose, verbose |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
ErrorService
public ErrorService()
handle
public void handle(ClientRequest request)
- Not used by an error service
- Specified by:
handle
in class Service
- Parameters:
request
- The request to be handled
handle
public void handle(ClientRequest request,
ModuleException me)
- Handles "known" errors, i.e. those which are intentionally
generated by other Anagram modules.
Calls the subclass's implementation of sendErrorMsg()
to send an error message to the client, and logs the error
handleUnexpected
public void handleUnexpected(ClientRequest request,
java.lang.Throwable t)
- Handles "unexpected" errors, i.e. those which result from
runtime problems and coding errors.
Calls the subclass's implementation of sendUnexpectedErrorMsg()
to send an error message to the client, and logs the error
sendErrorMsg
protected abstract void sendErrorMsg(ClientRequest request,
java.lang.String msg)
- Sends the message provided in a format defined by the
ErrorService implementation. Called by
handle()
.
sendUnexpectedErrorMsg
protected abstract void sendUnexpectedErrorMsg(ClientRequest request,
java.lang.String debugInfo)
- Sends the "unexpected error" message provided in a format
defined by the ErrorService implementation.
Called by
handle()
.