|
SAP NetWeaver 7.40 SP 07 KMC | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface IICEHttpConnection
A helper class representing a HTTP connection to an ICE server.
This class is used to transport an ICE payload via the HTTP protocol to an ICE server. The ICE payload will be encapsulated in the body of the HTTP request.
When calling methods of this interface, a certain order has to be observed.
getOutputperformThe code sample shows how to setup the connection and send an ICE payload.
// create connection
IICEHttpConnection connection = buildConnection(...);
// initialize connection
HashMap map = new HashMap();
map.put(IICEHttpConnection.USER_KEY, user);
map.put(IICEHttpConnection.PASSWORD_KEY, password);
connection.setResponseHandler(responseHandler);
connection.setLogonData(map);
connection.setMethod("POST");
// build the ICE payload and send it
IICERequestElement request = buildRequest(...);
ICEOutput output = connection.getOutput(true);
String requestID = output.addRequest(request);
connection.perform(null);
Copyright (c) SAP AG
| Field Summary | |
|---|---|
static String |
PASSWORD_KEY
key to use when specifying the password in the logon data map |
static String |
USER_KEY
key to use when specifying the user in the logon data map |
| Method Summary | |
|---|---|
IAbortCondition |
getAbortCondition()
Gets the abort condition for this connection consisting of the maximum number of bytes written to the pipe as well as an expiration date/time. |
ICEOutput |
getOutput(boolean chunked)
Gets the ICEOutput object that builds the ICE payload for
sending to the server. |
void |
perform(ICEOutput output)
Sends the ICE payload to the server and sends the response to the registered response handler. |
void |
setAbortCondition(long maxBytes,
Date expiration)
Sets the maximum number of bytes written to the pipe as well as an expiration date/time. |
void |
setLogonData(HashMap env)
Sets the login information needed for connecting to the ICE server. |
void |
setMethod(String method)
Sets the request method of the HTTP request. |
void |
setResponseHandler(IICEResponseHandler handler)
Sets the response handler for this connection responsible for initiating appropriate actions in reaction to the response sent by the ICE server. |
| Field Detail |
|---|
static final String USER_KEY
setLogonData(java.util.HashMap),
Constant Field Valuesstatic final String PASSWORD_KEY
setLogonData(java.util.HashMap),
Constant Field Values| Method Detail |
|---|
void setMethod(String method)
Passing null as an argument for method
will cause an exception.
method - a String specifying the method to use for the
HTTP request (either POST or GET)
void setAbortCondition(long maxBytes,
Date expiration)
Passing null as an argument for expiration
sets the expiration to positive infinity (thus, disabling expiration checks).
maxBytes - the maximum number of bytes written to the pipeexpiration - the date/time specifying this connection's expirationIAbortCondition getAbortCondition()
IAbortCondition with the specified abort information
or null if none was specifiedvoid setLogonData(HashMap env)
This login information contains two Strings specifying the
user and password.
env - a HashMap containing the user (specified with key
IICEHttpConnection.USER_KEY) and password (specified with key
IICEHttpConnection.PASSWORD_KEY)void setResponseHandler(IICEResponseHandler handler)
Passing null as an argument for handler
will cause the response to be ignored completly.
handler - the new response handlerIICEResponseHandler
ICEOutput getOutput(boolean chunked)
throws IOException
ICEOutput object that builds the ICE payload for
sending to the server.
ICE requests which should be contained in the ICE payload can be added to
this ICEOutput object.
chunked - true if the ICEOutput should
be in chunked mode, false otherwise
ICEOutput that builds the ICE payload
IOException - if an initial connection attempt failed (an
implementation of this interface may use this method
to check theavailability of the ICE server)
void perform(ICEOutput output)
throws IOException
Registering no response handler will cause the response to be ignored completely.
Passing null as an argument for output
will result in ignoring the answers to the responses. As ICE is
request/response-orientated, there is usually no need for answers to responses.
Thus, this parameter will usually be null.
output - an ICEOutput that receives the answers
to the responses from the server
IOException - if an I/O error occurs| Access Rights |
|---|
| SC | DC | Public Part | ACH |
|---|---|---|---|
[sap.com] KMC-CM
|
[sap.com] tc/km/frwk
|
api
|
EP-KM-CM
|
[sap.com] KMC-WPC
|
[sap.com] tc/kmc/wpc/wpcfacade
|
api
|
EP-PIN-WPC-WCM
|
|
SAP NetWeaver 7.40 SP 07 KMC | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||