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 failuresInterruptedException
public JmxServerProbe(String host) throws IOException, InterruptedException
host
- hostname or IP address of the JMX agentIOException
- on connection failuresInterruptedException
public void addUser(String userName, String password) throws Exception
ServerProbe
addUser
in interface ServerProbe
userName
- The name of the user being added.password
- The password of the user being added.Exception
ServerProbe.addUser(java.lang.String, java.lang.String)
public void removeUser(String username) throws Exception
ServerProbe
removeUser
in interface ServerProbe
username
- The name of the user being deleted.Exception
ServerProbe.removeUser(java.lang.String)
public String[] listUsers() throws Exception
ServerProbe
listUsers
in interface ServerProbe
Exception
ServerProbe.listUsers()
public void setPassword(String userName, String password) throws Exception
ServerProbe
setPassword
in interface ServerProbe
userName
- The name of the user whose password will be changed.password
- The new password.Exception
ServerProbe.setPassword(java.lang.String, java.lang.String)
public void addDomain(String domain) throws Exception
ServerProbe
addDomain
in interface ServerProbe
domain
- The domain to add.Exception
ServerProbe.addDomain(java.lang.String)
public void removeDomain(String domain) throws Exception
ServerProbe
removeDomain
in interface ServerProbe
domain
- The domain to remove.Exception
ServerProbe.removeDomain(java.lang.String)
public String[] listDomains() throws Exception
ServerProbe
listDomains
in interface ServerProbe
Exception
ServerProbe.listDomains()
public Map<String,Collection<String>> listMappings() throws Exception
ServerProbe
listMappings
in interface ServerProbe
Exception
ServerProbe.listMappings()
public void addAddressMapping(String user, String domain, String toAddress) throws Exception
ServerProbe
addAddressMapping
in interface ServerProbe
user
- The username, or null if no username should be used.domain
- The domain, or null if no domain should be used.toAddress
- The address.Exception
ServerProbe.addAddressMapping(java.lang.String, java.lang.String, java.lang.String)
public void removeAddressMapping(String user, String domain, String fromAddress) throws Exception
ServerProbe
removeAddressMapping
in interface ServerProbe
user
- The username, or null if no username should be used.domain
- The domain, or null if no domain should be usedfromAddress
- The address.Exception
ServerProbe.removeAddressMapping(java.lang.String, java.lang.String, java.lang.String)
public Collection<String> listUserDomainMappings(String user, String domain) throws Exception
ServerProbe
listUserDomainMappings
in interface ServerProbe
user
- The username.domain
- The domain.Exception
ServerProbe.listUserDomainMappings(java.lang.String, java.lang.String)
public void addRegexMapping(String user, String domain, String regex) throws Exception
ServerProbe
addRegexMapping
in interface ServerProbe
user
- The username, or null if no username should be used.domain
- The domain, or null if no domain should be used.regex
- The regex.Exception
ServerProbe.addRegexMapping(java.lang.String, java.lang.String, java.lang.String)
public void removeRegexMapping(String user, String domain, String regex) throws Exception
ServerProbe
removeRegexMapping
in interface ServerProbe
user
- The username, or null if no username should be used.domain
- The domain, or null if no domain should be used.regex
- The regex.Exception
ServerProbe.removeRegexMapping(java.lang.String, java.lang.String, java.lang.String)
Copyright © 2002-2012 The Apache Software Foundation. All Rights Reserved.