com.metamatrix.connector.xml.http
Class HTTPRequest

java.lang.Object
  extended by com.metamatrix.connector.xml.http.BaseRequest
      extended by com.metamatrix.connector.xml.http.HTTPRequest
Direct Known Subclasses:
SOAPRequest

public class HTTPRequest
extends BaseRequest


Field Summary
static java.lang.String PARM_INPUT_NAMESPACE_TABLE_PROPERTY_NAME
           
static java.lang.String PARM_INPUT_XPATH_TABLE_PROPERTY_NAME
           
 
Fields inherited from class com.metamatrix.connector.xml.http.BaseRequest
execution, exeInfo, parameters, state, uriString
 
Constructor Summary
HTTPRequest(HTTPConnectorState state, XMLExecution execution, ExecutionInfo exeInfo, java.util.List<CriteriaDesc> parameters)
           
 
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)
           
 java.io.InputStream addStreamFilters(java.io.InputStream response, ConnectorLogger logger)
           
protected  void attemptConditionalLog(java.lang.String message)
           
protected  org.jdom.Document buildInputXMLDocument(java.util.List parameters, java.lang.String inputParmsXPath)
           
 boolean cannotProjectParameter(CriteriaDesc parmCriteria)
           
static boolean checkIfRequestIsNeeded(ExecutionInfo info)
          Examines the Query to determine if a request to a source is needed.
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  java.io.InputStream executeRequest()
           
protected  org.apache.commons.httpclient.NameValuePair[] generatePairs(java.lang.String pairString)
           
 boolean getAllowHttp500()
           
protected  java.lang.String getCacheKey()
           
 Document getDocumentStream()
           
protected  ConnectorLogger getLogger()
           
 java.io.Serializable getRequestObject(int i)
           
protected  HTTPConnectorState getState()
           
protected  void initialize()
           
protected  void modifyRequest(org.apache.commons.httpclient.HttpClient client, org.apache.commons.httpclient.HttpMethod method)
           
 void release()
           
protected  java.lang.String removeAngleBrackets(java.lang.String uri)
           
protected  void setRequests(java.util.List<CriteriaDesc> params, java.lang.String bindingURIValue)
           
 
Methods inherited from class com.metamatrix.connector.xml.http.BaseRequest
buildRawUriString, getUriString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

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

HTTPRequest

public HTTPRequest(HTTPConnectorState state,
                   XMLExecution execution,
                   ExecutionInfo exeInfo,
                   java.util.List<CriteriaDesc> parameters)
            throws ConnectorException
Throws:
ConnectorException
Method Detail

initialize

protected void initialize()
                   throws ConnectorException
Specified by:
initialize in class BaseRequest
Throws:
ConnectorException

getDocumentStream

public Document getDocumentStream()
                           throws ConnectorException
Throws:
ConnectorException

getAllowHttp500

public boolean getAllowHttp500()

release

public void release()

getCacheKey

protected java.lang.String getCacheKey()
                                throws ConnectorException
Throws:
ConnectorException

executeRequest

protected java.io.InputStream executeRequest()
                                      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)

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<CriteriaDesc> 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

getState

protected HTTPConnectorState getState()

getLogger

protected ConnectorLogger getLogger()

addStreamFilters

public java.io.InputStream addStreamFilters(java.io.InputStream response,
                                            ConnectorLogger logger)
                                     throws ConnectorException
Throws:
ConnectorException

checkIfRequestIsNeeded

public static boolean checkIfRequestIsNeeded(ExecutionInfo info)
                                      throws ConnectorException
Examines the Query to determine if a request to a source is needed. If any of the request parameters is a ResponseIn, then we don't need to make a request because it has already been made by another call to Execution.execute()

Throws:
ConnectorException

removeAngleBrackets

protected java.lang.String removeAngleBrackets(java.lang.String uri)

attemptConditionalLog

protected void attemptConditionalLog(java.lang.String message)


Copyright © 2009. All Rights Reserved.