org.objectweb.jonas.jmx
Class JonasObjectName

java.lang.Object
  extended by org.objectweb.jonas.jmx.JonasObjectName

public class JonasObjectName
extends java.lang.Object

A set of static classes used to build the names of proprietary MBeans used in JOnAS and in Joram.

Author:
Bruno Michel, Guillaume Riviere, Florent Benoit, Ludovic Bert, Miroslav Halas, Adriana Danes, S. Ali Tokmen

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 pResource)
          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 pResource)
          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 pResource)
          Return an objectName for all users in a resource.
static javax.management.ObjectName allWars()
           
static javax.management.ObjectName allWWW()
           
static javax.management.ObjectName ArchiveConfig()
           
static javax.management.ObjectName catalinaConnectorFactory(java.lang.String pDomain)
           
static javax.management.ObjectName cluster(java.lang.String name, java.lang.String type)
          Build an ObjectName for a Cluster defined by its type and its name.
static javax.management.ObjectName clusterDaemon()
           
static javax.management.ObjectName clusterDaemonProxy(java.lang.String name)
           
static javax.management.ObjectName clusterMember(java.lang.String name, java.lang.String type, java.lang.String cluster)
          Build an ObjectName for a ClusterMember.
static javax.management.ObjectName clusters(java.lang.String type)
          Build an ObjectName for a Cluster defined by its type only.
static javax.management.ObjectName databaseService()
           
static javax.management.ObjectName datasource(java.lang.String name)
           
static javax.management.ObjectName discoveryClient()
           
static javax.management.ObjectName discoveryEnroller()
           
static javax.management.ObjectName discoveryManager()
           
static javax.management.ObjectName discoveryService()
          Construct ObjectName for the discovery service MBean
static javax.management.ObjectName domainManagement(java.lang.String domain)
           
static javax.management.ObjectName domainMonitor()
           
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 getDomain()
           
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 haService()
           
static javax.management.ObjectName jmsService()
           
static javax.management.ObjectName jmsService1()
           
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 joramLocalServer()
           
static javax.management.ObjectName joramQueue(java.lang.String name)
          Create ObjectName for a Joram managed queue
static javax.management.ObjectName joramRemoteServer(java.lang.String id)
          Create ObjectName for a remote Joram server
static javax.management.ObjectName joramTopic(java.lang.String name)
          Create ObjectName for a Joram managed topic
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 RarConfig()
           
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 pName)
          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 serverProxy(java.lang.String serverName)
           
static javax.management.ObjectName serverProxys()
           
static javax.management.ObjectName sessionMailFactory(java.lang.String name)
          Return an objectName for a Session type mail factory.
static void setDomain(java.lang.String domainName)
          Set the domain used by JOnAS server
 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 webModuleProxy(java.lang.String pDomain)
           
static javax.management.ObjectName workManager()
          Return an objectName for the WorkManager
static javax.management.ObjectName wsService()
           
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

setDomain

public static void setDomain(java.lang.String domainName)
Set the domain used by JOnAS server

Parameters:
domainName - the domain to use

getDomain

public static java.lang.String getDomain()
Returns:
the domain name of the JOnAS server.

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

Parameters:
protocol - used protocol
connectorName - name used to distinguish connector servers using the same protocol
Returns:
ObjectName for the JMX Connector Server MBean

serverConfig

public static javax.management.ObjectName serverConfig()
Returns:
ObjectName for reconfiguration manager MBean

wwwService

public static javax.management.ObjectName wwwService()

wsService

public static javax.management.ObjectName wsService()

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)

discoveryService

public static javax.management.ObjectName discoveryService()
Construct ObjectName for the discovery service MBean

Returns:
ObjectName for the discovery service MBean

allLogServices

public static javax.management.ObjectName allLogServices()

allServices

public static javax.management.ObjectName allServices()

jmsService

public static javax.management.ObjectName jmsService()

jmsService1

public static javax.management.ObjectName jmsService1()

securityService

public static javax.management.ObjectName securityService()

jmxService

public static javax.management.ObjectName jmxService()

haService

public static javax.management.ObjectName haService()

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

workManager

public static javax.management.ObjectName workManager()
Return an objectName for the WorkManager

Returns:
an objectName for the WorkManager

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 pName)
                                                     throws javax.management.MalformedObjectNameException
Return an objectName for the Security factory name.

Parameters:
pName - 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 pResource)
                                            throws javax.management.MalformedObjectNameException
Return an objectName for all users in a resource.

Parameters:
pResource - 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 pResource)
                                            throws javax.management.MalformedObjectNameException
Return an objectName for all roles in a resource.

Parameters:
pResource - 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 pResource)
                                             throws javax.management.MalformedObjectNameException
Return an objectName for all groups in a resource.

Parameters:
pResource - 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.

Overrides:
toString in class java.lang.Object
Returns:
String representation of the ObjectName

joramLocalServer

public static javax.management.ObjectName joramLocalServer()
                                                    throws javax.management.MalformedObjectNameException
Returns:
ObjectName for the local Joram server
Throws:
javax.management.MalformedObjectNameException - Could not create ObjectName with the given String

joramRemoteServer

public static javax.management.ObjectName joramRemoteServer(java.lang.String id)
                                                     throws javax.management.MalformedObjectNameException
Create ObjectName for a remote Joram server

Parameters:
id - remote server identifier
Returns:
ObjectName for a remote Joram server
Throws:
javax.management.MalformedObjectNameException - Could not create ObjectName with the given String

