|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.norther.tammi.core.base.Adaptee org.norther.tammi.core.converter.DefaultObjectConverter<Variable> org.norther.tammi.core.rt.DefaultVariableConverter
public class DefaultVariableConverter
A default implementation of VariableConverter.
Field Summary |
---|
Fields inherited from class org.norther.tammi.core.base.Adaptee |
---|
ADAPTEE_NOTIF_DESCRIPTION, ADAPTEE_NOTIFICATIONS |
Constructor Summary | |
---|---|
DefaultVariableConverter()
Constructs a new converter. |
Method Summary | |
---|---|
Object |
getInstance(String className,
Object object,
String pattern)
Gets an instance of the named class by converting the source object and optionally applying the specified pattern. |
Object |
getInstance(String className,
Object object,
String pattern,
Locale locale,
ResourceBundle bundle)
Gets an instance of the named class by converting the localized source resource and optionally applying the specified pattern. |
ObjectName |
getVariableRegistryName()
Gets the the variable registry of this converter. |
void |
postmanaged()
This method is called when the implementing adaptee has been managed either during post-registration of the corresponding adapter MBean or just after it is explicitly added to the adapter MBean during run-time. |
void |
setVariableRegistryName(ObjectName registry)
Sets the variable registry of this converter. |
String |
toString(String className,
Object object,
String pattern)
Returns a string representation of an object of the named class by optionally applying the specified pattern. |
String |
toString(String className,
Object object,
String pattern,
Locale locale,
ResourceBundle bundle)
Returns a localized resource of the named class by optionally applying the specified pattern. |
void |
unmanaged()
This method is called when the implementing adaptee is unmanaged either during pre-deregistration of the corresponding adapter MBean or just before it is explicitly removed from the adapter MBean during run-time. |
Methods inherited from class org.norther.tammi.core.converter.DefaultObjectConverter |
---|
fromLocalizedObject, getComponentInstance, getFormatPattern, getInstance, getLocalizedPattern, getResourceFinderName, setResourceFinderName, toComponentString, toLocalizedObject, toString, toStrings, toStrings, toStrings |
Methods inherited from class org.norther.tammi.core.base.Adaptee |
---|
addAdaptee, addNotificationListener, getAttributeSupport, getBroker, getCanonicalName, getDomain, getFactory, getLoader, getLog, getLog, getMBean, getMBeanServer, getNotificationInfo, getObjectName, getRegistrationTime, getSequenceNumber, hasListeners, isRegistered, premanaged, removeNotificationListener, removeNotificationListener, sendNotification, sendNotification, sendNotification, sendNotification, unregister |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.norther.tammi.core.converter.ObjectConverter |
---|
getFormatPattern, getInstance, getLocalizedPattern, getResourceFinderName, setResourceFinderName, toString, toStrings, toStrings, toStrings |
Constructor Detail |
---|
public DefaultVariableConverter()
Method Detail |
---|
public void postmanaged()
Manageable
postmanaged
in interface Manageable
postmanaged
in class DefaultObjectConverter<Variable>
public void unmanaged() throws Exception
Manageable
unmanaged
in interface Manageable
unmanaged
in class DefaultObjectConverter<Variable>
Exception
- if the adaptee refused to be unmanaged.public ObjectName getVariableRegistryName()
VariableConverter
getVariableRegistryName
in interface VariableConverter
public void setVariableRegistryName(ObjectName registry)
VariableConverter
setVariableRegistryName
in interface VariableConverter
registry
- the object name of the variable registry or a query.public Object getInstance(String className, Object object, String pattern) throws ConversionException
ObjectConverter
getInstance
in interface ObjectConverter<Variable>
getInstance
in class DefaultObjectConverter<Variable>
className
- the name of the class.object
- the source object.pattern
- an optional conversion pattern.
ConversionException
- if conversion fails.public Object getInstance(String className, Object object, String pattern, Locale locale, ResourceBundle bundle) throws ConversionException
ObjectConverter
getInstance
in interface ObjectConverter<Variable>
getInstance
in class DefaultObjectConverter<Variable>
className
- the name of the class.object
- the source object.pattern
- an optional conversion pattern.locale
- the locale of the source object.bundle
- the resource bundle to apply.
ConversionException
- if conversion fails.public String toString(String className, Object object, String pattern)
ObjectConverter
toString
in interface ObjectConverter<Variable>
toString
in class DefaultObjectConverter<Variable>
className
- the name of the class.object
- the source object.pattern
- an optional conversion pattern.
public String toString(String className, Object object, String pattern, Locale locale, ResourceBundle bundle)
ObjectConverter
toString
in interface ObjectConverter<Variable>
toString
in class DefaultObjectConverter<Variable>
className
- the name of the class.object
- the source object.pattern
- the conversion pattern.locale
- the optional locale of the result.bundle
- the resource bundle to apply.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |