Package com.sforce.ws.transport
Class GaeHttpTransport
java.lang.Object
com.sforce.ws.transport.GaeHttpTransport
- All Implemented Interfaces:
Transport
This class is an implementation of Transport using the Google AppEngine
urlFetch
- Since:
- 1.0 Jan 29 2009
- Version:
- 1.0
- Author:
- Ron Hess
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionConnect to the specified endpoint.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) returns the response from the endpoint.booleanchecks whether the response from the remote server is successful or not.voidsetConfig(ConnectorConfig config)
-
Constructor Details
-
GaeHttpTransport
public GaeHttpTransport()
-
-
Method Details
-
setConfig
-
connect
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
- 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
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
-