public class JmxServerProbe extends Object implements ServerProbe
| Constructor and Description |
|---|
JmxServerProbe(String host)
Creates a NodeProbe using the specified JMX host and default port.
|
JmxServerProbe(String host,
int port)
Creates a ServerProbe using the specified JMX host and port.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addAddressMapping(String user,
String domain,
String toAddress)
Add address mapping.
|
void |
addDomain(String domain)
Add domain to the service.
|
void |
addRegexMapping(String user,
String domain,
String regex)
Remove regex mapping.
|
void |
addUser(String userName,
String password)
Add a user to this mail server.
|
String[] |
listDomains()
Get a list of domains for the service.
|
Map<String,Collection<String>> |
listMappings()
Get a Map which holds all mappings.
|
Collection<String> |
listUserDomainMappings(String user,
String domain)
Return the explicit mapping stored for the given user and domain.
|
String[] |
listUsers()
Get a List the names of all users.
|
void |
removeAddressMapping(String user,
String domain,
String fromAddress)
Remove address mapping.
|
void |
removeDomain(String domain)
Remove domain from the service
|
void |
removeRegexMapping(String user,
String domain,
String regex)
Remove regex mapping.
|
void |
removeUser(String username)
Delete a user from this mail server.
|
void |
setPassword(String userName,
String password)
Set a user's password.
|
public JmxServerProbe(String host, int port) throws IOException, InterruptedException
host - hostname or IP address of the JMX agentport - TCP port of the remote JMX agentIOException - on connection failuresInterruptedExceptionpublic JmxServerProbe(String host) throws IOException, InterruptedException
host - hostname or IP address of the JMX agentIOException - on connection failuresInterruptedExceptionpublic void addUser(String userName, String password) throws Exception
ServerProbeaddUser in interface ServerProbeuserName - The name of the user being added.password - The password of the user being added.ExceptionServerProbe.addUser(java.lang.String, java.lang.String)public void removeUser(String username) throws Exception
ServerProberemoveUser in interface ServerProbeusername - The name of the user being deleted.ExceptionServerProbe.removeUser(java.lang.String)public String[] listUsers() throws Exception
ServerProbelistUsers in interface ServerProbeExceptionServerProbe.listUsers()public void setPassword(String userName, String password) throws Exception
ServerProbesetPassword in interface ServerProbeuserName - The name of the user whose password will be changed.password - The new password.ExceptionServerProbe.setPassword(java.lang.String, java.lang.String)public void addDomain(String domain) throws Exception
ServerProbeaddDomain in interface ServerProbedomain - The domain to add.ExceptionServerProbe.addDomain(java.lang.String)public void removeDomain(String domain) throws Exception
ServerProberemoveDomain in interface ServerProbedomain - The domain to remove.ExceptionServerProbe.removeDomain(java.lang.String)public String[] listDomains() throws Exception
ServerProbelistDomains in interface ServerProbeExceptionServerProbe.listDomains()public Map<String,Collection<String>> listMappings() throws Exception
ServerProbelistMappings in interface ServerProbeExceptionServerProbe.listMappings()public void addAddressMapping(String user, String domain, String toAddress) throws Exception
ServerProbeaddAddressMapping in interface ServerProbeuser - The username, or null if no username should be used.domain - The domain, or null if no domain should be used.toAddress - The address.ExceptionServerProbe.addAddressMapping(java.lang.String, java.lang.String, java.lang.String)public void removeAddressMapping(String user, String domain, String fromAddress) throws Exception
ServerProberemoveAddressMapping in interface ServerProbeuser - The username, or null if no username should be used.domain - The domain, or null if no domain should be usedfromAddress - The address.ExceptionServerProbe.removeAddressMapping(java.lang.String, java.lang.String, java.lang.String)public Collection<String> listUserDomainMappings(String user, String domain) throws Exception
ServerProbelistUserDomainMappings in interface ServerProbeuser - The username.domain - The domain.ExceptionServerProbe.listUserDomainMappings(java.lang.String, java.lang.String)public void addRegexMapping(String user, String domain, String regex) throws Exception
ServerProbeaddRegexMapping in interface ServerProbeuser - The username, or null if no username should be used.domain - The domain, or null if no domain should be used.regex - The regex.ExceptionServerProbe.addRegexMapping(java.lang.String, java.lang.String, java.lang.String)public void removeRegexMapping(String user, String domain, String regex) throws Exception
ServerProberemoveRegexMapping in interface ServerProbeuser - The username, or null if no username should be used.domain - The domain, or null if no domain should be used.regex - The regex.ExceptionServerProbe.removeRegexMapping(java.lang.String, java.lang.String, java.lang.String)Copyright © 2002-2012 The Apache Software Foundation. All Rights Reserved.