|
Message Queue, v4.5.1 API Specification | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.messaging.AdministeredObject
public abstract class AdministeredObject
An AdministeredObject
encapsulates behavior common
to all Sun MQ Administered Objects and MQ Administered Object
classes extend this class.
All MQ Administered Objects contain a configuration and maintain a state flag indicating whether they are modifiable or read only. They are also versioned to support migration of previous formats of MQ Administered Objects to the current format.
When a MQ Administered Object is first created it contains the
default configuration and the configuration is modifiable.
After modification (either programmatically, or by the administrator
using the MQ Administration utilities), an AdministeredObject
can be set to read only to prevent further modification.
Typically, the Sun MQ Administration utilities would be used to create MQ Administered Objects, optionally set their state to read only, and store them using the Java Naming and Directory Service (JNDI).
When Sun MQ applications use JNDI and lookup()
MQ Administered
Objects that have had their state set to read only, the applications
will not be able to modify the administrator stored configurations.
Sun MQ automatically converts JMQ, iMQ and Sun ONE MQ Administered Objects from the following previous versions of JMQ, iMQ and Sun ONE MQ to the current version of Oracle GlassFish(tm) Server Message Queue Administered Objects.
Conversion of JMQ Administered Objects created using JMQ1.1 EA and versions of JMQ prior to JMQ1.1 EA is not supported.
Field Summary | |
---|---|
static String |
AO_PROPERTY_TYPE_BOOLEAN
AdministeredObject configuration property type designator for Boolean |
static String |
AO_PROPERTY_TYPE_INTEGER
AdministeredObject configuration property type designator for Integer |
static String |
AO_PROPERTY_TYPE_LIST
AdministeredObject configuration property type designator for List |
static String |
AO_PROPERTY_TYPE_LONG
AdministeredObject configuration property type designator for Long |
static String |
AO_PROPERTY_TYPE_PROPERTYOWNER
AdministeredObject configuration property type designator for PropertyOwner |
static String |
AO_PROPERTY_TYPE_STRING
AdministeredObject configuration property type designator for String |
protected static Map<String,Properties[]> |
cachedConfigurationMap
cachedConfigurationMap key = defaultsBase, value is a Properties[] where value[0] is the cached initial value of configuration where value[1] is the cached initial value of configurationTypes where value[2] is the cached initial value of configurationLabels |
protected Properties |
configuration
The configuration of this AdministeredObject |
protected Properties |
configurationLabels
|
protected Properties |
configurationTypes
|
static com.sun.messaging.jmq.jmsclient.resources.ClientResources |
cr
|
String |
storedVersion
The original version # of this object stored in JNDI |
static String |
VERSION
The Version string of this AdministeredObject is 3.0 |
Constructor Summary | |
---|---|
AdministeredObject(String defaultsBase)
|
Method Summary | |
---|---|
String |
dump()
Returns the provider specific name for this AdministeredObject along with
a complete listing of its configuration, configuration attribute label keys and
configuration attribute types. |
Enumeration |
enumeratePropertyNames()
Returns an enumeration of the configuration property names of this AdministeredObject . |
Properties |
getConfiguration()
Returns the configuration of this AdministeredObject . |
Properties |
getCurrentConfiguration()
Returns the current (runtime) configuration of this AdministeredObject modified by any System properties. |
String |
getLabelForGroup(String group)
Returns the label for a given group. |
String |
getPropertiesForGroup(String group)
Returns an ordered property list for a given group. |
String |
getProperty(String propname)
Returns a single configuration property value given the property name. |
String |
getPropertyForListValue(String listpropname,
String listvalue)
Returns the property name for any selection on Properties of Type List. |
String |
getPropertyGroups()
Returns an ordered property groups list. |
String |
getPropertyLabel(String propname)
Returns the configuration label of a single configuration property name. |
String |
getPropertyListOtherName(String propname)
Returns the property name for the ... |
String |
getPropertyListValues(String propname)
Returns an ordered property list for Properties of Type List. |
String |
getPropertyType(String propname)
Returns the configuration type of a single configuration property name. |
String |
getPropertyValueForListValue(String listpropname,
String listvalue,
String propname)
Returns the property values set when a property of type List is set to a particular value. |
String |
getStoredVersion()
Returns the storedVersion of this AministeredObject . |
static String |
getVERSION()
Returns the Version string used for this MQ AdministeredObject . |
boolean |
isPropertyDeprecated(String propname)
Returns whether a single configuration property name is deprecated or not. |
boolean |
isPropertyHidden(String propname)
Returns whether a single configuration property name should be hidden or not. |
boolean |
isReadOnly()
Returns the readOnly state of this AministeredObject . |
boolean |
isStoredVersionCompatible()
Tests whether the storedVersion of this AministeredObject
is compatible with the current runtime VERSION |
abstract void |
setDefaultConfiguration()
Subclasses must implement this to set their default configuration. |
String |
setProperty(String propname,
String propval)
Sets a single configuration property in this AdministeredObject . |
void |
setReadOnly()
Sets this AdministeredObject to be read only. |
String |
toString()
Returns the provider specific name for this AdministeredObject along with
a listing of its configuration. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String VERSION
AdministeredObject
is 3.0
public static final String AO_PROPERTY_TYPE_STRING
public static final String AO_PROPERTY_TYPE_INTEGER
public static final String AO_PROPERTY_TYPE_LONG
public static final String AO_PROPERTY_TYPE_BOOLEAN
public static final String AO_PROPERTY_TYPE_PROPERTYOWNER
public static final String AO_PROPERTY_TYPE_LIST
public String storedVersion
protected Properties configuration
AdministeredObject
protected Properties configurationTypes
protected Properties configurationLabels
public static final transient com.sun.messaging.jmq.jmsclient.resources.ClientResources cr
protected static final Map<String,Properties[]> cachedConfigurationMap
Constructor Detail |
---|
public AdministeredObject(String defaultsBase)
Method Detail |
---|
public abstract void setDefaultConfiguration()
public final boolean isReadOnly()
AministeredObject
.
AministeredObject
public final String getStoredVersion()
AministeredObject
.
AministeredObject
public final boolean isStoredVersionCompatible()
AministeredObject
is compatible with the current runtime VERSION
This methods flags mismatches between this Administered Object
and the version stored in JNDI using an earlier or different version of this class.
It is advisable to check before an earlier version of Administered Object
is being overwritten by a newer version, otherwise an earlier version
of the MQ Client will fail when attempting to use JNDI to lookup()
that earlier version of the Administered Object.
AministeredObject
public final void setReadOnly()
AdministeredObject
to be read only.
Once this AdministeredObject
has been set to
read only it cannot be reset back to read write.
public Properties getConfiguration()
AdministeredObject
.
The configuration returned is the one that has been administratively
or programmatically set in this AdministeredObject
This configuration is unaffected by runtime overrides using System properties.
Use getCurrentConfiguration()
to get the current
configuration, which takes into account any overriding
System properties that have been set at runtime.
AdministeredObject
.getCurrentConfiguration()
public String getPropertyGroups()
|
' character as the separator.public String getPropertiesForGroup(String group)
group
- The group for which the property list is desired.
|
' character as the separator.public String getLabelForGroup(String group)
group
- The group for which the label is desired.
public String getPropertyListValues(String propname)
propname
- The name of the configuration property that is of type List.
|
' character as the separator.public String getPropertyForListValue(String listpropname, String listvalue)
listpropname
- The name of the configuration property that is of type List.listvalue
- The value of the configuration property that is of type List.
listvalue
.public String getPropertyValueForListValue(String listpropname, String listvalue, String propname)
listpropname
- The name of the configuration property that is of type List.listvalue
- The value of the configuration property that is of type List.propname
- The name of the property for which the value is being sought.
propname
is pre set to when the
property listpropname
of type list is set to the value
listvalue
.public String getPropertyListOtherName(String propname)
...
selection on
Properties of Type List is selected.public Enumeration enumeratePropertyNames()
AdministeredObject
.
public String setProperty(String propname, String propval) throws JMSException
AdministeredObject
.
propname
- The name of the configuration property to set.propval
- The value of the configuration property to set.
InvalidPropertyException
- If an invalid property name is being set.
The Exception string is the name of the invalid property.
InvalidPropertyValueException
- If an invalid property value is being set.
The Exception string is the invalid value of the property.
ReadOnlyPropertyException
- If an attempt is made to modify this
AdministeredObject
when the readOnly flag has been set.
JMSException
public String getProperty(String propname) throws JMSException
propname
- The name of the configuration property.
propname
.
InvalidPropertyException
- If an invalid property name is being requested.
The Exception string is the name of the invalid property.
JMSException
public String getPropertyType(String propname) throws JMSException
propname
- The name of the configuration property.
propname
.
InvalidPropertyException
- If an invalid property name is being requested.
The Exception string is the name of the invalid property.
JMSException
public String getPropertyLabel(String propname) throws JMSException
propname
- The name of the configuration property.
propname
.
InvalidPropertyException
- If an invalid property name is being requested.
The Exception string is the name of the invalid property.
JMSException
public boolean isPropertyHidden(String propname) throws JMSException
propname
- The name of the configuration property.
true
If the configuration property propname
should be hidden; false
if it should not be hidden
i.e. it is still supported in this version.
InvalidPropertyException
- If an invalid property name is being requested.
The Exception string is the name of the invalid property.
JMSException
public boolean isPropertyDeprecated(String propname) throws JMSException
propname
- The name of the configuration property.
true
If the configuration property propname
has been deprecated; false
if it has not been deprecated
i.e. it is still supported in this version.
InvalidPropertyException
- If an invalid property name is being requested.
The Exception string is the name of the invalid property.
JMSException
public String toString()
AdministeredObject
along with
a listing of its configuration.
toString
in class Object
AdministeredObject
along with a listing of its configuration.public String dump()
AdministeredObject
along with
a complete listing of its configuration, configuration attribute label keys and
configuration attribute types.
AdministeredObject
along with a listing of its configuration.public static final String getVERSION()
AdministeredObject
.
public Properties getCurrentConfiguration()
AdministeredObject
modified by any System properties.
If the readOnly flag of this AdministeredObject
is set, then
this AdministeredObject
is not affected by any System Properties
set at runtime.
AdministeredObject
modified by any System properties.getConfiguration()
|
Message Queue, v4.5.1 API Specification | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |