Class AdministeredObject
- All Implemented Interfaces:
- Serializable
- Direct Known Subclasses:
- AdminConnectionFactory,- BasicConnectionFactory,- Destination
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.
- JMQ 1.1 Beta
- JMQ 1.1 FCS
- JMQ 2.0 FCS
- JMQ 2.1 SP1
- iMQ 3.0 FCS
- S1MQ 3.5 FCS
Conversion of JMQ Administered Objects created using JMQ1.1 EA and versions of JMQ prior to JMQ1.1 EA is not supported.
- See Also:
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final StringAdministeredObject configuration property type designator for Booleanstatic final StringAdministeredObject configuration property type designator for Integerstatic final StringAdministeredObject configuration property type designator for Liststatic final StringAdministeredObject configuration property type designator for Longstatic final StringAdministeredObject configuration property type designator for PropertyOwnerstatic final StringAdministeredObject configuration property type designator for Stringprotected static final Map<String, Properties[]> 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 configurationLabelsprotected PropertiesThe configuration of thisAdministeredObjectprotected Propertiesprotected Propertiesstatic final com.sun.messaging.jmq.jmsclient.resources.ClientResourcesstatic final StringThe Version string of thisAdministeredObjectis3.0
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptiondump()Returns the provider specific name for thisAdministeredObjectalong with a complete listing of its configuration, configuration attribute label keys and configuration attribute types.Returns an enumeration of the configuration property names of thisAdministeredObject.Returns the configuration of thisAdministeredObject.Returns the current (runtime) configuration of thisAdministeredObjectmodified by any System properties.getLabelForGroup(String group) Returns the label for a given group.getPropertiesForGroup(String group) Returns an ordered property list for a given group.getProperty(String propname) Returns a single configuration property value given the property name.getPropertyForListValue(String listpropname, String listvalue) Returns the property name for any selection on Properties of Type List.Returns an ordered property groups list.getPropertyLabel(String propname) Returns the configuration label of a single configuration property name.getPropertyListOtherName(String propname) Returns the property name for the ...getPropertyListValues(String propname) Returns an ordered property list for Properties of Type List.getPropertyType(String propname) Returns the configuration type of a single configuration property name.getPropertyValueForListValue(String listpropname, String listvalue, String propname) Returns the property values set when a property of type List is set to a particular value.final StringReturns the storedVersion of thisAministeredObject.static StringReturns the Version string used for this MQAdministeredObject.booleanisPropertyDeprecated(String propname) Returns whether a single configuration property name is deprecated or not.booleanisPropertyHidden(String propname) Returns whether a single configuration property name should be hidden or not.final booleanReturns the readOnly state of thisAministeredObject.final booleanTests whether the storedVersion of thisAministeredObjectis compatible with the current runtime VERSIONabstract voidSubclasses must implement this to set their default configuration.setProperty(String propname, String propval) Sets a single configuration property in thisAdministeredObject.final voidSets thisAdministeredObjectto be read only.final voidsetStoredVersion(String version) toString()Returns the provider specific name for thisAdministeredObjectalong with a listing of its configuration.
- 
Field Details- 
VERSIONThe Version string of thisAdministeredObjectis3.0- See Also:
 
- 
AO_PROPERTY_TYPE_STRINGAdministeredObject configuration property type designator for String- See Also:
 
- 
AO_PROPERTY_TYPE_INTEGERAdministeredObject configuration property type designator for Integer- See Also:
 
- 
AO_PROPERTY_TYPE_LONGAdministeredObject configuration property type designator for Long- See Also:
 
- 
AO_PROPERTY_TYPE_BOOLEANAdministeredObject configuration property type designator for Boolean- See Also:
 
- 
AO_PROPERTY_TYPE_PROPERTYOWNERAdministeredObject configuration property type designator for PropertyOwner- See Also:
 
- 
AO_PROPERTY_TYPE_LISTAdministeredObject configuration property type designator for List- See Also:
 
- 
configurationThe configuration of thisAdministeredObject
- 
configurationTypes
- 
configurationLabels
- 
crpublic static final transient com.sun.messaging.jmq.jmsclient.resources.ClientResources cr
- 
cachedConfigurationMapcachedConfigurationMap 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
 
- 
- 
Constructor Details- 
AdministeredObject
 
- 
- 
Method Details- 
setDefaultConfigurationpublic abstract void setDefaultConfiguration()Subclasses must implement this to set their default configuration.
- 
isReadOnlypublic final boolean isReadOnly()Returns the readOnly state of thisAministeredObject.- Returns:
- the readOnly state of this AministeredObject
 
- 
getStoredVersionReturns the storedVersion of thisAministeredObject.- Returns:
- the storedVersion of this AministeredObject
 
- 
setStoredVersion
- 
isStoredVersionCompatiblepublic final boolean isStoredVersionCompatible()Tests whether the storedVersion of thisAministeredObjectis compatible with the current runtime VERSIONThis methods flags mismatches between this Administered Objectand 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 tolookup()that earlier version of the Administered Object.- Returns:
- the storedVersion of this AministeredObject
 
