|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.jrockit.mc.rjmx.JMXDescriptorBuilder
public class JMXDescriptorBuilder
This class hides the complexities of building a default JMX ConnectionDescriptor in a type safe way. It lets you specify various optional arguments, which are all checked upon building the descriptor.
Field Summary | |
---|---|
static int |
DEFAULT_PORT
Port number designator meaning that the default port for the selected protocol should be used. |
static int |
LOOPBACK_PORT
Port number designator used in conjunction with "localhost" to connect to the in-memory agent. |
Constructor Summary | |
---|---|
JMXDescriptorBuilder()
|
Method Summary | |
---|---|
IConnectionDescriptor |
build()
Builds the IConnectionDescriptor . |
JMXDescriptorBuilder |
encryptedPassword(java.lang.String encryptedPassword,
java.lang.String encryptionScheme)
Sets the encrypted password, and what encryption scheme that was used to create it. |
JMXDescriptorBuilder |
environment(java.util.Map environment)
Sets the JMX environment. |
JMXDescriptorBuilder |
exportPassword(boolean exportPassword)
Sets whether or not to export passwords. |
JMXDescriptorBuilder |
extendedProperties(java.util.Map extendedProperties)
Sets the extended properties. |
JMXDescriptorBuilder |
GUID(java.lang.String guid)
Sets the globally unique ID to use. |
JMXDescriptorBuilder |
hostName(java.lang.String hostName)
Sets the host name. |
JMXDescriptorBuilder |
name(java.lang.String name)
Sets the symbolic name of the connection. |
JMXDescriptorBuilder |
password(java.lang.String password)
Sets the password. |
JMXDescriptorBuilder |
port(int port)
Sets the port for the selected protocol. |
JMXDescriptorBuilder |
url(javax.management.remote.JMXServiceURL url)
Sets the service URL. |
JMXDescriptorBuilder |
useRMP(boolean useRMP)
Sets whether or not to use RMP. |
JMXDescriptorBuilder |
userName(java.lang.String userName)
Sets the user name. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int LOOPBACK_PORT
public static final int DEFAULT_PORT
Constructor Detail |
---|
public JMXDescriptorBuilder()
Method Detail |
---|
public JMXDescriptorBuilder url(javax.management.remote.JMXServiceURL url)
url
- the JMXServiceURL
to use. If the URL is set it will
override any host and port settings.
public JMXDescriptorBuilder environment(java.util.Map environment)
environment
- the JMX environment to use. Is by default empty.
public JMXDescriptorBuilder extendedProperties(java.util.Map extendedProperties)
extendedProperties
- the map of extended properties to use. Is by default empty.
public JMXDescriptorBuilder name(java.lang.String name)
name
- the symbolic name of this connection. Is by default derived
from the service url. Can be a path, in which case the
extended properties
ExtendedPropertyKeys.EXTENDED_PROPERTY_KEY_PATH
will
contain the path element, and the ConnectionName will be set
to the name part of the path, if one exists.
public JMXDescriptorBuilder hostName(java.lang.String hostName)
hostName
- the host name to set.
public JMXDescriptorBuilder port(int port)
port
- port or DEFAULT_PORT
for the default port for the selected protocol. Is
DEFAULT_PORT
by default.
public JMXDescriptorBuilder userName(java.lang.String userName)
userName
- the user name to use in the credentials. Is by default null.
public JMXDescriptorBuilder password(java.lang.String password)
password
- the password to use in the credentials. Is by default null.
public JMXDescriptorBuilder useRMP(boolean useRMP)
useRMP
- true if JMX over RMP should be used (the old JRockit specific
legacy protocol used by JDK 1.4 versions of JRockit, false to
use JMX over RMI. Is true by default if running in a JDK 1.4
or less.
public JMXDescriptorBuilder GUID(java.lang.String guid)
guid
- explicitly sets the GUID to be used. Defaults to generating
one.
public JMXDescriptorBuilder exportPassword(boolean exportPassword)
exportPassword
- set to true to export the password when exporting the
connection descriptor to XML. False otherwise. Is false by
default.
public JMXDescriptorBuilder encryptedPassword(java.lang.String encryptedPassword, java.lang.String encryptionScheme)
encryptedPassword
- the encrypted password.encryptionScheme
- the encryption scheme.
ISecurityManager.getEncryptionScheme()
public IConnectionDescriptor build() throws java.lang.IllegalStateException
IConnectionDescriptor
.
IConnectionDescriptor
initialized as
per the builder settings.
java.lang.IllegalStateException
- if the settings were not sufficient to create a proper
IConnectionDescriptor
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |