Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle ADF Share
11g Release 2 (11.1.2.3.0)

E17486-04


oracle.adf.share.connection.jmx
Class JMXConnection

java.lang.Object
  extended by oracle.adf.share.connection.jmx.JMXConnection

All Implemented Interfaces:
javax.naming.Referenceable

public class JMXConnection
extends java.lang.Object
implements javax.naming.Referenceable

ADF runtime class to manage instances of MBeanServerConnection. This class can be persisted using ADF Connection Architecture (ADF-CA) and is expected to execute in a container environment. December 2010 For 11gR1 we use different connection strategies for different containers, and keep an appserver_type attribute to record this. This class may also be used from DesignTime environments, and you may pass in the (transient) ClassLoader before building the MBeanServerConnection, in which case the PROTOCOL_PROVIDER_CLASS_LOADER property will be passed to the JMX framework.


Field Summary
static java.lang.String APPSERVER_TYPE
          Name of attribute that specifies appserver type
static java.lang.String DEFAULT_APPSERVER
           
static java.lang.String HOST
          Name of the attribute that specifies host name.
static java.lang.String JBOSS_APPSERVER
           
static java.lang.String JMX_CONNECTION_NAME_PREFIX
           
static java.lang.String JMXCONNECTION_CLASSNAME
           
static java.lang.String JMXCONNECTIONFACTORY_CLASSNAME
           
static java.lang.String PASSWORD
          Name of the attribute that specifies password.
static java.lang.String PORT
          Name of the attribute that specifies port.
static java.lang.String PROTOCOL
          Name of the attribute that specifies protocol.
static java.lang.String URL_PATH
          Name of the attribute that specifies url path.
static java.lang.String USERNAME
          Name of the attribute that specifies user name.
static java.lang.String WAS_APPSERVER
           
static java.lang.String WAS_DEFAULT_HOST
           
static int WAS_DEFAULT_PORT
           
static java.lang.String WAS_DEFAULT_PROTOCOL
           
static java.lang.String WAS_DEFAULT_USER
           
static java.lang.String WAS_INITIAL_CONTEXT_FACTORY
           
static java.lang.String WAS_PROVIDER_URL_FORMAT
           
static java.lang.String WAS_SERVICE_URL
           
static java.lang.String WAS_URL_PACKAGE
           
static java.lang.String WLS_APPSERVER
           
static java.lang.String WLS_DEFAULT_HOST
           
static int WLS_DEFAULT_PORT
           
static java.lang.String WLS_DEFAULT_PROTOCOL
           
static java.lang.String WLS_DEFAULT_USER
           
static java.lang.String WLS_INSTALLATION_LOCATION
           
static java.lang.String WLS_MBEANSERVER1
           
static java.lang.String WLS_MBEANSERVER2
           
static java.lang.String WLS_MBEANSERVER3
           
static java.lang.String WLS_PROTOCOL_PROVIDER_PACKAGE
           
static java.lang.String WLS_URL_PROVIDER_PREFIX
           

 

Constructor Summary
protected JMXConnection()
          For internal use only: use the JMXConnectionFactory.createNew() method instead
protected JMXConnection(javax.naming.Reference ref)
          Constructs a JMXConnection by parsing Reference object (This should only ever be done by oracle.adf.share.connection.jmx.JMXConnectionFactory) Note that this does not actually build a live MBeanServer connection

 

Method Summary
 void close()
          Close the underlying MBeanserver connection
 javax.management.MBeanServerConnection connect()
          Connect to the mbean server and return a connection
 java.lang.String getAppserver_type()
          Constant for the supported appserver types
protected  java.lang.String getConnectionClassName()
           