- 
setReadOnlypublic final void setReadOnly()Sets thisAdministeredObjectto be read only. Once thisAdministeredObjecthas been set to read only it cannot be reset back to read write.
- 
getConfigurationReturns the configuration of thisAdministeredObject.The configuration returned is the one that has been administratively or programmatically set in this AdministeredObjectThis 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.- Returns:
- the configuration of this AdministeredObject.
- See Also:
 
- 
getPropertyGroupsReturns an ordered property groups list.- Returns:
- The String that represents an ordered property groups list. This list uses the ' |' character as the separator.
 
- 
getPropertiesForGroupReturns an ordered property list for a given group.- Parameters:
- group- The group for which the property list is desired.
- Returns:
- The String that represents an ordered property list for a given group. This list uses the '
 |' character as the separator.
 
- 
getLabelForGroupReturns the label for a given group.- Parameters:
- group- The group for which the label is desired.
- Returns:
- The label the given group.
 
- 
getPropertyListValuesReturns an ordered property list for Properties of Type List.- Parameters:
- propname- The name of the configuration property that is of type List.
- Returns:
- The String that represents an ordered property list. This list uses the ' |' character as the separator.
 
- 
getPropertyForListValueReturns the property name for any selection on Properties of Type List.- Parameters:
- listpropname- The name of the configuration property that is of type List.
- listvalue- The value of the configuration property that is of type List.
- Returns:
- The property that is pre set when a property of type List is set to the value listvalue.
 
- 
getPropertyValueForListValueReturns the property values set when a property of type List is set to a particular value.- Parameters:
- 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.
- Returns:
- The value that property propnameis pre set to when the propertylistpropnameof type list is set to the valuelistvalue.
 
- 
getPropertyListOtherNameReturns the property name for the ... selection on Properties of Type List.- Returns:
- The property to be exposed for editing when the ...selection on Properties of Type List is selected.
 
- 
enumeratePropertyNamesReturns an enumeration of the configuration property names of thisAdministeredObject.- Returns:
- The enumeration of configuration property names.
 
- 
setPropertySets a single configuration property in thisAdministeredObject.- Parameters:
- propname- The name of the configuration property to set.
- propval- The value of the configuration property to set.
- Returns:
- The previous value of the configuration property being set.
- Throws:
- 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- AdministeredObjectwhen the readOnly flag has been set.
- jakarta.jms.JMSException
 
- 
getPropertyReturns a single configuration property value given the property name.- Parameters:
- propname- The name of the configuration property.
- Returns:
- The value of the configuration property propname.
- Throws:
- InvalidPropertyException- If an invalid property name is being requested. The Exception string is the name of the invalid property.
- jakarta.jms.JMSException
 
- 
getPropertyTypeReturns the configuration type of a single configuration property name.- Parameters:
- propname- The name of the configuration property.
- Returns:
- The type of the configuration property propname.
- Throws:
- InvalidPropertyException- If an invalid property name is being requested. The Exception string is the name of the invalid property.
- jakarta.jms.JMSException
 
- 
getPropertyLabelReturns the configuration label of a single configuration property name.- Parameters:
- propname- The name of the configuration property.
- Returns:
- The label of the configuration property propname.
- Throws:
- InvalidPropertyException- If an invalid property name is being requested. The Exception string is the name of the invalid property.
- jakarta.jms.JMSException
 
- 
isPropertyHiddenReturns whether a single configuration property name should be hidden or not.- Parameters:
- propname- The name of the configuration property.
- Returns:
- trueIf the configuration property- propnameshould be hidden;- falseif it should not be hidden i.e. it is still supported in this version.
- Throws:
- InvalidPropertyException- If an invalid property name is being requested. The Exception string is the name of the invalid property.
- jakarta.jms.JMSException
 
- 
isPropertyDeprecatedReturns whether a single configuration property name is deprecated or not.- Parameters:
- propname- The name of the configuration property.
- Returns:
- trueIf the configuration property- propnamehas been deprecated;- falseif it has not been deprecated i.e. it is still supported in this version.
- Throws:
- InvalidPropertyException- If an invalid property name is being requested. The Exception string is the name of the invalid property.
- jakarta.jms.JMSException
 
- 
toStringReturns the provider specific name for thisAdministeredObjectalong with a listing of its configuration.
- 
dumpReturns the provider specific name for thisAdministeredObjectalong with a complete listing of its configuration, configuration attribute label keys and configuration attribute types.- Returns:
- A formatted String containing the provider specific name for this AdministeredObjectalong with a listing of its configuration.
 
- 
getVERSIONReturns the Version string used for this MQAdministeredObject.- Returns:
- the Version string
 
- 
getCurrentConfigurationReturns the current (runtime) configuration of thisAdministeredObjectmodified by any System properties.If the readOnly flag of this AdministeredObjectis set, then thisAdministeredObjectis not affected by any System Properties set at runtime.- Returns:
- The current (runtime) configuration of this AdministeredObjectmodified by any System properties.
- See Also:
 
 
-