|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.jrockit.mc.rjmx.ConnectionDescriptorToolkit
public class ConnectionDescriptorToolkit
Toolkit for extracting and caching data from IConnectionDescriptor
| Field Summary | |
|---|---|
static int |
UNKNOWN_PORT
Port number returned when no actual port number currently is known. |
static java.lang.String |
VALUE_LOCALHOST
The interned string "localhost". |
| Method Summary | |
|---|---|
static java.util.Map |
createCredentialsEnv(java.lang.String username,
java.lang.String password)
Creates a JMX environment from the provided credentials. |
static javax.management.remote.JMXServiceURL |
createServiceURL(java.lang.String host,
int port,
boolean useJMXRMI)
Creates a jmx over rmi or "jmx over rmp" service URL. |
static java.lang.String |
generateGUID()
An adequately globally unique ID. |
static java.lang.String |
getCompactName(IConnectionDescriptor descr)
Returns the server name in the form "server IP:port", if available. |
static java.lang.String[] |
getCredentials(IConnectionDescriptor descriptor)
Returns the credentials for the connection descriptor as a String array. |
static int |
getDefaultPort()
|
static java.lang.String |
getEncryptionScheme(IConnectionDescriptor descr)
|
static java.lang.String |
getHostName(IConnectionDescriptor descr)
Will attempt to derive the host name from connection descriptor. |
static java.lang.String |
getPassword(IConnectionDescriptor descr,
IConnectionManager manager)
Returns the currently set password. |
static int |
getPort(IConnectionDescriptor descr)
Will attempt to derive the port from the IConnectionDescriptor. |
static java.lang.String |
getUser(IConnectionDescriptor descr)
Returns the user name, if available. |
static boolean |
isAutoDiscovered(IConnectionDescriptor descriptor)
Returns true if the JVM represented by the descriptor was automatically discovered. |
static boolean |
isExportingPassword(IConnectionDescriptor descr)
Whether the provided ConnectionDescriptor exports its password along its other data to XML. |
static java.lang.Boolean |
isHotspotJVMName(java.lang.String vmName)
Returns whether this is a HotSpot JVM or not. |
static boolean |
isJRockit(IConnectionHandle connectionHandle)
Returns true if the connection handle is connected to a JRockit, false otherwise. |
static java.lang.Boolean |
isJRockitJVMName(java.lang.String vmName)
Returns whether this is a JRockit JVM or not. |
static boolean |
isLocal(IConnectionDescriptor descriptor)
Returns true if the descriptor is a local descriptor. |
static boolean |
isUsingRMP(IConnectionDescriptor descriptor)
Returns true if the descriptor uses the legacy RMP protocol. |
static IConnectionDescriptor |
rename(IConnectionDescriptor connectionDescriptor,
java.lang.String name)
Wraps the connection descriptor, deferring all calls but the getName() to the delegate. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String VALUE_LOCALHOST
public static final int UNKNOWN_PORT
| Method Detail |
|---|
public static java.lang.String getPassword(IConnectionDescriptor descr,
IConnectionManager manager)
throws com.jrockit.mc.common.security.SecurityException
com.jrockit.mc.common.security.SecurityException - if the password was encrypted and could not be decrypted.public static java.lang.String getUser(IConnectionDescriptor descr)
descr - the IConnectionDescriptor to retrieve the user name
from.
public static java.lang.String getCompactName(IConnectionDescriptor descr)
public static java.lang.String generateGUID()
public static java.lang.String getHostName(IConnectionDescriptor descr)
descr - the IConnectionDescriptor to retrieve the host name
from.
public static int getPort(IConnectionDescriptor descr)
IConnectionDescriptor.
If the JXMServiceURL uses jmxrmi, the port will be derived from the
information in the JXMServiceURL.
descr - the IConnectionDescriptor to derive the port from.
UNKNOWN_PORT if the URL has not been resolved yet.
public static IConnectionDescriptor rename(IConnectionDescriptor connectionDescriptor,
java.lang.String name)
connectionDescriptor - the connection descriptor renamename - the name of the new descriptor
public static boolean isExportingPassword(IConnectionDescriptor descr)
public static java.lang.String getEncryptionScheme(IConnectionDescriptor descr)
public static java.util.Map createCredentialsEnv(java.lang.String username,
java.lang.String password)
username - the username.password - the password.
public static javax.management.remote.JMXServiceURL createServiceURL(java.lang.String host,
int port,
boolean useJMXRMI)
throws java.net.MalformedURLException
host - the host name.port - port or JMXDescriptorBuilder.DEFAULT_PORT for the default port for the selected protocoluseJMXRMI - true if JMX over RMI should be used, false to use JMX over RMP
JMXServiceURL.
java.net.MalformedURLException - if the URL could not be created with the provided data.public static int getDefaultPort()
public static boolean isLocal(IConnectionDescriptor descriptor)
descriptor - the descriptor to check.
public static boolean isAutoDiscovered(IConnectionDescriptor descriptor)
descriptor - the descriptor to check.
public static boolean isUsingRMP(IConnectionDescriptor descriptor)
throws java.io.IOException
descriptor - the descriptor to check.
java.io.IOException - if the serviceURL could not be resolved.public static java.lang.String[] getCredentials(IConnectionDescriptor descriptor)
descriptor - the descriptor to return the credentials for.
public static boolean isJRockit(IConnectionHandle connectionHandle)
connectionHandle - the connection handle to check.
public static java.lang.Boolean isJRockitJVMName(java.lang.String vmName)
vmName - the JVM name to check.
public static java.lang.Boolean isHotspotJVMName(java.lang.String vmName)
vmName - the JVM name to check.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||