Package org.olap4j.driver.xmla.proxy
Class XmlaOlap4jHttpProxy
- java.lang.Object
-
- org.olap4j.driver.xmla.proxy.XmlaOlap4jHttpProxy
-
- All Implemented Interfaces:
XmlaOlap4jCachedProxy
,XmlaOlap4jProxy
public class XmlaOlap4jHttpProxy extends java.lang.Object
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 Constructor Description XmlaOlap4jHttpProxy(XmlaOlap4jDriver driver)
Creates a XmlaOlap4jHttpProxy.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]
get(XmlaOlap4jServerInfos serverInfos, java.lang.String request)
Sends a request to a URL and returns the response.java.lang.String
getEncodingCharsetName()
Returns the name of the character set use for encoding the XML string.byte[]
getResponse(XmlaOlap4jServerInfos serverInfos, java.lang.String request)
Sends a request to a URL and returns the response.java.util.concurrent.Future<byte[]>
getResponseViaSubmit(XmlaOlap4jServerInfos serverInfos, java.lang.String request)
Submits a request for background execution.void
setCache(java.util.Map<java.lang.String,java.lang.String> config, java.util.Map<java.lang.String,java.lang.String> properties)
Sets the cache class to use as a SOAP message cache.java.util.concurrent.Future<byte[]>
submit(XmlaOlap4jServerInfos serverInfos, java.lang.String request)
Submits a request for background execution.
-
-
-
Constructor Detail
-
XmlaOlap4jHttpProxy
public XmlaOlap4jHttpProxy(XmlaOlap4jDriver driver)
Creates a XmlaOlap4jHttpProxy.- Parameters:
driver
- Driver
-
-
Method Detail
-
getResponse
public byte[] getResponse(XmlaOlap4jServerInfos serverInfos, java.lang.String request) throws XmlaOlap4jProxyException
Sends a request to a URL and returns the response.request
- Request string- Returns:
- Response
- Throws:
XmlaOlap4jProxyException
-
getResponseViaSubmit
public java.util.concurrent.Future<byte[]> getResponseViaSubmit(XmlaOlap4jServerInfos serverInfos, java.lang.String request)
Submits a request for background execution.request
- Request- Returns:
- Future object representing the submitted job
-
getEncodingCharsetName
public java.lang.String getEncodingCharsetName()
Description copied from interface:XmlaOlap4jProxy
Returns the name of the character set use for encoding the XML string.
-
setCache
public void setCache(java.util.Map<java.lang.String,java.lang.String> config, java.util.Map<java.lang.String,java.lang.String> properties) throws OlapException
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:
XmlaOlap4jCache
-
get
public byte[] get(XmlaOlap4jServerInfos serverInfos, java.lang.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
public java.util.concurrent.Future<byte[]> submit(XmlaOlap4jServerInfos serverInfos, java.lang.String request)
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
-
-