protected  java.lang.String getConnectionFactoryClassName()
           
 java.lang.ClassLoader getConnectionLoader()
          Transient attribute used by the JMX framework to build an MBeanserverConnection.
 java.lang.String getHost()
          The host part of the Service URL.
 java.lang.String getJMXServiceURL()
          Return the compound attribute JMX Service URL
 char[] getPassword()
          Password of the credentials that are send to the connector server during connection.
 int getPort()
          The port part of the Service URL.
 java.lang.String getProtocol()
          The protocol part of the Service URL.
 javax.naming.Reference getReference()
          Retrieves the Reference of this object.
 java.lang.String getUrl_path()
          The URL Path part of the Service URL.
 java.lang.String getUser()
          User name of the credentials that are send to the connector server during connection.
 void setAppserver_type(java.lang.String appserver_type)
           
 void setConnectionLoader(java.lang.ClassLoader cl)
           
 void setHost(java.lang.String host)
           
 void setPassword(char[] password)
           
 void setPort(int port)
           
 void setProtocol(java.lang.String protocol)
           
 void setUrl_path(java.lang.String url_path)
           
 void setUser(java.lang.String user)
           

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Field Detail

JMXCONNECTION_CLASSNAME

public static final java.lang.String JMXCONNECTION_CLASSNAME

JMXCONNECTIONFACTORY_CLASSNAME

public static final java.lang.String JMXCONNECTIONFACTORY_CLASSNAME

APPSERVER_TYPE

public static final java.lang.String APPSERVER_TYPE
Name of attribute that specifies appserver type
See Also:
Constant Field Values

USERNAME

public static final java.lang.String USERNAME
Name of the attribute that specifies user name.
See Also:
Constant Field Values

PASSWORD

public static final java.lang.String PASSWORD
Name of the attribute that specifies password.
See Also:
Constant Field Values

HOST

public static final java.lang.String HOST
Name of the attribute that specifies host name.
See Also:
Constant Field Values

PORT

public static final java.lang.String PORT
Name of the attribute that specifies port.
See Also:
Constant Field Values

PROTOCOL

public static final java.lang.String PROTOCOL
Name of the attribute that specifies protocol.
See Also:
Constant Field Values

URL_PATH

public static final java.lang.String URL_PATH
Name of the attribute that specifies url path.
See Also:
Constant Field Values

WLS_APPSERVER

public static final java.lang.String WLS_APPSERVER
See Also:
Constant Field Values

WAS_APPSERVER

public static final java.lang.String WAS_APPSERVER
See Also:
Constant Field Values

JBOSS_APPSERVER

public static final java.lang.String JBOSS_APPSERVER
See Also:
Constant Field Values

DEFAULT_APPSERVER

public static final java.lang.String DEFAULT_APPSERVER
See Also:
Constant Field Values

WLS_INSTALLATION_LOCATION

public static final java.lang.String WLS_INSTALLATION_LOCATION
See Also:
Constant Field Values

WLS_PROTOCOL_PROVIDER_PACKAGE

public static final java.lang.String WLS_PROTOCOL_PROVIDER_PACKAGE
See Also:
Constant Field Values

WLS_DEFAULT_HOST

public static final java.lang.String WLS_DEFAULT_HOST
See Also:
Constant Field Values

WLS_DEFAULT_PORT

public static final int WLS_DEFAULT_PORT
See Also:
Constant Field Values

WLS_DEFAULT_PROTOCOL

public static final java.lang.String WLS_DEFAULT_PROTOCOL
See Also:
Constant Field Values

WLS_DEFAULT_USER

public static final java.lang.String WLS_DEFAULT_USER
See Also:
Constant Field Values

WLS_URL_PROVIDER_PREFIX

public static final java.lang.String WLS_URL_PROVIDER_PREFIX
See Also:
Constant Field Values

WLS_MBEANSERVER1

public static final java.lang.String WLS_MBEANSERVER1
See Also:
Constant Field Values

WLS_MBEANSERVER2

public static final java.lang.String WLS_MBEANSERVER2
See Also:
Constant Field Values

WLS_MBEANSERVER3

public static final java.lang.String WLS_MBEANSERVER3
See Also:
Constant Field Values

WAS_INITIAL_CONTEXT_FACTORY

public static final java.lang.String WAS_INITIAL_CONTEXT_FACTORY
See Also:
Constant Field Values

WAS_PROVIDER_URL_FORMAT

public static final java.lang.String WAS_PROVIDER_URL_FORMAT
See Also:
Constant Field Values

