com.metamatrix.connector.xml.http
Class HTTPExecutor

java.lang.Object
  extended by com.metamatrix.connector.xml.base.RequestResponseDocumentProducer
      extended by com.metamatrix.connector.xml.http.HTTPExecutor
All Implemented Interfaces:
DocumentProducer

public class HTTPExecutor
extends RequestResponseDocumentProducer

created by JChoate on Jun 27, 2005


Field Summary
protected  HTTPRequestor m_requestor
           
static java.lang.String PARM_INPUT_NAMESPACE_TABLE_PROPERTY_NAME
           
static java.lang.String PARM_INPUT_XPATH_TABLE_PROPERTY_NAME
           
protected  org.apache.commons.httpclient.HttpMethod request
           
 
Fields inherited from class com.metamatrix.connector.xml.base.RequestResponseDocumentProducer
NAMESPACE_PREFIX_PROPERTY_NAME, xmlExtractor
 
Constructor Summary
HTTPExecutor(XMLConnectorState state, XMLExecution execution)
           
 
Method Summary
protected  void addGetValues(org.apache.commons.httpclient.NameValuePair[] pairs, org.apache.commons.httpclient.HttpMethod method)
           
protected  void addPostValues(org.apache.commons.httpclient.NameValuePair[] pairs, org.apache.commons.httpclient.methods.PostMethod method)
           
protected  org.jdom.Document buildInputXMLDocument(java.util.List parameters, java.lang.String inputParmsXPath)
           
 boolean cannotProjectParameter(CriteriaDesc parmCriteria)
          Called by RequestResponseDocumentProducer to determine if an where criteria value can be stashed for projection into a result set.
protected  org.apache.commons.httpclient.NameValuePair[] createNameValuePairs(java.util.List paramPairs)
           
protected  org.jdom.Document createXMLRequestDoc(java.util.List parameterPairs)
           
protected  java.lang.String createXMLRequestDocString(java.util.List parameterPairs)
           
protected  org.apache.commons.httpclient.NameValuePair[] generatePairs(java.lang.String pairString)
           
 boolean getAllowHttp500()
           
 java.lang.String getCacheKey(int i)
           
 int getDocumentCount()
           
 java.io.InputStream getDocumentStream(int i)
           
 java.io.Serializable getRequestObject(int i)
           
 Response getXMLResponse(int invocationNumber)
           
protected  void modifyRequest(org.apache.commons.httpclient.HttpClient client, org.apache.commons.httpclient.HttpMethod method)
           
 void releaseDocumentStream(int i)
           
 void setAllowHttp500(boolean allowHttp500)
           
protected  void setRequests(java.util.List params, java.lang.String bindingURIValue)
           
 
Methods inherited from class com.metamatrix.connector.xml.base.RequestResponseDocumentProducer
addStreamFilters, attemptConditionalLog, buildRawUriString, buildUriString, checkIfRequestIsNeeded, getExecution, getExecutionInfo, getExtractor, getLogger, getState, removeAngleBrackets
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_requestor

protected HTTPRequestor m_requestor

request

protected org.apache.commons.httpclient.HttpMethod request

PARM_INPUT_XPATH_TABLE_PROPERTY_NAME

public static final java.lang.String PARM_INPUT_XPATH_TABLE_PROPERTY_NAME
See Also:
Constant Field Values

PARM_INPUT_NAMESPACE_TABLE_PROPERTY_NAME

public static final java.lang.String PARM_INPUT_NAMESPACE_TABLE_PROPERTY_NAME
See Also:
Constant Field Values
Constructor Detail

HTTPExecutor

public HTTPExecutor(XMLConnectorState state,
                    XMLExecution execution)
             throws ConnectorException
Parameters:
state -
execution -
Throws:
ConnectorException
Method Detail

releaseDocumentStream

public void releaseDocumentStream(int i)
                           throws ConnectorException
Throws:
ConnectorException

getDocumentCount

public int getDocumentCount()
                     throws ConnectorException
Throws:
ConnectorException

getCacheKey

public java.lang.String getCacheKey(int i)
                             throws ConnectorException
Throws:
ConnectorException

getDocumentStream

public java.io.InputStream getDocumentStream(int i)
                                      throws ConnectorException
Throws:
ConnectorException

getXMLResponse

public Response getXMLResponse(int invocationNumber)
                        throws ConnectorException
Throws:
ConnectorException

modifyRequest

protected void modifyRequest(org.apache.commons.httpclient.HttpClient client,
                             org.apache.commons.httpclient.HttpMethod method)
                      throws ConnectorException
Throws:
ConnectorException

cannotProjectParameter

public boolean cannotProjectParameter(CriteriaDesc parmCriteria)
Description copied from class: RequestResponseDocumentProducer
Called by RequestResponseDocumentProducer to determine if an where criteria value can be stashed for projection into a result set. For criteria with multiple calues this is generally false.

Overrides:
cannotProjectParameter in class RequestResponseDocumentProducer

buildInputXMLDocument

protected org.jdom.Document buildInputXMLDocument(java.util.List parameters,
                                                  java.lang.String inputParmsXPath)
                                           throws ConnectorException
Throws:
ConnectorException

createNameValuePairs

protected org.apache.commons.httpclient.NameValuePair[] createNameValuePairs(java.util.List paramPairs)
                                                                      throws ConnectorException
Throws:
ConnectorException

setRequests

protected void setRequests(java.util.List params,
                           java.lang.String bindingURIValue)
                    throws ConnectorException
Throws:
ConnectorException

addGetValues

protected void addGetValues(org.apache.commons.httpclient.NameValuePair[] pairs,
                            org.apache.commons.httpclient.HttpMethod method)
                     throws ConnectorException
Throws:
ConnectorException

addPostValues

protected void addPostValues(org.apache.commons.httpclient.NameValuePair[] pairs,
                             org.apache.commons.httpclient.methods.PostMethod method)
                      throws ConnectorException
Throws:
ConnectorException

createXMLRequestDoc

protected org.jdom.Document createXMLRequestDoc(java.util.List parameterPairs)
                                         throws ConnectorException
Throws:
ConnectorException

createXMLRequestDocString

protected java.lang.String createXMLRequestDocString(java.util.List parameterPairs)
                                              throws ConnectorException
Throws:
ConnectorException

generatePairs

protected org.apache.commons.httpclient.NameValuePair[] generatePairs(java.lang.String pairString)

getRequestObject

public java.io.Serializable getRequestObject(int i)
                                      throws ConnectorException
Throws:
ConnectorException

setAllowHttp500

public void setAllowHttp500(boolean allowHttp500)

getAllowHttp500

public boolean getAllowHttp500()


Copyright © 2009. All Rights Reserved.