org.objectweb.jonas.jmx
Class JonasObjectName

java.lang.Object
  extended byorg.objectweb.jonas.jmx.JonasObjectName

public class JonasObjectName
extends java.lang.Object

A set of static classes used to build the names of MBeans used in JOnAS Each MBean or MBean type should have a method here.

Author:
Bruno Michel and Guillaume Riviere Contributor(s): Florent Benoit & Ludovic Bert : Ear service/Web Container service/Mail service Miroslav Halas for Jetty 03/03/24 Adriana Danes: Change Miro's wwwService method to return an ObjectName with type=webContainer and name=Jetty

Constructor Summary
JonasObjectName()
           
 
Method Summary
static javax.management.ObjectName allDatasources()
           
static javax.management.ObjectName allEars()
           
static javax.management.ObjectName allGroups()
          Return an objectName for all the groups
static javax.management.ObjectName allGroups(java.lang.String p_Resource)
          Return an objectName for all groups in a resource.
static javax.management.ObjectName allLogServices()
           
static javax.management.ObjectName allMimeMailFactories()
          Return an objectName specifying all the mime mail factories.
static javax.management.ObjectName allRars()
           
static javax.management.ObjectName allResourceAdaptors()
           
static javax.management.ObjectName allRoles()
          Return an objectName for all the roles
static javax.management.ObjectName allRoles(java.lang.String p_Resource)
          Return an objectName for all roles in a resource.
static javax.management.ObjectName allSecurityDatasourceFactories()
          Return an objectName for all the Security datasource factories.
static javax.management.ObjectName allSecurityFactories()
          Return an objectName for the Security factory name.
static javax.management.ObjectName allSecurityLdapFactories()
          Return an objectName for all the Security ldap factories.
static javax.management.ObjectName allSecurityMemoryFactories()
          Return an objectName for all the Security memory factories.
static javax.management.ObjectName allServices()
           
static javax.management.ObjectName allSessionMailFactories()
          Return an objectName specifying all the session mail factories.
static javax.management.ObjectName allUsers()
          Return an objectName for all the users
static javax.management.ObjectName allUsers(java.lang.String p_Resource)
          Return an objectName for all users in a resource.
static javax.management.ObjectName allWars()
           
static javax.management.ObjectName allWWW()
           
static javax.management.ObjectName databaseService()
           
static javax.management.ObjectName datasource(java.lang.String name)
           
static javax.management.ObjectName earService()
          Return the earService (Jmx).
static javax.management.ObjectName ejbService()
           
static java.lang.String fileNameForObjectName(java.lang.String fileName)
           
static java.lang.String getType(javax.management.ObjectName obj)
           
static javax.management.ObjectName group(java.lang.String resource, java.lang.String groupname)
          Return an objectName for a group
static javax.management.ObjectName jmsService()
           
static javax.management.ObjectName jmxConnectorServer(java.lang.String protocol, java.lang.String connectorName)
          Create ObjectName for the JMX Connector Server which is an MBean inside the target MBeanServer
static javax.management.ObjectName jmxService()
           
static javax.management.ObjectName logService(java.lang.String filename)
           
static javax.management.ObjectName mailService()
          Return the mailService (Jmx).
static javax.management.ObjectName mimeMailFactory(java.lang.String name)
          Return an objectName for a MimePartDataSource type mail factory.
static javax.management.ObjectName rar(java.lang.String filename)
           
static javax.management.ObjectName resourceAdapter(java.lang.String name)
           
static javax.management.ObjectName resourceAdapters()
           
static javax.management.ObjectName resourceService()
           
static javax.management.ObjectName rmiConnector()
           
static javax.management.ObjectName role(java.lang.String resource, java.lang.String rolename)
          Return an objectName for a role
static javax.management.ObjectName securityDatasourceFactory(java.lang.String name)
          Return an objectName for a Security datasource factory.
static javax.management.ObjectName securityFactories(java.lang.String p_Name)
          Return an objectName for the Security factory name.
static javax.management.ObjectName securityLdapFactory(java.lang.String name)
          Return an objectName for a Security ldap factory.
static javax.management.ObjectName securityMemoryFactory(java.lang.String name)
          Return an objectName for a Security memory factory.
static javax.management.ObjectName securityService()
           
static javax.management.ObjectName serverConfig()
           
static javax.management.ObjectName sessionMailFactory(java.lang.String name)
          Return an objectName for a Session type mail factory.
 java.lang.String toString()
          A different implementation should allow returning a logical name.
static javax.management.ObjectName transactionService()
           
static javax.management.ObjectName user(java.lang.String resource, java.lang.String username)
          Return an objectName for a user
static javax.management.ObjectName war(java.lang.String filename)
           
static javax.management.ObjectName webContainerService()
          Return the webContainerService (Jmx).
static javax.management.ObjectName www(java.lang.String subtype)
           
static javax.management.ObjectName wwwService()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JonasObjectName

public JonasObjectName()
Method Detail

