public class DaemonClient extends LoggedObject
| Constructor and Description |
|---|
DaemonClient(URL url)
Creates a Cargo daemon manager wrapper for the specified URL that uses a username of
admin, an empty password and ISO-8859-1 URL encoding. |
DaemonClient(URL url,
String username)
Creates a Cargo daemon manager wrapper for the specified URL and username that uses an empty
password and ISO-8859-1 URL encoding.
|
DaemonClient(URL url,
String username,
String password)
Creates a Cargo daemon manager wrapper for the specified URL, username and password that uses
ISO-8859-1 URL encoding.
|
DaemonClient(URL url,
String username,
String password,
String charset)
Creates a Cargo daemon manager wrapper for the specified URL, username, password and URL
encoding.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getCharset()
Gets the URL encoding charset to use when communicating with Cargo daemon manager.
|
String |
getPassword()
Gets the password to use when authenticating with Cargo daemon manager.
|
URL |
getURL()
Gets the full URL of the Cargo daemon manager instance.
|
String |
getUserAgent()
Gets the user agent name to use when communicating with Cargo daemon manager.
|
String |
getUserName()
Gets the username to use when authenticating with Cargo daemon manager.
|
protected String |
invoke(String path,
DaemonParameters parameters)
Invokes Cargo daemon manager with a specified command and content data.
|
void |
setUserAgent(String userAgent)
Sets the user agent name to use when communicating with Cargo daemon manager.
|
void |
start(DaemonStart start)
Starts a container specified by the start request.
|
void |
stop(String handleId)
Stops the container with the specified handle identifier.
|
getLogger, setLoggerpublic DaemonClient(URL url)
admin, an empty password and ISO-8859-1 URL encoding.url - the full URL of the Cargo daemon manager instance to usepublic DaemonClient(URL url, String username)
url - the full URL of the Cargo daemon manager instance to useusername - the username to use when authenticating with Cargo daemon managerpublic DaemonClient(URL url, String username, String password)
url - the full URL of the Cargo daemon manager instance to useusername - the username to use when authenticating with Cargo daemon managerpassword - the password to use when authenticating with Cargo daemon managerpublic DaemonClient(URL url, String username, String password, String charset)
url - the full URL of the Cargo daemon manager instance to useusername - the username to use when authenticating with Cargo daemon managerpassword - the password to use when authenticating with Cargo daemon managercharset - the URL encoding charset to use when communicating with Cargo daemon managerpublic URL getURL()
public String getUserName()
public String getPassword()
public String getCharset()
public String getUserAgent()
public void setUserAgent(String userAgent)
userAgent - the user agent name to use when communicating with Cargo daemon managerpublic void start(DaemonStart start) throws DaemonException, IOException
start - The unique identifier of the containerDaemonException - if the Cargo daemon manager request failsIOException - if an i/o error occurspublic void stop(String handleId) throws DaemonException, IOException
handleId - The unique identifier of the containerDaemonException - if the Cargo daemon manager request failsIOException - if an i/o error occursprotected String invoke(String path, DaemonParameters parameters) throws DaemonException, IOException
path - the Cargo daemon manager command to invokeparameters - an input stream to the content dataDaemonException - if the Cargo daemon manager request failsIOException - if an i/o error occursCopyright © 2004–2015 Github. All rights reserved.