public final class DominoHttpClient extends AbstractMonitorEnabled implements Serializable
| Constructor and Description |
|---|
DominoHttpClient(DNotesMonitor monitor,
String host,
String username,
String password)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
DominoGetMethod |
createGetMethod(String pathInfo)
Creates and returns a new Http GET method.
|
DominoPostMethod |
createPost(String pathInfo)
Creates and returns a new Http POST method.
|
int |
executeMethod(DominoHttpMethod method)
Executes the given
HTTP method. |
int |
executeMethod(org.apache.commons.httpclient.HostConfiguration hostConfiguration,
org.apache.commons.httpclient.HttpMethod method)
Executes the given
HTTP method using custom
host configuration. |
int |
executeMethod(org.apache.commons.httpclient.HostConfiguration hostConfiguration,
org.apache.commons.httpclient.HttpMethod method,
org.apache.commons.httpclient.HttpState state)
Executes the given
HTTP method using the given custom
host configuration with the given custom
HTTP state. |
String |
getCanonicalUserName()
Returns the name of the current user in the canonical format.
|
String |
getCommonUserName()
Returns the name of the current user in the common format.
|
String |
getHost()
Returns the host name of the server.
|
int |
getPort()
Returns the port of the server.
|
String |
getProtocol()
Returns the protocol for the connection, either http or
https.
|
String |
getUserName()
Returns the current user name.
|
void |
login()
Login to the Lotus Domino server.
|
getMonitor, setMonitorpublic DominoHttpClient(DNotesMonitor monitor, String host, String username, String password) throws MalformedURLException
monitor - the monitorhost - the host for the session to connectusername - the username for loginpassword - the password for loginMalformedURLException - if the host is not validpublic void login()
throws IOException
IOException - if the login failspublic String getProtocol()
public String getHost()
public int getPort()
public String getUserName()
public String getCommonUserName()
public String getCanonicalUserName()
public int executeMethod(org.apache.commons.httpclient.HostConfiguration hostConfiguration,
org.apache.commons.httpclient.HttpMethod method,
org.apache.commons.httpclient.HttpState state)
throws IOException
HTTP method using the given custom
host configuration with the given custom
HTTP state.hostConfiguration - The host configuration
to use. If null, the host configuration
returned by HttpClient.getHostConfiguration() will be usedmethod - the HTTP method to execute.state - the HTTP state to use when executing the
method. If null, the state returned by
HttpClient.getState() will be used.IOException - If an I/O (transport) error occurs. Some transport
exceptions can be recovered from.public int executeMethod(org.apache.commons.httpclient.HostConfiguration hostConfiguration,
org.apache.commons.httpclient.HttpMethod method)
throws IOException
HTTP method using custom
host configuration.hostConfiguration - The host configuration
to use. If null, the host configuration
returned by HttpClient.getHostConfiguration() will be usedmethod - the HTTP method to executeIOException - If an I/O (transport) error occurs. Some transport
exceptions can be recovered from.public int executeMethod(DominoHttpMethod method) throws IOException
HTTP method.method - the HTTP method to executeIOException - If an I/O (transport) error occurs. Some transport
exceptions can be recovered from.public DominoPostMethod createPost(String pathInfo)
pathInfo - the path on the serverpublic DominoGetMethod createGetMethod(String pathInfo)
pathInfo - the path on the serverCopyright © 2005–2020. All rights reserved.