|
|||||||||||
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 | |
---|---|
java.io.InputStream |
getAsInputStream()
Requests the resource specified by the target URL list as an input stream. |
java.util.List<java.lang.String> |
getTargetUrlList()
|
java.lang.String |
post(java.lang.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(java.lang.String pass)
Defines the user's password. |
void |
setTargetUrlList(java.util.List<java.lang.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(java.lang.String userId)
Defines the user's identification. |
void |
setXmlCharValidationEnabled(boolean enabled)
Defines if the response message should be validated against invalid XML characters. |
java.lang.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 java.io.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 java.lang.String post(java.lang.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 false
setUserId(String)
,
setPassword(String)
public void setPassword(java.lang.String pass)
pass
- user's passwordpublic void setTargetUrlList(java.util.List<java.lang.String> targetUrlList)
targetUrlList
- list of HTTP server's target URLspublic java.util.List<java.lang.String> getTargetUrlList()
public void setTimeout(int timeout)
MxConnTimeoutException
is raised. A timeout of zero is
interpreted as infinite timeout.
timeout
- public void setUserId(java.lang.String userId)
userId
- user's identificationpublic void setXmlCharValidationEnabled(boolean enabled)
enabled
- true
if the message should be validated against
invalid XML characters, false
otherwisepublic java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |