org.norther.tammi.core.locale
Class PluggableResourceBundle

java.lang.Object
  extended by java.util.ResourceBundle
      extended by org.norther.tammi.core.locale.LookupResourceBundle
          extended by org.norther.tammi.core.locale.PluggableResourceBundle
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
ConfigurationResourceBundle, PersistentResourceBundle

public abstract class PluggableResourceBundle
extends LookupResourceBundle

An abstract extension of LookupResourceBundle with support to plug-in to a named resource finder. Subclasses may override the plugIn method to load class specific resources.

Version:
$Id: PluggableResourceBundle.java,v 1.13 2009/09/28 15:08:44 cvsimp Exp $
Author:
Ilkka Priha
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class java.util.ResourceBundle
ResourceBundle.Control
 
Field Summary
 
Fields inherited from class java.util.ResourceBundle
parent
 
Constructor Summary
protected PluggableResourceBundle()
          Constructs an empty bundle.
 
Method Summary
protected  MBeanServer getMBeanServer()
          Gets the MBean server of this bundle.
protected  String getPlugInKey()
          Gets the plug-in key of this bundle.
protected  long getResourceCheckInterval()
          Gets the resource check interval of this bundle.
protected  MBeanReference<? extends ResourceFinder> getResourceFinderMBean()
          Gets a reference to the resource finder MBean of this bundle.
protected  void plugIn(String name, MBeanReference<? extends ResourceFinder> instance)
          Plugs in to the referenced resource finder.
protected  void release()
          Releases this plug-in bundle.
 
Methods inherited from class org.norther.tammi.core.locale.LookupResourceBundle
getBaseName, getKeys, getKeys, getParent, handleGetObject, lookup, lookup, lookupKey, lookupObject, lookupString, lookupStringArray, setBaseName
 
Methods inherited from class java.util.ResourceBundle
clearCache, clearCache, containsKey, getBundle, getBundle, getBundle, getBundle, getBundle, getBundle, getLocale, getObject, getString, getStringArray, handleKeySet, keySet, setParent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PluggableResourceBundle

protected PluggableResourceBundle()
Constructs an empty bundle.

Method Detail

plugIn

protected void plugIn(String name,
                      MBeanReference<? extends ResourceFinder> instance)
Plugs in to the referenced resource finder.

Parameters:
name - the base name of this resource bundle.
instance - the resource finder.
Throws:
ClassCastException - if not a resource finder.

getPlugInKey

protected String getPlugInKey()
Gets the plug-in key of this bundle.

Returns:
the plug-in key.

getResourceFinderMBean

protected MBeanReference<? extends ResourceFinder> getResourceFinderMBean()
Gets a reference to the resource finder MBean of this bundle.

Returns:
a reference to the resource finder MBean or null.

getResourceCheckInterval

protected long getResourceCheckInterval()
Gets the resource check interval of this bundle.

Returns:
the resource check interval.

getMBeanServer

protected MBeanServer getMBeanServer()
Gets the MBean server of this bundle.

Returns:
the MBean server or null.

release

protected void release()
Releases this plug-in bundle.



Copyright © 2004 The Norther Organization. All rights reserved.