Package com.sforce.ws.transport
Interface Transport
-
- All Known Implementing Classes:
GaeHttpTransport,JdkHttpTransport
public interface TransportThis interface defines a Transport.- Since:
- 1.0 Nov 30, 2005
- Version:
- 1.0
- Author:
- http://cheenath.com
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.io.OutputStreamconnect(java.lang.String url, java.lang.String soapAction)Connect to the specified endpoint.java.io.OutputStreamconnect(java.lang.String endpoint, java.util.HashMap<java.lang.String,java.lang.String> headers)java.io.OutputStreamconnect(java.lang.String endpoint, java.util.HashMap<java.lang.String,java.lang.String> httpHeaders, boolean b)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)
-
-
-
Method Detail
-
setConfig
void setConfig(ConnectorConfig config)
-
connect
java.io.OutputStream connect(java.lang.String url, java.lang.String soapAction) throws java.io.IOExceptionConnect to the specified endpoint.- Parameters:
url- endpoint addresssoapAction- soap action- Returns:
- output stream that can be used to send response
- Throws:
java.io.IOException- failed to connect to the endpoint
-
getContent
java.io.InputStream getContent() throws java.io.IOExceptionreturns the response from the endpoint. This method must be called after a connect call.- Returns:
- response or error stream.
- Throws:
java.io.IOException- failed to get content
-
isSuccessful
boolean isSuccessful()
checks whether the response from the remote server is successful or not.- Returns:
- true if the call was successful
-
connect
java.io.OutputStream connect(java.lang.String endpoint, java.util.HashMap<java.lang.String,java.lang.String> headers) throws java.io.IOException- Throws:
java.io.IOException
-
connect
java.io.OutputStream connect(java.lang.String endpoint, java.util.HashMap<java.lang.String,java.lang.String> httpHeaders, boolean b) throws java.io.IOException- Throws:
java.io.IOException
-
-