Resource and ChangeableResource classes

The com.ibm.as400.resource.Resource and com.ibm.as400.resource.ChangeableResource abstract classes represent an iSeries resource.

Resource

Resource is an abstract class that provides generic access to the attributes of any resource. Every attribute is identified using an attribute ID, and any given subclass of Resource will normally document the attribute IDs that it supports.

Resource provides only read access to the attribute values.

IBM Toolbox for Java provides the following resource objects:

ChangeableResource

The ChangeableResource abstract class, a subclass of Resource, adds the ability to change attribute values of an iSeries resource. Attribute changes are cached internally until they are committed or canceled. This allows you to change many attribute values at once.

Note: The NetServer classes in the access package are also concrete subclasses of Resource and ChangeableResource.

Examples

The following examples show how you can directly use concrete subclasses of Resource and ChangeableResource, and also how generic code can work with any Resource or ChangeableResource subclass.