org.apache.geronimo.jmxremoting
Class JMXConnector

java.lang.Object
  extended by org.apache.geronimo.jmxremoting.JMXConnector
All Implemented Interfaces:
GBeanLifecycle, JMXConnectorInfo

public class JMXConnector
extends Object
implements JMXConnectorInfo, GBeanLifecycle

A Connector that supports the server sideof JSR 160 JMX Remoting.


Field Summary
static GBeanInfo GBEAN_INFO
           
 
Constructor Summary
JMXConnector(MBeanServerReference mbeanServerReference, String objectName, ClassLoader classLoader)
           
JMXConnector(MBeanServer mbeanServer, String objectName, ClassLoader classLoader)
          Constructor for creating the connector.
 
Method Summary
 void doFail()
          Fails the GBean.
 void doStart()
          Starts the GBean.
 void doStop()
          Stops the target.
 String getApplicationConfigName()
          Return the name of the JAAS Application Configuration Entry this connector uses to authenticate users.
static GBeanInfo getGBeanInfo()
           
 String getHost()
          Gets the JMX host for this connector.
 InetSocketAddress getListenAddress()
          Every connector must specify a property of type InetSocketAddress because we use that to identify the network services to print a list during startup.
 int getPort()
          Gets the JMX port for this connector.
 String getProtocol()
          Gets the protocol to use for the connection.
 String getUrlPath()
          Gets the path within the target server to look for the connection.
 void setApplicationConfigName(String applicationConfigName)
          Set the name of the JAAS Application Configuration Entry this connector should use to authenticate users.
 void setHost(String host)
          Sets the JMX host for this connector.
 void setPort(int port)
          Sets the JMX port for this connector.
 void setProtocol(String protocol)
          Sets the protocol to use for the connection.
 void setUrlPath(String urlPath)
          Sets the path within the target server to look for the connection.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

GBEAN_INFO

public static final GBeanInfo GBEAN_INFO
Constructor Detail

JMXConnector

public JMXConnector(MBeanServerReference mbeanServerReference,
                    String objectName,
                    ClassLoader classLoader)

JMXConnector

public JMXConnector(MBeanServer mbeanServer,
                    String objectName,
                    ClassLoader classLoader)
Constructor for creating the connector. The ClassLoader must be able to load all the LoginModules used in the JAAS login

Parameters:
mbeanServer - the mbean server
objectName - this connector's object name
classLoader - the classLoader used to create this connector
Method Detail

getApplicationConfigName

public String getApplicationConfigName()
Return the name of the JAAS Application Configuration Entry this connector uses to authenticate users. If null, users are not be authenticated (not recommended).

Returns:
the authentication configuration name

setApplicationConfigName

public void setApplicationConfigName(String applicationConfigName)
Set the name of the JAAS Application Configuration Entry this connector should use to authenticate users. If null, users will not be authenticated (not recommended).

Parameters:
applicationConfigName - the authentication configuration name

getListenAddress

public InetSocketAddress getListenAddress()
Every connector must specify a property of type InetSocketAddress because we use that to identify the network services to print a list during startup. However, this can be read-only since the host and port are set in the url attribute.

Specified by:
getListenAddress in interface JMXConnectorInfo

getProtocol

public String getProtocol()
Gets the protocol to use for the connection.

Specified by:
getProtocol in interface JMXConnectorInfo
Returns:
the protocol to use for the connection

setProtocol

public void setProtocol(String protocol)
Sets the protocol to use for the connection.

Specified by:
setProtocol in interface JMXConnectorInfo
Parameters:
protocol - the protocol to use for the connection

getHost

public String getHost()
Gets the JMX host for this connector.

Specified by:
getHost in interface JMXConnectorInfo
Returns:
the JMX host for this connector

setHost

public void setHost(String host)
Sets the JMX host for this connector.

Specified by:
setHost in interface JMXConnectorInfo
Parameters:
host - the JMX host for this connector

getPort

public int getPort()
Gets the JMX port for this connector.

Specified by:
getPort in interface JMXConnectorInfo
Returns:
the JMX port for this connector

setPort

public void setPort(int port)
Sets the JMX port for this connector.

Specified by:
setPort in interface JMXConnectorInfo
Parameters:
port - the JMX port for this connector

getUrlPath

public String getUrlPath()
Gets the path within the target server to look for the connection. This is commonly /jndi/rmi://localhost:1099/JMXConnector

Specified by:
getUrlPath in interface JMXConnectorInfo
Returns:
the path used to loacate the connector on the target server

setUrlPath

public void setUrlPath(String urlPath)
Sets the path within the target server to look for the connection. This is commonly /jndi/rmi://localhost:1099/JMXConnector

Specified by:
setUrlPath in interface JMXConnectorInfo
Parameters:
urlPath - the path used to loacate the connector on the target server

doStart

public void doStart()
             throws Exception
Description copied from interface: GBeanLifecycle
Starts the GBean. This informs the GBean that it is about to transition to the running state.

Specified by:
doStart in interface GBeanLifecycle
Throws:
Exception - if the target failed to start; this will cause a transition to the failed state

doStop

public void doStop()
            throws Exception
Description copied from interface: GBeanLifecycle
Stops the target. This informs the GBean that it is about to transition to the stopped state.

Specified by:
doStop in interface GBeanLifecycle
Throws:
Exception - if the target failed to stop; this will cause a transition to the failed state

doFail

public void doFail()
Description copied from interface: GBeanLifecycle
Fails the GBean. This informs the GBean that it is about to transition to the failed state.

Specified by:
doFail in interface GBeanLifecycle

getGBeanInfo

public static GBeanInfo getGBeanInfo()


Copyright © 2003-2007 Apache Software Foundation. All Rights Reserved.