org.apache.geronimo.jmxremoting
Class JMXConnector

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

public class JMXConnector
extends Object
implements org.apache.geronimo.gbean.GBeanLifecycle

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


Field Summary
static org.apache.geronimo.gbean.GBeanInfo GBEAN_INFO
           
 
Constructor Summary
JMXConnector(org.apache.geronimo.system.jmx.MBeanServerReference mbeanServerReference, String objectName, ClassLoader classLoader)
           
JMXConnector(MBeanServer mbeanServer, String objectName, ClassLoader classLoader)
          Constructor for creating the connector.
 
Method Summary
 void doFail()
           
 void doStart()
           
 void doStop()
           
 String getApplicationConfigName()
          Return the name of the JAAS Application Configuration Entry this connector uses to authenticate users.
static org.apache.geronimo.gbean.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 org.apache.geronimo.gbean.GBeanInfo GBEAN_INFO
Constructor Detail

JMXConnector

public JMXConnector(org.apache.geronimo.system.jmx.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.


getProtocol

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

Returns:
the protocol to use for the connection

setProtocol

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

Parameters:
protocol - the protocol to use for the connection

getHost

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

Returns:
the JMX host for this connector

setHost

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

Parameters:
host - the JMX host for this connector

getPort

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

Returns:
the JMX port for this connector

setPort

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

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

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

Parameters:
urlPath - the path used to loacate the connector on the target server

doStart

public void doStart()
             throws Exception
Specified by:
doStart in interface org.apache.geronimo.gbean.GBeanLifecycle
Throws:
Exception

doStop

public void doStop()
            throws Exception
Specified by:
doStop in interface org.apache.geronimo.gbean.GBeanLifecycle
Throws:
Exception

doFail

public void doFail()
Specified by:
doFail in interface org.apache.geronimo.gbean.GBeanLifecycle

getGBeanInfo

public static org.apache.geronimo.gbean.GBeanInfo getGBeanInfo()


Copyright © 2006 Apache Software Foundation. All Rights Reserved.