org.ow2.jonas.lib.util
Class JonasObjectName

java.lang.Object
  extended by org.ow2.jonas.lib.util.JonasObjectName

public class JonasObjectName
extends 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

Constructor Summary
JonasObjectName()
           
 
Method Summary
static ObjectName allGroups(String domainName, String pResource)
          Return an objectName for all groups in a resource.
static ObjectName allRoles(String domainName, String pResource)
          Return an objectName for all roles in a resource.
static ObjectName allSecurityDatasourceFactories(String domainName)
          Return an objectName for all the Security datasource factories.
static ObjectName allSecurityFactories(String domainName)
          Return an objectName for the Security factory name.
static ObjectName allSecurityLdapFactories(String domainName)
          Return an objectName for all the Security ldap factories.
static ObjectName allSecurityMemoryFactories(String domainName)
          Return an objectName for all the Security memory factories.
static ObjectName allUsers(String domainName, String pResource)
          Return an objectName for all users in a resource.
static ObjectName allWars(String domainName)
          ObjectName for all war MBeans in the domain
static ObjectName ArchiveConfig(String domainName)
           
static ObjectName cluster(String domainName, String name, String type)
          Build an ObjectName for a Cluster defined by its type and its name.
static ObjectName clusterDaemon(String domainName)
           
static ObjectName clusterDaemonProxy(String domainName, String name)
           
static ObjectName clusterDaemonProxys(String domainName)
           
static ObjectName clusterMember(String domainName, String name, String type, String cluster)
          Build an ObjectName for a ClusterMember.
static ObjectName clusters(String domainName, String type)
          Build an ObjectName for a Cluster defined by its type only.
static ObjectName cmiClient(String domainName, String serverName)
          Build an ObjectName for the CMIClient MBean.
static ObjectName cmiServer(String domainName, String serverName)
          Build an ObjectName for the CMIServer MBean.
static ObjectName databaseService(String domainName)
           
static ObjectName deployableMonitorService(String domainName)
          Return the deployableMonitorService (Jmx).
static ObjectName deploymentPlan(String domainName)
          Build an ObjectName for the DeploymentPlan MBean.
static ObjectName discoveryClient(String domainName)
           
static ObjectName discoveryEnroller(String domainName)
           
static ObjectName discoveryManager(String domainName)
           
static ObjectName discoveryService(String domainName)
          Construct ObjectName for the discovery service MBean
static ObjectName earService(String domainName)
          Return the earService (Jmx).
static ObjectName ejbService(String domainName)
           
static String fileNameForObjectName(String fileName)
           
static String getType(ObjectName obj)
           
static ObjectName group(String domainName, String resource, String groupname)
          Return an objectName for a group
static ObjectName jaxrpcService(String domainName)
          Return the jaxrpcService MBean ObjectName
static ObjectName jaxwsService(String domainName)
          Return the jaxwsService MBean ObjectName
static ObjectName jgroupsDiscoveryCommManager(String domainName, String discoveryType, String srvName)
           
static ObjectName jgroupsDiscoveryManager(String domainName, String discoveryType, String srvName)
           
static ObjectName jmsService(String domainName)
           
static ObjectName jmxConnectorServer(String protocol, String connectorName)
          Create ObjectName for the JMX Connector Server which is an MBean inside the target MBeanServer
static ObjectName jmxService()
           
static ObjectName jndiContextInterceptor(String domainName, String interceptorName)
          ObjectName for a given context interceptor.
static ObjectName jndiInterceptors(String domainName)
          Return the JNDI Interceptors Object Name (Jmx).
static ObjectName logBuffer(String domainName, String name)
          Create ObjectName for the LogBuffer MBean
static ObjectName logBuffers(String domainName)
          Create ObjectName for the LogBuffer MBean
static ObjectName logService()
           
static ObjectName logService(String domainName)
           
static ObjectName mailService(String domainName)
          Return the mailService (Jmx).
static ObjectName RarConfig(String domainName)
           
static ObjectName repository(String domainName)
          Build an ObjectName for the Repository MBean.
static ObjectName resourceMonitor(String domainName)
          Build an ObjectName for the ResourceMonitor MBean.
static ObjectName resourceService(String domainName)
           
static ObjectName role(String domainName, String resource, String rolename)
          Return an objectName for a role
static ObjectName securityDatasourceFactory(String domainName, String name)
          Return an objectName for a Security datasource factory.
