FileDocCategorySizeDatePackage
ConsumerSupplierRelation.javaAPI DocExample2350Thu May 23 09:32:50 BST 2002 sample.relation

ConsumerSupplierRelation

public class ConsumerSupplierRelation extends RelationSupport implements ConsumerSupplierRelationMBean
This class demonstrates how to write an external relation. An external relation is a handy way to monitor a relation, since it must be registered with the MBean server. An external relation also allows more control over the implementation of the relation. The class RelationSupport contains the guts of the code to maintain the consistency of the relation. Additional management attributes are contained on the ConsumerSupplierRelationMBean interface as needed.

Fields Summary
public static final String
NAME
public static final String
OBJECT_NAME
private String
_relationTypeName
private String
_relationServiceObjName
private List
_roleList
Constructors Summary
public ConsumerSupplierRelation(ObjectName relationServiceObjName, MBeanServer mbeanServer, String relationTypeName, RoleList roleList)

        super(NAME, relationServiceObjName, mbeanServer, relationTypeName, roleList);
        init(relationServiceObjName, relationTypeName, roleList);
    
public ConsumerSupplierRelation(ObjectName relationServiceObjName, String relationTypeName, RoleList roleList)

        super(NAME, relationServiceObjName, relationTypeName, roleList);
        init(relationServiceObjName, relationTypeName, roleList);
    
Methods Summary
public java.lang.StringgetRelationId()

        return  NAME;
    
public java.lang.StringgetRelationServiceObjName()

        return  _relationServiceObjName;
    
public java.lang.StringgetRelationTypeName()


        
        return  _relationTypeName;
    
private voidinit(javax.management.ObjectName relationServiceObjName, java.lang.String relationTypeName, javax.management.relation.RoleList roleList)

        _relationTypeName = relationTypeName;
        _relationServiceObjName = relationServiceObjName.toString();
        _roleList = new ArrayList(roleList.size());
        _roleList.addAll(roleList);
    
public java.util.ListretrieveRoleList()

        return  _roleList;