joramQueue

public static javax.management.ObjectName joramQueue(java.lang.String name)
                                              throws javax.management.MalformedObjectNameException
Create ObjectName for a Joram managed queue

Parameters:
name - queue name
Returns:
ObjectName for a Joram managed queue
Throws:
javax.management.MalformedObjectNameException - Could not create ObjectName with the given String

joramTopic

public static javax.management.ObjectName joramTopic(java.lang.String name)
                                              throws javax.management.MalformedObjectNameException
Create ObjectName for a Joram managed topic

Parameters:
name - topic name
Returns:
ObjectName for a Joram managed topic
Throws:
javax.management.MalformedObjectNameException - Could not create ObjectName with the given String

discoveryManager

public static javax.management.ObjectName discoveryManager()
                                                    throws javax.management.MalformedObjectNameException
Returns:
ObjectName for discovery manager MBean
Throws:
javax.management.MalformedObjectNameException - Could not create ObjectName with the given String

discoveryClient

public static javax.management.ObjectName discoveryClient()
                                                   throws javax.management.MalformedObjectNameException
Returns:
ObjectName for discovery client MBean
Throws:
javax.management.MalformedObjectNameException - Could not create ObjectName with the given String

discoveryEnroller

public static javax.management.ObjectName discoveryEnroller()
                                                     throws javax.management.MalformedObjectNameException
Returns:
ObjectName for discovery enroller MBean
Throws:
javax.management.MalformedObjectNameException - Could not create ObjectName with the given String

domainMonitor

public static javax.management.ObjectName domainMonitor()
                                                 throws javax.management.MalformedObjectNameException
Returns:
ObjectName for domain monitor MBean
Throws:
javax.management.MalformedObjectNameException - Could not create ObjectName with the given String

serverProxy

public static javax.management.ObjectName serverProxy(java.lang.String serverName)
                                               throws javax.management.MalformedObjectNameException
Returns:
ObjectName for ServerProxy MBean
Throws:
javax.management.MalformedObjectNameException - Could not create ObjectName with the given String

serverProxys

public static javax.management.ObjectName serverProxys()
                                                throws javax.management.MalformedObjectNameException
Returns:
ObjectName for ServerProxy MBean
Throws:
javax.management.MalformedObjectNameException - Could not create ObjectName with the given String

cluster

public static javax.management.ObjectName cluster(java.lang.String name,
                                                  java.lang.String type)
                                           throws javax.management.MalformedObjectNameException
Build an ObjectName for a Cluster defined by its type and its name.

Parameters:
name - Name of the Cluster
type - Type: JkCluster, TomcatCluster, JoramCluster, EjbHaCluster, CmiCluster, ...
Returns:
ObjectName for a Cluster
Throws:
javax.management.MalformedObjectNameException

clusters

public static javax.management.ObjectName clusters(java.lang.String type)
                                            throws javax.management.MalformedObjectNameException
Build an ObjectName for a Cluster defined by its type only.

Parameters:
type - Type: JkCluster, TomcatCluster, JoramCluster, EjbHaCluster, CmiCluster, ...
Returns:
ObjectName for a Cluster
Throws:
javax.management.MalformedObjectNameException

clusterMember

public static javax.management.ObjectName clusterMember(java.lang.String name,
                                                        java.lang.String type,
                                                        java.lang.String cluster)
                                                 throws javax.management.MalformedObjectNameException
Build an ObjectName for a ClusterMember. All ClusterMember have the same type, regardless the cluster type.

Parameters:
name - Name of the ClusterMember
type - type of the cluster (ex: JkCluster or TomcatCluster)
cluster - Name of the Cluster
Returns:
ObjectName for a ClusterMember
Throws:
javax.management.MalformedObjectNameException

clusterDaemon

public static javax.management.ObjectName clusterDaemon()
                                                 throws java.lang.Exception
Throws:
java.lang.Exception

clusterDaemonProxy

public static javax.management.ObjectName clusterDaemonProxy(java.lang.String name)
                                                      throws javax.management.MalformedObjectNameException
Parameters:
name - name of the ClusterDaemon
Returns:
Throws:
javax.management.MalformedObjectNameException - Could not create ObjectName with the given String

catalinaConnectorFactory

public static javax.management.ObjectName catalinaConnectorFactory(java.lang.String pDomain)
                                                            throws javax.management.MalformedObjectNameException
Parameters:
pDomain - domain name
Returns:
ObjectName for Catalina Connectors Factory
Throws:
javax.management.MalformedObjectNameException - Could not create ObjectName with the given String

webModuleProxy

public static javax.management.ObjectName webModuleProxy(java.lang.String pDomain)
                                                  throws javax.management.MalformedObjectNameException
Parameters:
pDomain - domain name
Returns:
ObjectName for WebModule Proxy
Throws:
javax.management.MalformedObjectNameException - Could not create ObjectName with the given String

ArchiveConfig

public static javax.management.ObjectName ArchiveConfig()
Returns:
ObjectName for the generic archive configurationMBean

RarConfig

public static javax.management.ObjectName RarConfig()
Returns:
ObjectName for RAR specific archive configuration MBean

domainManagement

public static javax.management.ObjectName domainManagement(java.lang.String domain)
                                                    throws javax.management.MalformedObjectNameException
Parameters:
domain - Domain name to look for.
Returns:
ObjectName for domain management
Throws:
javax.management.MalformedObjectNameException - Could not create ObjectName with the given String