IBM WebSphereTM eXtreme Scale, Release 8.6
API Specification

com.ibm.websphere.objectgrid.config
Interface ConfigProperty

All Superinterfaces:
Serializable

public interface ConfigProperty
extends Serializable

ConfigProperty can be used to attach properties to a Plugin. A ConfigProperty has the following attributes:

This ConfigProperty can be used to set the properties of a plugin. The name of the property should follow JaveBean convention. That is, for every property, there should be a corresponding set method in the plugin class.

Users can use com.ibm.websphere.objectgrid.config.ObjectGridConfigFactory.createConfigProperty(ConfigPropertyType, String, String) to create a ConfigProperty object.

ConfigProperty evictorNameProp = ObjectGridConfigFactory.createConfigProperty(ConfigProperty.STRING_JAVA_LANG, "evictorName", "evictor1"); This creates a property "evictorName" with value "evictor1", and the type is java.lang.String. Use the com.ibm.websphere.objectgrid.config.Plugin#addConfigProperty(ConfigProperty) method to attach a ConfigProperty to a Plugin. When the Plugin is created, each ConfigProperty will have its corresponding set method called.

Continuing with the example above, attach the ConfigProperty to an Evictor Plugin. evictorPlugin.addConfigProperty(evictorNameProp);

When this Evictor Plugin is created, the setEvictorName(String) method will be called with the value "evictor1".

Since:
WAS XD 6.0.1.2, XC10

Method Summary
 ConfigPropertyType getConfigPropertyType()
          Get the ConfigPropertyType of this object.
 String getName()
          Get the name of this object.
 String getValue()
          Get the value that is assigned to this ConfigProperty.
 void setConfigPropertyType(ConfigPropertyType configPropType)
          Set the ConfigPropertyType for this object.
 void setName(String name)
          Set the name of this object.
 void setValue(String value)
          Set the value of this ConfigProperty.
 

Method Detail

setConfigPropertyType

void setConfigPropertyType(ConfigPropertyType configPropType)
Set the ConfigPropertyType for this object. The Java primitives, their java.lang counterparts, and java.lang.String are the supported ConfigPropertyTypes.

Parameters:
configPropType -
See Also:
ConfigPropertyType.INTEGER_JAVA_LANG, ConfigPropertyType.INT_PRIM, ConfigPropertyType.BOOLEAN_JAVA_LANG, ConfigPropertyType.BOOLEAN_PRIM, ConfigPropertyType.CHARACTER_JAVA_LANG, ConfigPropertyType.CHAR_PRIM, ConfigPropertyType.BYTE_JAVA_LANG, ConfigPropertyType.BYTE_PRIM, ConfigPropertyType.SHORT_JAVA_LANG, ConfigPropertyType.SHORT_PRIM, ConfigPropertyType.LONG_JAVA_LANG, ConfigPropertyType.LONG_PRIM, ConfigPropertyType.FLOAT_JAVA_LANG, ConfigPropertyType.FLOAT_PRIM, ConfigPropertyType.DOUBLE_JAVA_LANG, ConfigPropertyType.DOUBLE_PRIM, ConfigPropertyType.STRING_JAVA_LANG

getConfigPropertyType

ConfigPropertyType getConfigPropertyType()
Get the ConfigPropertyType of this object.

Returns:
the ConfigPropertyType for this object

setValue

void setValue(String value)
Set the value of this ConfigProperty. This String value will be converted to the proper type, based on ConfigPropertyType assigned to this ConfigProperty

Parameters:
value - - will be converted to type and passed to the setter on the plugin

getValue

String getValue()
Get the value that is assigned to this ConfigProperty. This is the value that will be passed to the set method on the plugin.

Returns:
Returns the value.

setName

void setName(String name)
Set the name of this object. The Plugin that this ConfigProperty is attached to should have a setter that corresponds to this name. For example, if "size" is passed in as the name, then the Plugin must have a "setSize" method.

Parameters:
name - - name of the property

getName

String getName()
Get the name of this object. The name must have a corresponding set method on the Plugin.

Returns:
Returns the name.

IBM WebSphereTM eXtreme Scale, Release 8.6
API Specification

© Copyright International Business Machines Corp 2005,2012. All rights reserved.