no.sesat.search.mode.command
Class AbstractXmlRestful
java.lang.Object
no.sesat.search.mode.command.AbstractXmlRestful
- All Implemented Interfaces:
- Restful, XmlRestful
public abstract class AbstractXmlRestful
- extends Object
- implements XmlRestful
Base implementation for search commands that are RESTful and have XML responses.
The RESTful server is defined through:
host: AbstractXmlSearchConfiguration.getHost()
port: AbstractXmlSearchConfiguration.getPort()
- Version:
- $Id: AbstractXmlRestful.java 7225 2009-04-09 00:32:20Z ssmiweve $
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractXmlRestful
public AbstractXmlRestful(SearchCommand.Context cxt)
- Create new xml based command.
- Parameters:
cxt - The context to execute in.
getXmlResult
public final Document getXmlResult()
throws IOException,
SAXException
- Description copied from interface:
XmlRestful
- Obtain the loaded Document, of the RESTful result.
Makes the presumption that the RESTful service returns an well formed xml response.
- Specified by:
getXmlResult in interface XmlRestful
- Returns:
- the w3c dom Document
- Throws:
IOException - failure to read the response (or sent the request)
SAXException - failure to parse/load the xml into a dom
getHttpReader
public final BufferedReader getHttpReader(String encoding)
throws IOException
- Description copied from interface:
Restful
- Obtain a BufferedReader, in the given encoding, of the RESTful result.
Makes the presumption that the RESTful service returns an ascii and not binary response.
- Specified by:
getHttpReader in interface Restful
- Returns:
-
- Throws:
IOException
getContext
public SearchCommand.Context getContext()
Copyright © 2005-2009 Schibsted ASA. All Rights Reserved.