Package com.luciad.ogc.wcs
Class TLcdWCSCommandDispatcher
java.lang.Object
com.luciad.ogc.common.ALcdOGCCommandDispatcher
com.luciad.ogc.common.TLcdOGCCommandDispatcher
com.luciad.ogc.wcs.TLcdWCSCommandDispatcher
- All Implemented Interfaces:
ILcdDisposable
,AutoCloseable
A command dispatcher class for WCS requests.
- See Also:
-
Field Summary
Fields inherited from class com.luciad.ogc.common.TLcdOGCCommandDispatcher
REQUEST, SERVICE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
dispose()
Disposes of this object and allows it to release any system resources that it is holding.protected void
handleServiceException
(ILcdResponse aResponse, TLcdOGCServiceException aException, ILcdRequest aRequest) Handles a service exception.protected final void
handleUnknownRequest
(String aRequest) Called if no request handler can be found for the given request.protected String
validateService
(String aService, String aRequestType, ILcdRequest aRequest) This method allows implementations to validate the "service" parameter of a request.Methods inherited from class com.luciad.ogc.common.TLcdOGCCommandDispatcher
getRequestHandler, handleRequest, registerRequestHandler
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.luciad.util.ILcdDisposable
close
-
Constructor Details
-
TLcdWCSCommandDispatcher
public TLcdWCSCommandDispatcher()
-
-
Method Details
-
validateService
protected String validateService(String aService, String aRequestType, ILcdRequest aRequest) throws TLcdOGCServiceException Description copied from class:TLcdOGCCommandDispatcher
This method allows implementations to validate the "service" parameter of a request. If the parameter is incorrect, and there is no applicable default value, an exception describing the problem should be thrown. Specific implementations can choose when an exception is to be thrown and when a default value is returned. The default implementation is optimized for WFS compliancy, which results in exceptions in some cases and default values in other cases. Parameters that influence the result are the version and operation name, if they can be derived from the request. This method can be implemented by specific services to improve exception reporting.- Overrides:
validateService
in classTLcdOGCCommandDispatcher
- Parameters:
aService
- the service parameter to validate, e.g. WFSaRequestType
- the name of the request type, e.g. GetCapabilitiesaRequest
- the original request from which the service parameter has been extracted- Returns:
- The name of the service, which is either
aService
or a default value that should be used ifaService
is not correct. - Throws:
TLcdOGCServiceException
- in case the parameter is invalid.
-
handleServiceException
protected void handleServiceException(ILcdResponse aResponse, TLcdOGCServiceException aException, ILcdRequest aRequest) Description copied from class:TLcdOGCCommandDispatcher
Handles a service exception.- Overrides:
handleServiceException
in classTLcdOGCCommandDispatcher
- Parameters:
aResponse
- The response to which the service exception can be encodedaException
- The service exception to handleaRequest
- The original request that triggered the service exception
-
handleUnknownRequest
Description copied from class:TLcdOGCCommandDispatcher
Called if no request handler can be found for the given request. By default, an exception is thrown of typeTLcdOGCServiceException.UNKNOWN_REQUEST
; this triggers a call toTLcdOGCCommandDispatcher.handleServiceException(com.luciad.ogc.common.ILcdResponse, com.luciad.ogc.common.TLcdOGCServiceException, com.luciad.ogc.common.ILcdRequest)
, which by default results in the encoding of an XML service exception report that is sent to the client.- Overrides:
handleUnknownRequest
in classTLcdOGCCommandDispatcher
- Parameters:
aRequest
- The value of the request parameterREQUEST
- Throws:
TLcdWCSServiceException
-
dispose
public void dispose()Description copied from interface:ILcdDisposable
Disposes of this object and allows it to release any system resources that it is holding.
The result of calling any other method (other than
finalize
) on this object subsequent to a call to this method is undefined.- Specified by:
dispose
in interfaceILcdDisposable
- Overrides:
dispose
in classALcdOGCCommandDispatcher
-