static ObjectName securityLdapFactory(String domainName, String name)
          Return an objectName for a Security ldap factory.
static ObjectName securityMemoryFactory(String domainName, String name)
          Return an objectName for a Security memory factory.
static ObjectName securityService(String domainName)
           
static ObjectName serverConfig(String domainName)
           
static ObjectName serverProxy(String domainName, String serverName)
           
static ObjectName serverProxys(String domainName)
           
static ObjectName smartclient(String domainName)
          Return an objectName for the smartclient service.
 String toString()
          A different implementation should allow returning a logical name.
static ObjectName transactionService(String domainName)
           
static ObjectName user(String domainName, String resource, String username)
          Return an objectName for a user
static ObjectName versioning(String domainName)
          Return an objectName for the versioning service.
static ObjectName war(String domainName, String filename)
          War MBean ObjectName
static ObjectName webContainerService(String domainName)
          Return the webContainerService MBean ObjectName.
static ObjectName workCleaner(String domainName)
          Return an objectName for the WorkCleaner.
static ObjectName workManager(String domainName)
          Return an objectName for the WorkManager
static ObjectName wsdlPublisherService(String domainName)
          Return the wsdlPublisher MBean ObjectName
static ObjectName wsService(String domainName)
           
 
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 ObjectName jmxConnectorServer(String protocol,
                                            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 ObjectName serverConfig(String domainName)
Parameters:
domainName - domain name
Returns:
ObjectName for reconfiguration manager MBean

wsService

public static ObjectName wsService(String domainName)
Parameters:
domainName - the domain name
Returns:
ObjectName for an web services

ejbService

public static ObjectName ejbService(String domainName)
Parameters:
domainName - the domain name
Returns:
ObjectName for the ejb service MBean

earService

public static ObjectName earService(String domainName)
Return the earService (Jmx).

Parameters:
domainName - the domain name
Returns:
the Ear service.

deployableMonitorService

public static ObjectName deployableMonitorService(String domainName)
Return the deployableMonitorService (Jmx).

Parameters:
domainName - the domain name
Returns:
the DeployableMonitor service.

mailService

public static ObjectName mailService(String domainName)
Return the mailService (Jmx).

Parameters:
domainName - the domain name
Returns:
the Mail service.

jndiInterceptors

public static ObjectName jndiInterceptors(String domainName)
Return the JNDI Interceptors Object Name (Jmx).

Parameters:
domainName - the domain name
Returns:
the ObjectName of the JNDI Interceptor component.

jndiContextInterceptor

public static ObjectName jndiContextInterceptor(String domainName,
                                                String interceptorName)
ObjectName for a given context interceptor.

Parameters:
domainName - the JMX domain
interceptorName - the name of the interceptor
Returns:
the built object name

webContainerService

public static ObjectName webContainerService(String domainName)
Return the webContainerService MBean ObjectName.

Parameters:
domainName - the domain name
Returns:
the web container service.

jaxrpcService

public static ObjectName jaxrpcService(String domainName)
Return the jaxrpcService MBean ObjectName

Parameters:
domainName - the domain name
Returns:
the JAX-RPC service.

jaxwsService

public static ObjectName jaxwsService(String domainName)
Return the jaxwsService MBean ObjectName

Parameters:
domainName - the domain name
Returns:
the JAX-WS service.

wsdlPublisherService

public static ObjectName wsdlPublisherService(String domainName)
Return the wsdlPublisher MBean ObjectName

Parameters:
domainName - the domain name
Returns:
the WSDL Publisher service.

databaseService

public static ObjectName databaseService(String domainName)
Parameters:
domainName - the domain name
Returns:
ObjectName for dbm service MBean

resourceService

public static ObjectName resourceService(String domainName)
Parameters:
domainName - the domain name
Returns:
ObjectName for resource service MBean

transactionService

public static ObjectName transactionService(String domainName)
Parameters:
domainName - the domain name
Returns:
ObjectName for jtm service MBean

logService

public static ObjectName logService(String domainName)
Parameters:
domainName - domain name
Returns:
ObjectName for JOnAS logging MBeans

logService

public static ObjectName logService()
Returns:
ObjectName for JOnAS logging MBeans

logBuffer

public static ObjectName logBuffer(String domainName,
                                   String name)
Create ObjectName for the LogBuffer MBean

Parameters:
domainName - domain name
name - LogBuffer name
Returns:
ObjectName for the LogBuffer MBean

logBuffers

public static ObjectName logBuffers(String domainName)
Create ObjectName for the LogBuffer MBean

Parameters:
domainName - domain name
name - LogBuffer name
Returns:
ObjectName for the LogBuffer MBean

discoveryService

public static ObjectName discoveryService(String domainName)
Construct ObjectName for the discovery service MBean

Parameters:
domainName - the domain name
Returns:
ObjectName for the discovery service MBean

jmsService

public static ObjectName jmsService(String domainName)
Parameters:
domainName - the domain name
Returns:
ObjectName for jms service MBean

securityService

public static ObjectName securityService(String domainName)
Parameters:
domainName - the domain name
Returns:
ObjectName for jtm service MBean

jmxService

public static ObjectName jmxService()
Returns:
ObjectName for jmx service MBean

war

public static ObjectName war(String domainName,
                             String filename)
                      throws MalformedObjectNameException
War MBean ObjectName

Parameters:
domainName - domain name
filename - name of the file containing the war
Returns:
War MBean ObjectName
Throws:
MalformedObjectNameException - Could not construct ObjectName

workCleaner

public static ObjectName workCleaner(String domainName)
Return an objectName for the WorkCleaner.

Parameters:
domainName - domain name
Returns:
an objectName for the WorkCleaner

versioning

public static ObjectName versioning(String domainName)
Return an objectName for the versioning service.

Parameters:
domainName - domain name
Returns:
an objectName for the versioning service.

smartclient

public static ObjectName smartclient(String domainName)
Return an objectName for the smartclient service.

Parameters:
domainName - domain name
Returns:
an objectName for the smartclient service.

workManager

public static ObjectName workManager(String domainName)
Return an objectName for the WorkManager

Parameters:
domainName - domain name
Returns:
an objectName for the WorkManager

securityMemoryFactory

public static ObjectName securityMemoryFactory(String domainName,
                                               String name)
                                        throws MalformedObjectNameException
Return an objectName for a Security memory factory.

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

securityDatasourceFactory

public static ObjectName securityDatasourceFactory(String domainName,
                                                   String name)
                                            throws MalformedObjectNameException
Return an objectName for a Security datasource factory.

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

securityLdapFactory

public static ObjectName securityLdapFactory(String domainName,
                                             String name)
                                      throws MalformedObjectNameException
Return an objectName for a Security ldap factory.

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

user

public static ObjectName user(String domainName,
                              String resource,
                              String username)
                       throws 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
domainName - the domain name
Returns:
an objectName for the user MBean
Throws:
MalformedObjectNameException - if the objectname can't be build

group

public static ObjectName group(String domainName,
                               String resource,
                               String groupname)
                        throws 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
domainName - the domain name
Returns:
an objectName for the group MBean
Throws:
MalformedObjectNameException - if the objectname can't be build

role

public static ObjectName role(String domainName,
                              String resource,
                              String rolename)
                       throws 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
domainName - the domain name
Returns:
an objectName for the user MBean
Throws:
MalformedObjectNameException - if the objectname can't be build

allWars

public static ObjectName allWars(String domainName)
ObjectName for all war MBeans in the domain

Parameters:
domainName - domain name
Returns:
ObjectName for all war MBeans in the domain

getType

public static String getType(ObjectName obj)

fileNameForObjectName

public static String fileNameForObjectName(String fileName)

allSecurityFactories

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

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

allSecurityMemoryFactories

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

Parameters:
domainName - the domain name
Returns:
an objectName for all the security memory factories
Throws:
MalformedObjectNameException - if the objectname can't be build

allSecurityDatasourceFactories

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

Parameters:
domainName - the domain name
Returns:
an objectName for all the security datasource factories
Throws:
MalformedObjectNameException - if the objectname can't be build

allSecurityLdapFactories

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

Parameters:
domainName - the domain name
Returns:
an objectName for all the security ldap factories
Throws:
MalformedObjectNameException - if the objectname can't be build

allUsers

public static ObjectName allUsers(String domainName,
                                  String pResource)
                           throws MalformedObjectNameException
Return an objectName for all users in a resource.

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

allRoles

public static ObjectName allRoles(String domainName,
                                  String pResource)
                           throws MalformedObjectNameException
Return an objectName for all roles in a resource.

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

allGroups

public static ObjectName allGroups(String domainName,
                                   String pResource)
                            throws MalformedObjectNameException
Return an objectName for all groups in a resource.

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

toString

public String toString()
A different implementation should allow returning a logical name. This is done currently in the invoke method of ManagementReprImpl/Mx4jManagementReprImpl classes.

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

discoveryManager

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

jgroupsDiscoveryManager

public static ObjectName jgroupsDiscoveryManager(String domainName,
                                                 String discoveryType,
                                                 String srvName)
                                          throws MalformedObjectNameException
Parameters:
domainName - the management domain name
Returns:
ObjectName for Jgroups discovery manager MBean
Throws:
MalformedObjectNameException - Could not create ObjectName with the given String

discoveryClient

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

discoveryEnroller

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

serverProxy

public static ObjectName serverProxy(String domainName,
                                     String serverName)
                              throws MalformedObjectNameException
Returns:
ObjectName for ServerProxy MBean
Throws:
MalformedObjectNameException - Could not create ObjectName with the given String

serverProxys

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

cluster

public static ObjectName cluster(String domainName,
                                 String name,
                                 String type)
                          throws 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:
MalformedObjectNameException

clusters

public static ObjectName clusters(String domainName,
                                  String type)
                           throws 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:
MalformedObjectNameException

clusterMember

public static ObjectName clusterMember(String domainName,
                                       String name,
                                       String type,
                                       String cluster)
                                throws 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:
MalformedObjectNameException

clusterDaemon

public static ObjectName clusterDaemon(String domainName)
                                throws Exception
Throws:
Exception

clusterDaemonProxy

public static ObjectName clusterDaemonProxy(String domainName,
                                            String name)
                                     throws MalformedObjectNameException
Parameters:
name - name of the ClusterDaemon
Returns:
Throws:
MalformedObjectNameException - Could not create ObjectName with the given String

clusterDaemonProxys

public static ObjectName clusterDaemonProxys(String domainName)
                                      throws MalformedObjectNameException
Parameters:
name - name of the ClusterDaemon
Returns:
Throws:
MalformedObjectNameException - Could not create ObjectName with the given String

ArchiveConfig

public static ObjectName ArchiveConfig(String domainName)
Parameters:
domainName - the management domain name
Returns:
ObjectName for the generic archive configurationMBean

RarConfig

public static ObjectName RarConfig(String domainName)
Parameters:
domainName - the management domain name
Returns:
ObjectName for RAR specific archive configuration MBean

jgroupsDiscoveryCommManager

public static ObjectName jgroupsDiscoveryCommManager(String domainName,
                                                     String discoveryType,
                                                     String srvName)
                                              throws MalformedObjectNameException
Parameters:
domainName -
Returns:
Throws:
MalformedObjectNameException

cmiClient

public static ObjectName cmiClient(String domainName,
                                   String serverName)
                            throws MalformedObjectNameException
Build an ObjectName for the CMIClient MBean.

Parameters:
domainName - the management domain name
serverName - the managed server
Returns:
ObjectName for a CMIClient
Throws:
MalformedObjectNameException - if an ObjectName cannot be created with the given String

cmiServer

public static ObjectName cmiServer(String domainName,
                                   String serverName)
                            throws MalformedObjectNameException
Build an ObjectName for the CMIServer MBean.

Parameters:
domainName - the management domain name
serverName - the managed server
Returns:
ObjectName for a CMIServer
Throws:
MalformedObjectNameException - if an ObjectName cannot be created with the given String

repository

public static ObjectName repository(String domainName)
                             throws MalformedObjectNameException
Build an ObjectName for the Repository MBean.

Parameters:
domainName - the management domain name
Returns:
ObjectName for a Repository Service
Throws:
MalformedObjectNameException - if an ObjectName cannot be created with the given String

deploymentPlan

public static ObjectName deploymentPlan(String domainName)
                                 throws MalformedObjectNameException
Build an ObjectName for the DeploymentPlan MBean.

Parameters:
domainName - the management domain name
Returns:
ObjectName for a deploymentPlan Service
Throws:
MalformedObjectNameException - if an ObjectName cannot be created with the given String

resourceMonitor

public static ObjectName resourceMonitor(String domainName)
                                  throws MalformedObjectNameException
Build an ObjectName for the ResourceMonitor MBean.

Parameters:
domainName - the management domain name
Returns:
ObjectName for a resource monitor Service
Throws:
MalformedObjectNameException - if an ObjectName cannot be created with the given String


Copyright © 2010 OW2 Consortium. All Rights Reserved.