|
Sun Adapter for HTTP API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface HTTPRequest
This interface represents an HTTP application request.
Method Summary | |
---|---|
void |
addContentType(java.lang.String contentTypeValue)
Adds a value to the Content-type header. |
void |
addHeader(java.lang.String name,
java.lang.String value)
Adds an HTTP request header to be sent along with the next HTTP request. |
void |
addParameterRequest(java.lang.String name,
java.lang.String value)
Adds a parameter (name/value form-data pair). |
void |
clear()
Resets the HTTP request object. |
void |
clearContentType()
Removes all values from the Content-type header, essentially deleting the Content-type header. |
void |
clearHeader()
Removes all HTTP request headers. |
void |
clearParameterRequest()
Removes all parameters (name/value form-data pairs). |
int |
getStrongestAuthSchemeLevel()
User can get the strongest authentication scheme level currently set. |
java.lang.String |
getURL()
Gets the current HTTP URL. |
void |
removeContentType(java.lang.String contentTypeValue)
Removes a value from the Content-type header. |
void |
removeHeader(java.lang.String name)
Removes an HTTP request header. |
void |
removeParameterRequest(java.lang.String name)
Removes a parameter (name/value form-data pair). |
void |
setByteRequestBody(byte[] requestBody)
Sets the request body with a byte array payload. |
void |
setCredentials(java.lang.String userName,
java.lang.String password)
Sets the user credentials (user name and password) for the underlined URL |
void |
setStringRequestBody(java.lang.String requestBody)
Sets the request body with a String payload. |
void |
setStrongestAuthSchemeLevel(int schemeCode)
User can set the strongest authentication scheme level allowable; if basic level is set, then all basic challenge received will be attempted but digest challenge will be ignored; if digest level is set, then all basic and digest challenges received will be attempted; if automatic detection level is set, then it will behave the same way as for Digest Authentication but for future purpose it implies that it will attempt any supported authentication schemes. |
void |
setURL(java.lang.String url)
Sets the URL for the HTTP request. |
Method Detail |
---|
void clear() throws HTTPApplicationException
HTTPApplicationException
- upon error.void setURL(java.lang.String url) throws HTTPApplicationException
url
- The HTTP URL to set.
HTTPApplicationException
- upon error.java.lang.String getURL() throws HTTPApplicationException
HTTPApplicationException
- upon error.void addHeader(java.lang.String name, java.lang.String value) throws HTTPApplicationException
name
- The name of the HTTP header.value
- The value of the HTTP header.
HTTPApplicationException
- upon error.void removeHeader(java.lang.String name) throws HTTPApplicationException
name
- The name of the HTTP header to remove.
HTTPApplicationException
- upon error.void clearHeader() throws HTTPApplicationException
HTTPApplicationException
- upon error.void addContentType(java.lang.String contentTypeValue) throws HTTPApplicationException
contentTypeValue
- The value to add for the Content-type header.
HTTPApplicationException
- upon error.void removeContentType(java.lang.String contentTypeValue) throws HTTPApplicationException
contentTypeValue
- The value to remove from the Content-type header.
HTTPApplicationException
- upon error.void clearContentType() throws HTTPApplicationException
HTTPApplicationException
- upon error.void addParameterRequest(java.lang.String name, java.lang.String value) throws HTTPApplicationException
name
- The name of the parameter.value
- The value of the parameter.
HTTPApplicationException
- upon error.void removeParameterRequest(java.lang.String name) throws HTTPApplicationException
name
- The name of the parameter to remove.
HTTPApplicationException
- upon error.void clearParameterRequest() throws HTTPApplicationException
HTTPApplicationException
- upon error.void setByteRequestBody(byte[] requestBody) throws HTTPApplicationException
requestBody
- The name of the parameter to remove.
HTTPApplicationException
- upon error.void setStringRequestBody(java.lang.String requestBody) throws HTTPApplicationException
requestBody
- The name of the parameter to remove.
HTTPApplicationException
- upon error.void setCredentials(java.lang.String userName, java.lang.String password) throws HTTPApplicationException
userName
- The user name for authenticating the URLpassword
- The password for authenticating the URL
HTTPApplicationException
- upon error.void setStrongestAuthSchemeLevel(int schemeCode) throws HTTPApplicationException
schemeCode
- The strongest level of authentication allowable;
0 -- Basic authentication will be attemnpted per rfc 2617
1 -- Digest authentication will be attemnpted per rfc 2617
999 -- Automatic detection, i.e., either basic or digest authentication
will be attemnpted per rfc 2617
HTTPApplicationException
- upon error.int getStrongestAuthSchemeLevel() throws HTTPApplicationException
HTTPApplicationException
- upon error.
|
Sun Adapter for HTTP API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |