public abstract class AbstractWFSResponseFactory extends Object implements WFSResponseFactory
WFSResponseFactoryimplementations. Provides support for detecting and parsing of exception reports received as
Subclasses have to
createResponseImpl(WFSRequest, HTTPResponse, InputStream).
|Constructor and Description|
|Modifier and Type||Method and Description|
Returns either a properly parsed response object or an exception depending on what the server returned.
Has to be implemented to turn the request and response into a proper
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public WFSResponse createResponse(WFSRequest request, HTTPResponse response) throws IOException
Ideally, the decision should only be taken based on the WFS response's content-type HTTP header. Truth is, some WFS implementations does not set proper HTTP response headers so a bit of an heuristic may be needed in order to identify the actual response.
response- the handle to the response contents the WFS sent
WFSResponseParserthat can deal with the given WFS response
protected abstract WFSResponse createResponseImpl(WFSRequest request, HTTPResponse response, InputStream in) throws IOException
in- The stream to read the response from. It is safe not to close this stream explicitly but to dispose the response instead.
protected abstract boolean isValidResponseHead(String head)
head- The first couple of characters from the response, typically the first 512
Copyright © 1996–2018 Geotools. All rights reserved.