WAS_URL_PACKAGE

public static final java.lang.String WAS_URL_PACKAGE
See Also:
Constant Field Values

WAS_SERVICE_URL

public static final java.lang.String WAS_SERVICE_URL
See Also:
Constant Field Values

WAS_DEFAULT_HOST

public static final java.lang.String WAS_DEFAULT_HOST
See Also:
Constant Field Values

WAS_DEFAULT_PORT

public static final int WAS_DEFAULT_PORT
See Also:
Constant Field Values

WAS_DEFAULT_PROTOCOL

public static final java.lang.String WAS_DEFAULT_PROTOCOL
See Also:
Constant Field Values

WAS_DEFAULT_USER

public static final java.lang.String WAS_DEFAULT_USER
See Also:
Constant Field Values

JMX_CONNECTION_NAME_PREFIX

public static final java.lang.String JMX_CONNECTION_NAME_PREFIX
See Also:
Constant Field Values

Constructor Detail

JMXConnection

protected JMXConnection()
For internal use only: use the JMXConnectionFactory.createNew() method instead

JMXConnection

protected JMXConnection(javax.naming.Reference ref)
Constructs a JMXConnection by parsing Reference object (This should only ever be done by oracle.adf.share.connection.jmx.JMXConnectionFactory) Note that this does not actually build a live MBeanServer connection
Parameters:
ref - Reference object that represents JMX Connection

Method Detail

getReference

public javax.naming.Reference getReference()
                                    throws javax.naming.NamingException
Retrieves the Reference of this object.
Specified by:
getReference in interface javax.naming.Referenceable
Returns:
The non-null Reference of this object.
Throws:
javax.naming.NamingException - If a naming exception was encountered while retrieving the reference.

getConnectionClassName

protected java.lang.String getConnectionClassName()

getConnectionFactoryClassName

protected java.lang.String getConnectionFactoryClassName()

getAppserver_type

public java.lang.String getAppserver_type()
Constant for the supported appserver types
Returns:
type

setAppserver_type

public void setAppserver_type(java.lang.String appserver_type)

getUser

public java.lang.String getUser()
User name of the credentials that are send to the connector server during connection.
Returns:
User name.

setUser

public void setUser(java.lang.String user)

getPassword

public char[] getPassword()
Password of the credentials that are send to the connector server during connection.
Returns:
password.

setPassword

public void setPassword(char[] password)

getHost

public java.lang.String getHost()
The host part of the Service URL.
Returns:
host name

setHost

public void setHost(java.lang.String host)

getPort

public int getPort()
The port part of the Service URL.
Returns:
port.

setPort

public void setPort(int port)

getProtocol

public java.lang.String getProtocol()
The protocol part of the Service URL. This is never null. Ex. rmi,iiop,t3 (Weblogic)
Returns:
the protocol part of service URL. This is never null.

setProtocol

public void setProtocol(java.lang.String protocol)

getUrl_path

public java.lang.String getUrl_path()
The URL Path part of the Service URL. This is an empty string, or a string beginning with a slash (/), or a string beginning with a semicolon (;).
Returns:
url-path of service URL.

setUrl_path

public void setUrl_path(java.lang.String url_path)

getConnectionLoader

public java.lang.ClassLoader getConnectionLoader()
Transient attribute used by the JMX framework to build an MBeanserverConnection.

setConnectionLoader

public void setConnectionLoader(java.lang.ClassLoader cl)

getJMXServiceURL

public java.lang.String getJMXServiceURL()
Return the compound attribute JMX Service URL
Returns:

connect

public javax.management.MBeanServerConnection connect()
                                               throws java.net.MalformedURLException,
                                                      java.io.IOException
Connect to the mbean server and return a connection
Returns:
mbeanserver connection
Throws:
java.net.MalformedURLException
java.io.IOException

close

public void close()
Close the underlying MBeanserver connection
Throws:
java.io.IOException

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle ADF Share
11g Release 2 (11.1.2.3.0)

E17486-04


Copyright © 1997, 2012, Oracle. All rights reserved.