jmxConnectorServer

public static javax.management.ObjectName jmxConnectorServer(java.lang.String protocol,
                                                             java.lang.String connectorName)
Create ObjectName for the JMX Connector Server which is an MBean inside the target MBeanServer


serverConfig

public static javax.management.ObjectName serverConfig()

wwwService

public static javax.management.ObjectName wwwService()

ejbService

public static javax.management.ObjectName ejbService()

earService

public static javax.management.ObjectName earService()
Return the earService (Jmx).

Returns:
the Ear service.

mailService

public static javax.management.ObjectName mailService()
Return the mailService (Jmx).

Returns:
the Mail service.

webContainerService

public static javax.management.ObjectName webContainerService()
Return the webContainerService (Jmx).

Returns:
the web container service.

databaseService

public static javax.management.ObjectName databaseService()

resourceService

public static javax.management.ObjectName resourceService()

transactionService

public static javax.management.ObjectName transactionService()

logService

public static javax.management.ObjectName logService(java.lang.String filename)

allLogServices

public static javax.management.ObjectName allLogServices()

allServices

public static javax.management.ObjectName allServices()

jmsService

public static javax.management.ObjectName jmsService()

securityService

public static javax.management.ObjectName securityService()

jmxService

public static javax.management.ObjectName jmxService()

www

public static javax.management.ObjectName www(java.lang.String subtype)
                                       throws javax.management.MalformedObjectNameException
Throws:
javax.management.MalformedObjectNameException

rar

public static javax.management.ObjectName rar(java.lang.String filename)
                                       throws javax.management.MalformedObjectNameException
Throws:
javax.management.MalformedObjectNameException

war

public static javax.management.ObjectName war(java.lang.String filename)
                                       throws javax.management.MalformedObjectNameException
Throws:
javax.management.MalformedObjectNameException

datasource

public static javax.management.ObjectName datasource(java.lang.String name)
                                              throws javax.management.MalformedObjectNameException
Throws:
javax.management.MalformedObjectNameException

sessionMailFactory

public static javax.management.ObjectName sessionMailFactory(java.lang.String name)
                                                      throws javax.management.MalformedObjectNameException
Return an objectName for a Session type mail factory.

Parameters:
name - the name of the mail factory
Returns:
an objectName for the mail factory.
Throws:
javax.management.MalformedObjectNameException - if the objectname can't be build

mimeMailFactory

public static javax.management.ObjectName mimeMailFactory(java.lang.String name)
                                                   throws javax.management.MalformedObjectNameException
Return an objectName for a MimePartDataSource type mail factory.

Parameters:
name - the name of the mail factory
Returns:
an objectName for the mail factory.
Throws:
javax.management.MalformedObjectNameException - if the objectname can't be build

securityMemoryFactory

public static javax.management.ObjectName securityMemoryFactory(java.lang.String name)
                                                         throws javax.management.MalformedObjectNameException
Return an objectName for a Security memory factory.

Parameters:
name - the name of the security memory factory
Returns:
an objectName for the security memory factory.
Throws:
javax.management.MalformedObjectNameException - if the objectname can't be build

securityDatasourceFactory

public static javax.management.ObjectName securityDatasourceFactory(java.lang.String name)
                                                             throws javax.management.MalformedObjectNameException
Return an objectName for a Security datasource factory.

Parameters:
name - the name of the security datasource factory
Returns:
an objectName for the security datasource factory.
Throws:
javax.management.MalformedObjectNameException - if the objectname can't be build

securityLdapFactory

public static javax.management.ObjectName securityLdapFactory(java.lang.String name)
                                                       throws javax.management.MalformedObjectNameException
Return an objectName for a Security ldap factory.

Parameters:
name - the name of the security ldap factory
Returns:
an objectName for the security ldap factory.
Throws:
javax.management.MalformedObjectNameException - if the objectname can't be build

user

public static javax.management.ObjectName user(java.lang.String resource,
                                               java.lang.String username)
                                        throws javax.management.MalformedObjectNameException
Return an objectName for a user

Parameters:
resource - the name of the resource on which the user depends
username - the name of the user
Returns:
an objectName for the user MBean
Throws:
javax.management.MalformedObjectNameException - if the objectname can't be build

allUsers

public static javax.management.ObjectName allUsers()
Return an objectName for all the users

Returns:
an objectName for all the users
Throws:
javax.management.MalformedObjectNameException - if the objectname can't be build

group

public static javax.management.ObjectName group(java.lang.String resource,
                                                java.lang.String groupname)
                                         throws javax.management.MalformedObjectNameException
Return an objectName for a group

Parameters:
resource - the name of the resource on which the group depends
groupname - the name of the group
Returns:
an objectName for the group MBean
Throws:
javax.management.MalformedObjectNameException - if the objectname can't be build

allGroups

public static javax.management.ObjectName allGroups()
Return an objectName for all the groups

Returns:
an objectName for all the groups
Throws:
javax.management.MalformedObjectNameException - if the objectname can't be build

