Package org.olap4j.driver.xmla.proxy
Class XmlaOlap4jHttpProxy
java.lang.Object
org.olap4j.driver.xmla.proxy.XmlaOlap4jHttpProxy
- All Implemented Interfaces:
XmlaOlap4jCachedProxy
,XmlaOlap4jProxy
Extends the AbstractCachedProxy and serves as
a production ready http communication class. Every SOAP request
sends a POST call to the destination XMLA server and returns
the response as a byte array, conforming to the Proxy interface.
It also takes advantage of the AbstractHttpProxy cookie managing facilities. All cookies received from the end point server will be sent back if they are not expired and they also conform to cookie domain rules.
- Author:
- Luc Boudreau and Julian Hyde
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbyte[]
get
(XmlaOlap4jServerInfos serverInfos, String request) Sends a request to a URL and returns the response.Returns the name of the character set use for encoding the XML string.byte[]
getResponse
(XmlaOlap4jServerInfos serverInfos, String request) Sends a request to a URL and returns the response.Future<byte[]>
getResponseViaSubmit
(XmlaOlap4jServerInfos serverInfos, String request) Submits a request for background execution.void
Sets the cache class to use as a SOAP message cache.Future<byte[]>
submit
(XmlaOlap4jServerInfos serverInfos, String request) Submits a request for background execution.
-
Constructor Details
-
XmlaOlap4jHttpProxy
Creates a XmlaOlap4jHttpProxy.- Parameters:
driver
- Driver
-
-
Method Details
-
getResponse
public byte[] getResponse(XmlaOlap4jServerInfos serverInfos, String request) throws XmlaOlap4jProxyException Sends a request to a URL and returns the response.request
- Request string- Returns:
- Response
- Throws:
XmlaOlap4jProxyException
-
getResponseViaSubmit
Submits a request for background execution.request
- Request- Returns:
- Future object representing the submitted job
-
getEncodingCharsetName
Description copied from interface:XmlaOlap4jProxy
Returns the name of the character set use for encoding the XML string. -
setCache
Description copied from interface:XmlaOlap4jCachedProxy
Sets the cache class to use as a SOAP message cache.
Calling this method is not mandatory. If it isn't called, no cache will be used and all SOAP requests will be sent to the service end-point.
- Specified by:
setCache
in interfaceXmlaOlap4jCachedProxy
- Parameters:
config
- This contains all the parameters used to configure the Olap4j driver. It contains the full class name of the cache implementation to use as well as the raw Cache config parameters.properties
- The properties to configure the cache, so all config parameters which started by Cache.* are inside this convenient thigny.- Throws:
OlapException
- See Also:
-
get
public byte[] get(XmlaOlap4jServerInfos serverInfos, String request) throws XmlaOlap4jProxyException Description copied from interface:XmlaOlap4jProxy
Sends a request to a URL and returns the response.- Specified by:
get
in interfaceXmlaOlap4jProxy
- Parameters:
serverInfos
- Server infos.request
- Request string- Returns:
- Response The byte array that contains the whole response from the server.
- Throws:
XmlaOlap4jProxyException
- If anything occurs during the request execution.
-
submit
Description copied from interface:XmlaOlap4jProxy
Submits a request for background execution.- Specified by:
submit
in interfaceXmlaOlap4jProxy
- Parameters:
serverInfos
- Server infos.request
- Request- Returns:
- Future object representing the submitted job
-