Package com.sforce.ws.transport
Class GaeHttpTransport
- java.lang.Object
-
- com.sforce.ws.transport.GaeHttpTransport
-
-
Constructor Summary
Constructors Constructor Description GaeHttpTransport()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description OutputStreamconnect(String uri, String soapAction)Connect to the specified endpoint.OutputStreamconnect(String endpoint, HashMap<String,String> headers)OutputStreamconnect(String uri, HashMap<String,String> httpHeaders, boolean enableCompression)static com.google.appengine.api.urlfetch.HTTPRequestcreateRequest(ConnectorConfig config, URL url, Map<String,String> httpHeaders)static com.google.appengine.api.urlfetch.HTTPRequestcreateRequest(ConnectorConfig config, URL url, Map<String,String> httpHeaders, boolean enableCompression)InputStreamgetContent()returns the response from the endpoint.booleanisSuccessful()checks whether the response from the remote server is successful or not.voidsetConfig(ConnectorConfig config)
-
-
-
Method Detail
-
setConfig
public void setConfig(ConnectorConfig config)
-
connect
public OutputStream connect(String uri, String soapAction) throws IOException
Description copied from interface:TransportConnect to the specified endpoint.- Specified by:
connectin interfaceTransport- Parameters:
uri- endpoint addresssoapAction- soap action- Returns:
- output stream that can be used to send response
- Throws:
IOException- failed to connect to the endpoint
-
connect
public OutputStream connect(String endpoint, HashMap<String,String> headers) throws IOException
- Specified by:
connectin interfaceTransport- Throws:
IOException
-
connect
public OutputStream connect(String uri, HashMap<String,String> httpHeaders, boolean enableCompression) throws IOException
- Specified by:
connectin interfaceTransport- Throws:
IOException
-
createRequest
public static com.google.appengine.api.urlfetch.HTTPRequest createRequest(ConnectorConfig config, URL url, Map<String,String> httpHeaders) throws IOException
- Throws:
IOException
-
createRequest
public static com.google.appengine.api.urlfetch.HTTPRequest createRequest(ConnectorConfig config, URL url, Map<String,String> httpHeaders, boolean enableCompression) throws IOException
- Throws:
IOException
-
getContent
public InputStream getContent() throws IOException
Description copied from interface:Transportreturns the response from the endpoint. This method must be called after a connect call.- Specified by:
getContentin interfaceTransport- Returns:
- response or error stream.
- Throws:
IOException- failed to get content
-
isSuccessful
public boolean isSuccessful()
Description copied from interface:Transportchecks whether the response from the remote server is successful or not.- Specified by:
isSuccessfulin interfaceTransport- Returns:
- true if the call was successful
-
-