Begin change

Resource and ChangeableResource classes

The com.ibm.as400.resource.Resource and com.ibm.as400.resource.ChangeableResource abstract classes represent an AS/400 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.

AS/400 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 AS/400 resource. Attribute changes are cached internally until they are committed or canceled. This allows you to change many attribute values at once.

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.