Package com.luciad.ogc.wfs
Class TLcdWFSCommandDispatcher
java.lang.Object
com.luciad.ogc.common.ALcdOGCCommandDispatcher
com.luciad.ogc.common.TLcdOGCCommandDispatcher
com.luciad.ogc.wfs.TLcdWFSCommandDispatcher
- 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 TypeMethodDescriptionprotected 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 com.luciad.ogc.common.ALcdOGCCommandDispatcher
dispose
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
-
TLcdWFSCommandDispatcher
public TLcdWFSCommandDispatcher()
-
-
Method Details
-
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:
TLcdWFSServiceException
-
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
-
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.
-