role

public static javax.management.ObjectName role(java.lang.String resource,
                                               java.lang.String rolename)
                                        throws javax.management.MalformedObjectNameException
Return an objectName for a role

Parameters:
resource - the name of the resource on which the role depends
rolename - the name of the role
Returns:
an objectName for the user MBean
Throws:
javax.management.MalformedObjectNameException - if the objectname can't be build

allRoles

public static javax.management.ObjectName allRoles()
Return an objectName for all the roles

Returns:
an objectName for all the roles
Throws:
javax.management.MalformedObjectNameException - if the objectname can't be build

resourceAdapters

public static javax.management.ObjectName resourceAdapters()
                                                    throws javax.management.MalformedObjectNameException
Throws:
javax.management.MalformedObjectNameException

resourceAdapter

public static javax.management.ObjectName resourceAdapter(java.lang.String name)
                                                   throws javax.management.MalformedObjectNameException
Throws:
javax.management.MalformedObjectNameException

rmiConnector

public static javax.management.ObjectName rmiConnector()

allWWW

public static javax.management.ObjectName allWWW()

allEars

public static javax.management.ObjectName allEars()

allRars

public static javax.management.ObjectName allRars()

allWars

public static javax.management.ObjectName allWars()

allDatasources

public static javax.management.ObjectName allDatasources()

allSessionMailFactories

public static javax.management.ObjectName allSessionMailFactories()
Return an objectName specifying all the session mail factories.

Returns:
an objectName referencing all session mail factories.

allMimeMailFactories

public static javax.management.ObjectName allMimeMailFactories()
Return an objectName specifying all the mime mail factories.

Returns:
an objectName referencing all mime mail factories.

allResourceAdaptors

public static javax.management.ObjectName allResourceAdaptors()

getType

public static java.lang.String getType(javax.management.ObjectName obj)

fileNameForObjectName

public static java.lang.String fileNameForObjectName(java.lang.String fileName)

securityFactories

public static javax.management.ObjectName securityFactories(java.lang.String p_Name)
                                                     throws javax.management.MalformedObjectNameException
Return an objectName for the Security factory name.

Parameters:
p_Name - The name of the wanted security factory
Returns:
an objectName for the security factory name.
Throws:
javax.management.MalformedObjectNameException - if the objectname can't be build

allSecurityFactories

public static javax.management.ObjectName allSecurityFactories()
                                                        throws javax.management.MalformedObjectNameException
Return an objectName for the Security factory name.

Returns:
an objectName for the security factory name.
Throws:
javax.management.MalformedObjectNameException - if the objectname can't be build

allSecurityMemoryFactories

public static javax.management.ObjectName allSecurityMemoryFactories()
                                                              throws javax.management.MalformedObjectNameException
Return an objectName for all the Security memory factories.

Returns:
an objectName for all the security memory factories
Throws:
javax.management.MalformedObjectNameException - if the objectname can't be build

allSecurityDatasourceFactories

public static javax.management.ObjectName allSecurityDatasourceFactories()
                                                                  throws javax.management.MalformedObjectNameException
Return an objectName for all the Security datasource factories.

Returns:
an objectName for all the security datasource factories
Throws:
javax.management.MalformedObjectNameException - if the objectname can't be build

allSecurityLdapFactories

public static javax.management.ObjectName allSecurityLdapFactories()
                                                            throws javax.management.MalformedObjectNameException
Return an objectName for all the Security ldap factories.

Returns:
an objectName for all the security ldap factories
Throws:
javax.management.MalformedObjectNameException - if the objectname can't be build

allUsers

public static javax.management.ObjectName allUsers(java.lang.String p_Resource)
                                            throws javax.management.MalformedObjectNameException
Return an objectName for all users in a resource.

Parameters:
p_Resource - the name of the resource on which the user depends
Returns:
an objectName for the user MBean
Throws:
javax.management.MalformedObjectNameException - if the objectname can't be build

allRoles

public static javax.management.ObjectName allRoles(java.lang.String p_Resource)
                                            throws javax.management.MalformedObjectNameException
Return an objectName for all roles in a resource.

Parameters:
p_Resource - the name of the resource on which the role depends
Returns:
an objectName for the user MBean
Throws:
javax.management.MalformedObjectNameException - if the objectname can't be build

allGroups

public static javax.management.ObjectName allGroups(java.lang.String p_Resource)
                                             throws javax.management.MalformedObjectNameException
Return an objectName for all groups in a resource.

Parameters:
p_Resource - the name of the resource on which the group depends
Returns:
an objectName for the user MBean
Throws:
javax.management.MalformedObjectNameException - if the objectname can't be build

toString

public java.lang.String toString()
A different implementation should allow returning a logical name. This String is used within the Exception messages when throwing a ManagementException. This is done currently in the invoke method of ManagementReprImpl/Mx4jManagementReprImpl classes.

Returns:
String representation of the ObjectName