|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.ibm.di.connector.maximo.util.HttpClient
public final class HttpClient
HTTP client used for request/response communication.
This HTTP client will try to communicate with one of the HTTP servers provided by target URL list.
| Constructor Summary | |
|---|---|
HttpClient(Log log)
|
|
| Method Summary | |
|---|---|
InputStream |
getAsInputStream()
Requests the resource specified by the target URL list as an input stream. |
List<String> |
getTargetUrlList()
|
String |
post(String msg)
Requests the resource specified by the target URL list. |
void |
setAuthenticationRequired(boolean isRequired)
Indicates if the authentication header containing the user's credentials should be sent. |
void |
setPassword(String pass)
Defines the user's password. |
void |
setTargetUrlList(List<String> targetUrlList)
Defines the list of HTTP server's target URLs to which resources will be requested. |
void |
setTimeout(int timeout)
Defines the timeout, in milliseconds. |
void |
setUserId(String userId)
Defines the user's identification. |
void |
setXmlCharValidationEnabled(boolean enabled)
Defines if the response message should be validated against invalid XML characters. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public HttpClient(Log log)
| Method Detail |
|---|
public InputStream getAsInputStream()
throws MxConnConfigException,
MxConnIOException
MxConnConfigException - if no target URL list is defined
MxConnIOException - if any communication problem occurssetTargetUrlList(List),
setAuthenticationRequired(boolean),
setTimeout(int)
public String post(String msg)
throws MxConnConfigException,
MxConnIOException
msg - message to be posted
MxConnConfigException - if no target URL list is defined
MxConnIOException - if any communication problem occurssetTargetUrlList(List),
setAuthenticationRequired(boolean),
setTimeout(int)public void setAuthenticationRequired(boolean isRequired)
isRequired - true if the authentication header should be sent,
otherwise falsesetUserId(String),
setPassword(String)public void setPassword(String pass)
pass - user's passwordpublic void setTargetUrlList(List<String> targetUrlList)
targetUrlList - list of HTTP server's target URLspublic List<String> getTargetUrlList()
public void setTimeout(int timeout)
MxConnTimeoutException is raised. A timeout of zero is
interpreted as infinite timeout.
timeout - public void setUserId(String userId)
userId - user's identificationpublic void setXmlCharValidationEnabled(boolean enabled)
enabled - true if the message should be validated against
invalid XML characters, false otherwisepublic String toString()
toString in class Object
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||