| | |
| | | */ |
| | | package org.opends.server.config; |
| | | |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | |
| | | import java.lang.reflect.Array; |
| | | import java.util.ArrayList; |
| | | import java.util.LinkedHashSet; |
| | |
| | | import javax.management.MBeanAttributeInfo; |
| | | import javax.management.MBeanParameterInfo; |
| | | |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.forgerock.opendj.ldap.ByteString; |
| | | import org.forgerock.opendj.ldap.schema.Syntax; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.types.*; |
| | | import org.opends.server.types.Attribute; |
| | | import org.opends.server.util.CollectionUtils; |
| | | import org.forgerock.opendj.ldap.ByteString; |
| | | import static org.opends.server.config.ConfigConstants.*; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | |
| | | import static org.opends.messages.ConfigMessages.*; |
| | | import static org.opends.server.config.ConfigConstants.*; |
| | | |
| | | /** |
| | | * This class defines an integer configuration attribute, which can hold zero or |
| | |
| | | |
| | | /** The set of active values for this attribute. */ |
| | | private List<Long> activeValues; |
| | | |
| | | /** The set of pending values for this attribute. */ |
| | | private List<Long> pendingValues; |
| | | |
| | | /** Indicates whether this attribute will impose a lower bound for its values. */ |
| | | private boolean hasLowerBound; |
| | | |
| | | /** Indicates whether this attribute will impose an upper bound for its values. */ |
| | | private boolean hasUpperBound; |
| | | |
| | | /** The lower bound for values of this attribute. */ |
| | | private long lowerBound; |
| | | |
| | | /** The upper bound for values of this attribute. */ |
| | | private long upperBound; |
| | | |
| | | |
| | | |
| | | /** |
| | | * Creates a new integer configuration attribute stub with the provided |
| | | * information but no values. The values will be set using the |
| | |
| | | { |
| | | super(name, description, isRequired, isMultiValued, requiresAdminAction); |
| | | |
| | | |
| | | this.hasLowerBound = hasLowerBound; |
| | | this.lowerBound = lowerBound; |
| | | this.hasUpperBound = hasUpperBound; |
| | |
| | | pendingValues = activeValues; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Creates a new integer configuration attribute with the provided |
| | | * information. No validation will be performed on the provided value. |
| | |
| | | long value) |
| | | { |
| | | super(name, description, isRequired, isMultiValued, requiresAdminAction, |
| | | getValueSet(value)); |
| | | |
| | | getLongValueSet(value)); |
| | | |
| | | this.hasLowerBound = hasLowerBound; |
| | | this.lowerBound = lowerBound; |
| | |
| | | pendingValues = activeValues; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Creates a new integer configuration attribute with the provided |
| | | * information. No validation will be performed on the provided values. |
| | |
| | | List<Long> values) |
| | | { |
| | | super(name, description, isRequired, isMultiValued, requiresAdminAction, |
| | | getValueSet(values)); |
| | | |
| | | getLongValueSet(values)); |
| | | |
| | | this.hasLowerBound = hasLowerBound; |
| | | this.lowerBound = lowerBound; |
| | |
| | | pendingValues = activeValues; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Creates a new integer configuration attribute with the provided |
| | | * information. No validation will be performed on the provided values. |
| | |
| | | List<Long> pendingValues) |
| | | { |
| | | super(name, description, isRequired, isMultiValued, requiresAdminAction, |
| | | getValueSet(activeValues), (pendingValues != null), |
| | | getValueSet(pendingValues)); |
| | | |
| | | getLongValueSet(activeValues), (pendingValues != null), |
| | | getLongValueSet(pendingValues)); |
| | | |
| | | this.hasLowerBound = hasLowerBound; |
| | | this.lowerBound = lowerBound; |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the name of the data type for this configuration attribute. This |
| | | * is for informational purposes (e.g., inclusion in method signatures and |
| | |
| | | return "Integer"; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the attribute syntax for this configuration attribute. |
| | | * |
| | |
| | | return DirectoryServer.getDefaultIntegerSyntax(); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the active value for this configuration attribute as a long. |
| | | * This is only valid for single-valued attributes that have a value. |
| | |
| | | public long activeValue() |
| | | throws ConfigException |
| | | { |
| | | if ((activeValues == null) || activeValues.isEmpty()) |
| | | if (activeValues == null || activeValues.isEmpty()) |
| | | { |
| | | LocalizableMessage message = ERR_CONFIG_ATTR_NO_INT_VALUE.get(getName()); |
| | | throw new ConfigException(message); |
| | |
| | | return activeValues.get(0); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the active value for this configuration attribute as an integer. |
| | | * This is only valid for single-valued attributes that have a value within |
| | |
| | | public int activeIntValue() |
| | | throws ConfigException |
| | | { |
| | | if ((activeValues == null) || activeValues.isEmpty()) |
| | | if (activeValues == null || activeValues.isEmpty()) |
| | | { |
| | | LocalizableMessage message = ERR_CONFIG_ATTR_NO_INT_VALUE.get(getName()); |
| | | throw new ConfigException(message); |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the set of active values for this configuration attribute. |
| | | * |
| | |
| | | return activeValues; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the pending value for this configuration attribute as a long. |
| | | * This is only valid for single-valued attributes that have a value. If this |
| | |
| | | return activeValue(); |
| | | } |
| | | |
| | | if ((pendingValues == null) || pendingValues.isEmpty()) |
| | | if (pendingValues == null || pendingValues.isEmpty()) |
| | | { |
| | | LocalizableMessage message = ERR_CONFIG_ATTR_NO_INT_VALUE.get(getName()); |
| | | throw new ConfigException(message); |
| | |
| | | return pendingValues.get(0); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the pending value for this configuration attribute as an integer. |
| | | * This is only valid for single-valued attributes that have a value within |
| | |
| | | return activeIntValue(); |
| | | } |
| | | |
| | | if ((pendingValues == null) || pendingValues.isEmpty()) |
| | | if (pendingValues == null || pendingValues.isEmpty()) |
| | | { |
| | | LocalizableMessage message = ERR_CONFIG_ATTR_NO_INT_VALUE.get(getName()); |
| | | throw new ConfigException(message); |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the set of pending values for this configuration attribute. If |
| | | * there are no pending values, then the set of active values will be |
| | |
| | | return pendingValues; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Indicates whether a lower bound will be enforced for the value of this |
| | | * configuration attribute. |
| | |
| | | return hasLowerBound; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the lower bound for the value of this configuration attribute. |
| | | * |
| | |
| | | return lowerBound; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Indicates whether an upper bound will be enforced for the calculated value |
| | | * of this configuration attribute. |
| | |
| | | return hasUpperBound; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the upper bound for the calculated value of this configuration |
| | | * attribute. |
| | |
| | | return upperBound; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Sets the value for this integer configuration attribute. |
| | | * |
| | |
| | | public void setValue(long value) |
| | | throws ConfigException |
| | | { |
| | | if (hasLowerBound && (value < lowerBound)) |
| | | if (hasLowerBound && value < lowerBound) |
| | | { |
| | | LocalizableMessage message = ERR_CONFIG_ATTR_INT_BELOW_LOWER_BOUND.get( |
| | | getName(), value, lowerBound); |
| | | throw new ConfigException(message); |
| | | } |
| | | |
| | | if (hasUpperBound && (value > upperBound)) |
| | | if (hasUpperBound && value > upperBound) |
| | | { |
| | | LocalizableMessage message = ERR_CONFIG_ATTR_INT_ABOVE_UPPER_BOUND.get( |
| | | getName(), value, upperBound); |
| | |
| | | if (requiresAdminAction()) |
| | | { |
| | | pendingValues = CollectionUtils.newArrayList(value); |
| | | setPendingValues(getValueSet(value)); |
| | | setPendingValues(getLongValueSet(value)); |
| | | } |
| | | else |
| | | { |
| | | activeValues.clear(); |
| | | activeValues.add(value); |
| | | pendingValues = activeValues; |
| | | setActiveValues(getValueSet(value)); |
| | | setActiveValues(getLongValueSet(value)); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Sets the values for this integer configuration attribute. |
| | | * |
| | |
| | | throws ConfigException |
| | | { |
| | | // First check if the set is empty and if that is allowed. |
| | | if ((values == null) || (values.isEmpty())) |
| | | if (values == null || values.isEmpty()) |
| | | { |
| | | if (isRequired()) |
| | | { |
| | | LocalizableMessage message = ERR_CONFIG_ATTR_IS_REQUIRED.get(getName()); |
| | | throw new ConfigException(message); |
| | | throw new ConfigException(ERR_CONFIG_ATTR_IS_REQUIRED.get(getName())); |
| | | } |
| | | |
| | | if (requiresAdminAction()) |
| | | { |
| | | setPendingValues(new LinkedHashSet<ByteString>(0)); |
| | | pendingValues = new ArrayList<>(); |
| | | } |
| | | else |
| | | { |
| | | if (requiresAdminAction()) |
| | | { |
| | | setPendingValues(new LinkedHashSet<ByteString>(0)); |
| | | pendingValues = new ArrayList<>(); |
| | | } |
| | | else |
| | | { |
| | | setActiveValues(new LinkedHashSet<ByteString>(0)); |
| | | activeValues.clear(); |
| | | } |
| | | setActiveValues(new LinkedHashSet<ByteString>(0)); |
| | | activeValues.clear(); |
| | | } |
| | | } |
| | | |
| | | |
| | | // Next check if the set contains multiple values and if that is allowed. |
| | | int numValues = values.size(); |
| | | if ((! isMultiValued()) && (numValues > 1)) |
| | | if (!isMultiValued() && numValues > 1) |
| | | { |
| | | LocalizableMessage message = |
| | | ERR_CONFIG_ATTR_SET_VALUES_IS_SINGLE_VALUED.get(getName()); |
| | | throw new ConfigException(message); |
| | | } |
| | | |
| | | |
| | | // Iterate through all the provided values, make sure that they are |
| | | // acceptable, and build the value set. |
| | | LinkedHashSet<ByteString> valueSet = new LinkedHashSet<>(numValues); |
| | | for (long value : values) |
| | | { |
| | | if (hasLowerBound && (value < lowerBound)) |
| | | if (hasLowerBound && value < lowerBound) |
| | | { |
| | | LocalizableMessage message = ERR_CONFIG_ATTR_INT_BELOW_LOWER_BOUND.get( |
| | | getName(), value, lowerBound); |
| | | throw new ConfigException(message); |
| | | } |
| | | |
| | | if (hasUpperBound && (value > upperBound)) |
| | | if (hasUpperBound && value > upperBound) |
| | | { |
| | | LocalizableMessage message = ERR_CONFIG_ATTR_INT_ABOVE_UPPER_BOUND.get( |
| | | getName(), value, upperBound); |
| | |
| | | valueSet.add(attrValue); |
| | | } |
| | | |
| | | |
| | | // Apply this value set to the new active or pending value set. |
| | | if (requiresAdminAction()) |
| | | { |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Creates the appropriate value set with the provided value. |
| | | * |
| | |
| | | * |
| | | * @return The constructed value set. |
| | | */ |
| | | private static LinkedHashSet<ByteString> getValueSet(long value) |
| | | private static LinkedHashSet<ByteString> getLongValueSet(long value) |
| | | { |
| | | LinkedHashSet<ByteString> valueSet = new LinkedHashSet<>(1); |
| | | valueSet.add(ByteString.valueOf(String.valueOf(value))); |
| | | return valueSet; |
| | | return getValueSet(String.valueOf(value)); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Creates the appropriate value set with the provided values. |
| | | * |
| | |
| | | * |
| | | * @return The constructed value set. |
| | | */ |
| | | private static LinkedHashSet<ByteString> getValueSet(List<Long> values) |
| | | private static LinkedHashSet<ByteString> getLongValueSet(List<Long> values) |
| | | { |
| | | if (values == null) |
| | | { |
| | |
| | | return valueSet; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Applies the set of pending values, making them the active values for this |
| | | * configuration attribute. This will not take any action if there are no |
| | |
| | | activeValues = pendingValues; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Indicates whether the provided value is acceptable for use in this |
| | | * attribute. If it is not acceptable, then the reason should be written into |
| | |
| | | return false; |
| | | } |
| | | |
| | | |
| | | // Perform any necessary bounds checking. |
| | | if (hasLowerBound && (longValue < lowerBound)) |
| | | if (hasLowerBound && longValue < lowerBound) |
| | | { |
| | | rejectReason.append(ERR_CONFIG_ATTR_INT_BELOW_LOWER_BOUND.get( |
| | | getName(), longValue, lowerBound)); |
| | | return false; |
| | | } |
| | | |
| | | if (hasUpperBound && (longValue > upperBound)) |
| | | if (hasUpperBound && longValue > upperBound) |
| | | { |
| | | rejectReason.append(ERR_CONFIG_ATTR_INT_ABOVE_UPPER_BOUND.get( |
| | | getName(), longValue, upperBound)); |
| | | return false; |
| | | } |
| | | |
| | | |
| | | // If we've gotten here, then the value must be acceptable. |
| | | return true; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Converts the provided set of strings to a corresponding set of attribute |
| | | * values. |
| | |
| | | stringsToValues(List<String> valueStrings, boolean allowFailures) |
| | | throws ConfigException |
| | | { |
| | | if ((valueStrings == null) || valueStrings.isEmpty()) |
| | | if (valueStrings == null || valueStrings.isEmpty()) |
| | | { |
| | | if (isRequired()) |
| | | { |
| | | LocalizableMessage message = ERR_CONFIG_ATTR_IS_REQUIRED.get(getName()); |
| | | throw new ConfigException(message); |
| | | throw new ConfigException(ERR_CONFIG_ATTR_IS_REQUIRED.get(getName())); |
| | | } |
| | | else |
| | | { |
| | | return new LinkedHashSet<>(); |
| | | } |
| | | return new LinkedHashSet<>(); |
| | | } |
| | | |
| | | |
| | | int numValues = valueStrings.size(); |
| | | if ((! isMultiValued()) && (numValues > 1)) |
| | | if (!isMultiValued() && numValues > 1) |
| | | { |
| | | LocalizableMessage message = |
| | | ERR_CONFIG_ATTR_SET_VALUES_IS_SINGLE_VALUED.get(getName()); |
| | | throw new ConfigException(message); |
| | | throw new ConfigException(ERR_CONFIG_ATTR_SET_VALUES_IS_SINGLE_VALUED.get(getName())); |
| | | } |
| | | |
| | | |
| | | LinkedHashSet<ByteString> valueSet = new LinkedHashSet<>(numValues); |
| | | for (String valueString : valueStrings) |
| | | { |
| | |
| | | { |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = ERR_CONFIG_ATTR_INT_COULD_NOT_PARSE.get( |
| | | valueString, getName(), e); |
| | | if (allowFailures) |
| | | { |
| | | logger.error(message); |
| | | continue; |
| | | } |
| | | else |
| | | { |
| | | throw new ConfigException(message); |
| | | } |
| | | reportError(allowFailures, ERR_CONFIG_ATTR_INT_COULD_NOT_PARSE.get(valueString, getName(), e)); |
| | | continue; |
| | | } |
| | | |
| | | |
| | | if (hasLowerBound && (longValue < lowerBound)) |
| | | if (hasLowerBound && longValue < lowerBound) |
| | | { |
| | | LocalizableMessage message = ERR_CONFIG_ATTR_INT_BELOW_LOWER_BOUND.get( |
| | | getName(), longValue, lowerBound); |
| | | if (allowFailures) |
| | | { |
| | | logger.error(message); |
| | | continue; |
| | | } |
| | | else |
| | | { |
| | | throw new ConfigException(message); |
| | | } |
| | | reportError(allowFailures, ERR_CONFIG_ATTR_INT_BELOW_LOWER_BOUND.get(getName(), longValue, lowerBound)); |
| | | continue; |
| | | } |
| | | |
| | | |
| | | if (hasUpperBound && (longValue > upperBound)) |
| | | if (hasUpperBound && longValue > upperBound) |
| | | { |
| | | LocalizableMessage message = ERR_CONFIG_ATTR_INT_ABOVE_UPPER_BOUND.get( |
| | | getName(), longValue, upperBound); |
| | | |
| | | if (allowFailures) |
| | | { |
| | | logger.error(message); |
| | | continue; |
| | | } |
| | | else |
| | | { |
| | | throw new ConfigException(message); |
| | | } |
| | | reportError(allowFailures, ERR_CONFIG_ATTR_INT_ABOVE_UPPER_BOUND.get(getName(), longValue, upperBound)); |
| | | continue; |
| | | } |
| | | |
| | | valueSet.add(ByteString.valueOf(valueString)); |
| | | } |
| | | |
| | | |
| | | // If this method was configured to continue on error, then it is possible |
| | | // that we ended up with an empty list. Check to see if this is a required |
| | | // attribute and if so deal with it accordingly. |
| | | if ((isRequired()) && valueSet.isEmpty()) |
| | | if (isRequired() && valueSet.isEmpty()) |
| | | { |
| | | LocalizableMessage message = ERR_CONFIG_ATTR_IS_REQUIRED.get(getName()); |
| | | throw new ConfigException(message); |
| | | throw new ConfigException(ERR_CONFIG_ATTR_IS_REQUIRED.get(getName())); |
| | | } |
| | | |
| | | |
| | | return valueSet; |
| | | } |
| | | |
| | | |
| | | private void reportError(boolean allowFailures, LocalizableMessage message) throws ConfigException |
| | | { |
| | | if (!allowFailures) |
| | | { |
| | | throw new ConfigException(message); |
| | | } |
| | | logger.error(message); |
| | | } |
| | | |
| | | /** |
| | | * Converts the set of active values for this configuration attribute into a |
| | |
| | | return toListOfString(activeValues); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Converts the set of pending values for this configuration attribute into a |
| | | * set of strings that may be stored in the configuration or represented over |
| | |
| | | { |
| | | return toListOfString(pendingValues); |
| | | } |
| | | else |
| | | { |
| | | return null; |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * @param pendingValues2 |
| | | * @return |
| | | */ |
| | | private List<String> toListOfString(List<Long> pendingValues2) |
| | | private List<String> toListOfString(List<Long> values) |
| | | { |
| | | ArrayList<String> valueStrings = new ArrayList<>(pendingValues2.size()); |
| | | for (long l : pendingValues2) |
| | | ArrayList<String> results = new ArrayList<>(values.size()); |
| | | for (long l : values) |
| | | { |
| | | valueStrings.add(String.valueOf(l)); |
| | | results.add(String.valueOf(l)); |
| | | } |
| | | return valueStrings; |
| | | return results; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves a new configuration attribute of this type that will contain the |
| | | * values from the provided attribute. |
| | |
| | | throw new ConfigException(message); |
| | | } |
| | | |
| | | |
| | | if (a.isEmpty()) |
| | | { |
| | | if (isRequired()) |
| | |
| | | else |
| | | { |
| | | int numValues = a.size(); |
| | | if ((numValues > 1) && (! isMultiValued())) |
| | | if (numValues > 1 && !isMultiValued()) |
| | | { |
| | | // This is illegal -- the attribute is single-valued. |
| | | LocalizableMessage message = |
| | |
| | | throw new ConfigException(message, e); |
| | | } |
| | | |
| | | |
| | | // Check the bounds set for this attribute. |
| | | if (hasLowerBound && (longValue < lowerBound)) |
| | | if (hasLowerBound && longValue < lowerBound) |
| | | { |
| | | LocalizableMessage message = ERR_CONFIG_ATTR_INT_BELOW_LOWER_BOUND.get( |
| | | a.getName(), longValue, lowerBound); |
| | | throw new ConfigException(message); |
| | | } |
| | | |
| | | if (hasUpperBound && (longValue > upperBound)) |
| | | if (hasUpperBound && longValue > upperBound) |
| | | { |
| | | LocalizableMessage message = ERR_CONFIG_ATTR_INT_ABOVE_UPPER_BOUND.get( |
| | | a.getName(), longValue, upperBound); |
| | |
| | | throw new ConfigException(message); |
| | | } |
| | | |
| | | |
| | | if (a.isEmpty()) |
| | | { |
| | | if (isRequired()) |
| | |
| | | else |
| | | { |
| | | int numValues = a.size(); |
| | | if ((numValues > 1) && (! isMultiValued())) |
| | | if (numValues > 1 && !isMultiValued()) |
| | | { |
| | | // This is illegal -- the attribute is single-valued. |
| | | LocalizableMessage message = |
| | |
| | | throw new ConfigException(message, e); |
| | | } |
| | | |
| | | |
| | | // Check the bounds set for this attribute. |
| | | if (hasLowerBound && (longValue < lowerBound)) |
| | | if (hasLowerBound && longValue < lowerBound) |
| | | { |
| | | LocalizableMessage message = ERR_CONFIG_ATTR_INT_BELOW_LOWER_BOUND.get( |
| | | a.getName(), longValue, lowerBound); |
| | | throw new ConfigException(message); |
| | | } |
| | | |
| | | if (hasUpperBound && (longValue > upperBound)) |
| | | if (hasUpperBound && longValue > upperBound) |
| | | { |
| | | LocalizableMessage message = ERR_CONFIG_ATTR_INT_ABOVE_UPPER_BOUND.get( |
| | | a.getName(), longValue, upperBound); |
| | |
| | | pendingValues = activeValues; |
| | | } |
| | | |
| | | |
| | | return new IntegerConfigAttribute(getName(), getDescription(), isRequired(), |
| | | isMultiValued(), requiresAdminAction(), |
| | | hasLowerBound, lowerBound, hasUpperBound, |
| | | upperBound, activeValues, pendingValues); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves a JMX attribute containing the value set for this |
| | | * configuration attribute (active or pending). |
| | |
| | | |
| | | return new javax.management.Attribute(name, values); |
| | | } |
| | | else if (requestedValues.isEmpty()) |
| | | { |
| | | return null; |
| | | } |
| | | else |
| | | { |
| | | if (requestedValues.isEmpty()) |
| | | { |
| | | return null; |
| | | } |
| | | else |
| | | { |
| | | return new javax.management.Attribute(name, requestedValues.get(0)); |
| | | } |
| | | return new javax.management.Attribute(name, requestedValues.get(0)); |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Retrieves a JMX attribute containing the active value set for this |
| | | * configuration attribute. |
| | |
| | | * any active values. |
| | | */ |
| | | public javax.management.Attribute toJMXAttribute() |
| | | { |
| | | return _toJMXAttribute(false); |
| | | } |
| | | { |
| | | return _toJMXAttribute(false); |
| | | } |
| | | |
| | | /** |
| | | * Retrieves a JMX attribute containing the pending value set for this |
| | |
| | | return _toJMXAttribute(true); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Adds information about this configuration attribute to the provided JMX |
| | | * attribute list. If this configuration attribute requires administrative |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | if (requiresAdminAction() && (pendingValues != null) && |
| | | (pendingValues != activeValues)) |
| | | if (requiresAdminAction() |
| | | && pendingValues != null |
| | | && pendingValues != activeValues) |
| | | { |
| | | String name = getName() + ";" + OPTION_PENDING_VALUES; |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Adds information about this configuration attribute to the provided list in |
| | | * the form of a JMX <CODE>MBeanAttributeInfo</CODE> object. If this |
| | |
| | | true, true, false)); |
| | | } |
| | | |
| | | |
| | | if (requiresAdminAction()) |
| | | { |
| | | String name = getName() + ";" + OPTION_PENDING_VALUES; |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves a JMX <CODE>MBeanParameterInfo</CODE> object that describes this |
| | | * configuration attribute. |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Attempts to set the value of this configuration attribute based on the |
| | | * information in the provided JMX attribute. |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Creates a duplicate of this configuration attribute. |
| | | * |
| | |
| | | upperBound, activeValues, pendingValues); |
| | | } |
| | | } |
| | | |