org.norther.tammi.core.base
Interface Broker

All Superinterfaces:
Container
All Known Implementing Classes:
DefaultBroker

public interface Broker
extends Container

An interface to a broker. The broker supports both queries to any MBeans registered to the MBean server and direct shortcuts to MBeans having an explicit alias maintained by the MBean registry of the broker itself. An alias is a mapping between a chosen alias key and an object name or a query pattern.

MBeans registered to the same domain as the broker itself have automatically alias keys formed from their interface names with package names replaced by an asterisk. The mapping of the default alias key can be replaced in the configuration, but care must be taken that the aliased MBean definitely implements the corresponding interface.

Author:
Ilkka Priha

Method Summary
 Object get(Class clazz)
          Gets the referent of the default MBean implementing a specific interface.
 MBeanReference getMBean(Class clazz)
          Gets a reference to the default MBean implementing a specific interface.
 MBeanReference queryMBean(ObjectName query)
          Queries for an MBean.
 MBeanReference queryMBean(ObjectName query, QueryExp exp)
          Queries for an MBean with a query expression.
 MBeanReference queryMBean(ObjectName query, String className)
          Queries for an MBean of the specified class.
 MBeanReference queryMBean(String pattern)
          Queries for an MBean matching the given query pattern.
 MBeanReference queryMBean(String domain, Map keySet, String className)
          Queries for an MBean from the specific domain, with the given key set and of the specified class.
 MBeanReference queryMBean(String pattern, String className)
          Queries for an MBean matching the given query pattern and of the specified class.
 ObjectName queryObjectName(ObjectName query)
          Queries for an object name of an MBean.
 ObjectName queryObjectName(ObjectName query, QueryExp exp)
          Queries for an object name of an MBean with a query expression.
 ObjectName queryObjectName(ObjectName query, String className)
          Queries for an object name of an MBean of the specified class.
 ObjectName queryObjectName(String pattern)
          Queries for an object name of an MBean matching the given query pattern.
 ObjectName queryObjectName(String domain, Map keySet, String className)
          Queries for an object name of an MBean from the specific domain, with the given key set and of the specified class.
 ObjectName queryObjectName(String pattern, String className)
          Queries for an object name of an MBean matching the given query pattern and of the specified class.
 Set queryObjectNames(ObjectName query)
          Queries for a set of object names of MBeans.
 Set queryObjectNames(ObjectName query, QueryExp exp)
          Queries for a set of object names of MBeans with a query expression.
 Set queryObjectNames(ObjectName query, String className)
          Queries for a set of object names of MBeans of the specified class.
 Set queryObjectNames(String pattern)
          Queries for a set of object names of MBeans matching the given query pattern.
 Set queryObjectNames(String domain, Map keySet, String className)
          Queries for a set of object names of MBeans from the specific domain, with given key set and of the specified class.
 Set queryObjectNames(String pattern, String className)
          Queries for a set of object names of MBeans matching the given query pattern and of the specified class.
 
Methods inherited from interface org.norther.tammi.core.base.Container
clear, containsKey, get, getContainerKey, getContainerKey, getContainerKey, getMBean, getMBeanInterface, getMBeanInterface, getObjectName, getObjectNames, getQueryPattern, registryKeySet, registryKeySet, registryKeySet, registryKeySet, registryMap, registrySize, remove, setMBeanInterface, setQueryPattern, setQueryPattern
 

Method Detail

get

Object get(Class clazz)
Gets the referent of the default MBean implementing a specific interface. The default MBean is the implementation mapped to the default alias key or, if not configured, the first implementation found from the domain of the default broker.

Parameters:
clazz - the MBean interface of the default MBean.
Returns:
the referent of the default MBean implementation or null.

getMBean

MBeanReference getMBean(Class clazz)
Gets a reference to the default MBean implementing a specific interface. The default MBean is the implementation mapped to the default alias key or, if not configured, the first implementation found from the domain of the default broker.

Parameters:
clazz - the MBean interface of the default MBean.
Returns:
a reference to the default MBean implementation or null.

queryMBean

MBeanReference queryMBean(ObjectName query)
Queries for an MBean.

Parameters:
query - a query pattern.
Returns:
the MBean found or null.

queryMBean

