Package com.sforce.ws.transport
Class JdkHttpTransport
- java.lang.Object
-
- com.sforce.ws.transport.JdkHttpTransport
-
-
Constructor Summary
Constructors Constructor Description JdkHttpTransport()JdkHttpTransport(ConnectorConfig config)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.io.OutputStreamconnect(java.lang.String uri, java.lang.String soapAction)Connect to the specified endpoint.java.io.OutputStreamconnect(java.lang.String uri, java.util.HashMap<java.lang.String,java.lang.String> httpHeaders)java.io.OutputStreamconnect(java.lang.String uri, java.util.HashMap<java.lang.String,java.lang.String> httpHeaders, boolean enableCompression)static java.net.HttpURLConnectioncreateConnection(ConnectorConfig config, java.net.URL url, java.util.HashMap<java.lang.String,java.lang.String> httpHeaders)static java.net.HttpURLConnectioncreateConnection(ConnectorConfig config, java.net.URL url, java.util.HashMap<java.lang.String,java.lang.String> httpHeaders, boolean enableCompression)java.io.InputStreamgetContent()returns the response from the endpoint.booleanisSuccessful()checks whether the response from the remote server is successful or not.voidsetConfig(ConnectorConfig config)
-
-
-
Constructor Detail
-
JdkHttpTransport
public JdkHttpTransport()
-
JdkHttpTransport
public JdkHttpTransport(ConnectorConfig config)
-
-
Method Detail
-
setConfig
public void setConfig(ConnectorConfig config)
-
connect
public java.io.OutputStream connect(java.lang.String uri, java.util.HashMap<java.lang.String,java.lang.String> httpHeaders) throws java.io.IOException
-
connect
public java.io.OutputStream connect(java.lang.String uri, java.util.HashMap<java.lang.String,java.lang.String> httpHeaders, boolean enableCompression) throws java.io.IOException
-
connect
public java.io.OutputStream connect(java.lang.String uri, java.lang.String soapAction) throws java.io.IOExceptionDescription copied from interface:TransportConnect to the specified endpoint.
-
createConnection
public static java.net.HttpURLConnection createConnection(ConnectorConfig config, java.net.URL url, java.util.HashMap<java.lang.String,java.lang.String> httpHeaders) throws java.io.IOException
- Throws:
java.io.IOException
-
createConnection
public static java.net.HttpURLConnection createConnection(ConnectorConfig config, java.net.URL url, java.util.HashMap<java.lang.String,java.lang.String> httpHeaders, boolean enableCompression) throws java.io.IOException
- Throws:
java.io.IOException
-
getContent
public java.io.InputStream getContent() throws java.io.IOExceptionDescription 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:
java.io.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
-
-