org.norther.tammi.root.db
Class StaticPersisterFactory

java.lang.Object
  extended by org.norther.tammi.root.db.StaticPersisterFactory

public class StaticPersisterFactory
extends Object

A convenience class to statically access connection specific persister factories.

Author:
Ilkka Priha

Constructor Summary
StaticPersisterFactory()
           
 
Method Summary
static MBeanReference getPersisterFactoryMBean(String className, String alias)
          Gets a reference to the persister factory MBean of the specified persister class and connection alias.
static MBeanReference putRegisteredConnection(String className, String alias, MBeanReference ref)
          Adds a registered connection alias.
static boolean removePersisterFactoryMBean(String className, MBeanReference ref)
          Removes the specified persister factory.
static boolean removeRegisteredConnection(String className, String alias, MBeanReference ref)
          Removes a registered connection alias.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StaticPersisterFactory

public StaticPersisterFactory()
Method Detail

getPersisterFactoryMBean

public static MBeanReference getPersisterFactoryMBean(String className,
                                                      String alias)
Gets a reference to the persister factory MBean of the specified persister class and connection alias.

Parameters:
className - the persister class name.
alias - the connection alias.
Returns:
a reference to the corresponding persister factory MBean or null.

removePersisterFactoryMBean

public static boolean removePersisterFactoryMBean(String className,
                                                  MBeanReference ref)
Removes the specified persister factory.

Parameters:
className - the persister class name.
ref - a reference to the corresponding persister factory MBean.
Returns:
false if already removed, true otherwise.

putRegisteredConnection

public static MBeanReference putRegisteredConnection(String className,
                                                     String alias,
                                                     MBeanReference ref)
Adds a registered connection alias. If the alias is already registered, the existing persister factory is replaced.

Parameters:
className - the persister class name.
alias - the connection alias.
ref - the corresponding factory.
Returns:
the previous factory, if any.

removeRegisteredConnection

public static boolean removeRegisteredConnection(String className,
                                                 String alias,
                                                 MBeanReference ref)
Removes a registered connection alias.

Parameters:
className - the persister class name.
alias - the connection alias.
ref - the corresponding factory.
Returns:
false if already removed, true otherwise.


Copyright © 2004 The Norther Organization. All rights reserved.