MBeanReference queryMBean(ObjectName query,
                          QueryExp exp)
Queries for an MBean with a query expression.

Parameters:
query - a query pattern.
exp - an optional query expression.
Returns:
the MBean found or null.

queryMBean

MBeanReference queryMBean(ObjectName query,
                          String className)
Queries for an MBean of the specified class.

Parameters:
query - a query pattern.
className - a class or interface, null for any.
Returns:
the MBean found or null.

queryMBean

MBeanReference queryMBean(String pattern)
Queries for an MBean matching the given query pattern.

Parameters:
pattern - a query pattern as a string.
Returns:
the MBean found or null.

queryMBean

MBeanReference queryMBean(String pattern,
                          String className)
Queries for an MBean matching the given query pattern and of the specified class.

Parameters:
pattern - a query pattern as a string.
className - a class or interface, null for any.
Returns:
the MBean found or null.

queryMBean

MBeanReference queryMBean(String domain,
                          Map keySet,
                          String className)
Queries for an MBean from the specific domain, with the given key set and of the specified class.

Parameters:
domain - the query domain, null for any.
keySet - a set of keys, null for any.
className - a class or interface, null for any.
Returns:
the MBean found or null.

queryObjectName

ObjectName queryObjectName(ObjectName query)
Queries for an object name of an MBean.

Parameters:
query - a query pattern.
Returns:
the found object name or null.

queryObjectName

ObjectName queryObjectName(ObjectName query,
                           QueryExp exp)
Queries for an object name of an MBean with a query expression.

Parameters:
query - a query pattern.
exp - an optional query expression.
Returns:
the found object name or null.

queryObjectName

ObjectName queryObjectName(ObjectName query,
                           String className)
Queries for an object name of an MBean of the specified class.

Parameters:
query - a query pattern.
className - a class or interface, null for any.
Returns:
the found object name or null.

queryObjectName

ObjectName queryObjectName(String pattern)
Queries for an object name of an MBean matching the given query pattern.

Parameters:
pattern - a query pattern as a string.
Returns:
the found object name or null.

queryObjectName

ObjectName queryObjectName(String pattern,
                           String className)
Queries for an object name of an MBean matching the given query pattern and of the specified class.

Parameters:
pattern - a query pattern as a string.
className - a class or interface, null for any.
Returns:
the found object name or null.

queryObjectName

ObjectName queryObjectName(String domain,
                           Map keySet,
                           String className)
Queries for an object name of an MBean from the specific domain, with the given key set and of the specified class.

Parameters:
domain - the query domain, null for any.
keySet - a set of keys, null for any.
className - a class or interface, null for any.
Returns:
the found object name or null.

queryObjectNames

Set queryObjectNames(ObjectName query)
Queries for a set of object names of MBeans.

Parameters:
query - a query pattern.
Returns:
a set of found object names or an empty set.

queryObjectNames

Set queryObjectNames(ObjectName query,
                     QueryExp exp)
Queries for a set of object names of MBeans with a query expression.

Parameters:
query - a query pattern.
exp - an optional query expression.
Returns:
a set of found object names or an empty set.

queryObjectNames

Set queryObjectNames(ObjectName query,
                     String className)
Queries for a set of object names of MBeans of the specified class.

Parameters:
query - a query pattern.
className - a class or interface, null for any.
Returns:
a set of found object names or an empty set.

queryObjectNames

Set queryObjectNames(String pattern)
Queries for a set of object names of MBeans matching the given query pattern.

Parameters:
pattern - a query pattern as a string.
Returns:
a set of found object names or an empty set.

queryObjectNames

Set queryObjectNames(String pattern,
                     String className)
Queries for a set of object names of MBeans matching the given query pattern and of the specified class.

Parameters:
pattern - a query pattern as a string.
className - a class or interface, null for any.
Returns:
a set of found object names or an empty set.

queryObjectNames

Set queryObjectNames(String domain,
                     Map keySet,
                     String className)
Queries for a set of object names of MBeans from the specific domain, with given key set and of the specified class.

Parameters:
domain - the query domain, null for any.
keySet - a set of keys, null for any.
className - a class or interface, null for any.
Returns:
a set of found object names or an empty set.


Copyright © 2004 The Norther Organization. All rights reserved.