001: /**
002: * Copyright (C) The MX4J Contributors.
003: * All rights reserved.
004: *
005: * This software is distributed under the terms of the MX4J License version 1.0.
006: * See the terms of the MX4J License in the documentation provided with this software.
007: */package javax.management.relation;
008:
009: import java.util.List;
010: import java.util.Map;
011: import javax.management.InstanceNotFoundException;
012: import javax.management.ObjectName;
013:
014: /**
015: * @version $Revision: 1.6 $
016: */
017: public interface RelationServiceMBean {
018: public void isActive() throws RelationServiceNotRegisteredException;
019:
020: public boolean getPurgeFlag();
021:
022: public void setPurgeFlag(boolean purgeFlag);
023:
024: public void createRelationType(String relationTypeName,
025: RoleInfo[] roleInfos) throws IllegalArgumentException,
026: InvalidRelationTypeException;
027:
028: public void addRelationType(RelationType relationTypeObject)
029: throws IllegalArgumentException,
030: InvalidRelationTypeException;
031:
032: public List getAllRelationTypeNames();
033:
034: public List getRoleInfos(String relationTypeName)
035: throws IllegalArgumentException,
036: RelationTypeNotFoundException;
037:
038: public RoleInfo getRoleInfo(String relationTypeName,
039: String roleInfoName) throws IllegalArgumentException,
040: RelationTypeNotFoundException, RoleInfoNotFoundException;
041:
042: public void removeRelationType(String relationTypeName)
043: throws IllegalArgumentException,
044: RelationServiceNotRegisteredException,
045: RelationTypeNotFoundException;
046:
047: public void createRelation(String relationId,
048: String relationTypeName, RoleList roleList)
049: throws IllegalArgumentException,
050: RelationServiceNotRegisteredException,
051: RoleNotFoundException, InvalidRelationIdException,
052: RelationTypeNotFoundException, InvalidRoleValueException;
053:
054: public void addRelation(ObjectName relationObjectName)
055: throws IllegalArgumentException,
056: RelationServiceNotRegisteredException,
057: NoSuchMethodException, InvalidRelationIdException,
058: InstanceNotFoundException, InvalidRelationServiceException,
059: RelationTypeNotFoundException, RoleNotFoundException,
060: InvalidRoleValueException;
061:
062: public ObjectName isRelationMBean(String relationId)
063: throws IllegalArgumentException, RelationNotFoundException;
064:
065: public String isRelation(ObjectName objectName)
066: throws IllegalArgumentException;
067:
068: public Boolean hasRelation(String relationId)
069: throws IllegalArgumentException;
070:
071: public List getAllRelationIds();
072:
073: public Integer checkRoleReading(String roleName,
074: String relationTypeName) throws IllegalArgumentException,
075: RelationTypeNotFoundException;
076:
077: public Integer checkRoleWriting(Role role, String relationTypeName,
078: Boolean initializeRoleFlag)
079: throws IllegalArgumentException,
080: RelationTypeNotFoundException;
081:
082: public void sendRelationCreationNotification(String relationId)
083: throws IllegalArgumentException, RelationNotFoundException;
084:
085: public void sendRoleUpdateNotification(String relationId,
086: Role newRole, List oldRoleValues)
087: throws IllegalArgumentException, RelationNotFoundException;
088:
089: public void sendRelationRemovalNotification(String relationId,
090: List unregisteredMBeanList)
091: throws IllegalArgumentException, RelationNotFoundException;
092:
093: public void updateRoleMap(String relationId, Role newRole,
094: List oldRoleValues) throws IllegalArgumentException,
095: RelationServiceNotRegisteredException,
096: RelationNotFoundException;
097:
098: public void removeRelation(String relationId)
099: throws IllegalArgumentException,
100: RelationServiceNotRegisteredException,
101: RelationNotFoundException;
102:
103: public void purgeRelations()
104: throws RelationServiceNotRegisteredException;
105:
106: public Map findReferencingRelations(ObjectName mbeanObjectName,
107: String relationTypeName, String roleName)
108: throws IllegalArgumentException;
109:
110: public Map findAssociatedMBeans(ObjectName mbeanObjectName,
111: String relationTypeName, String roleName)
112: throws IllegalArgumentException;
113:
114: public List findRelationsOfType(String relationTypeName)
115: throws IllegalArgumentException,
116: RelationTypeNotFoundException;
117:
118: public List getRole(String relationId, String roleName)
119: throws IllegalArgumentException,
120: RelationServiceNotRegisteredException,
121: RelationNotFoundException, RoleNotFoundException;
122:
123: public RoleResult getRoles(String relationId, String[] roleNames)
124: throws IllegalArgumentException, RelationNotFoundException,
125: RelationServiceNotRegisteredException;
126:
127: public RoleResult getAllRoles(String relationId)
128: throws IllegalArgumentException, RelationNotFoundException,
129: RelationServiceNotRegisteredException;
130:
131: public Integer getRoleCardinality(String relationId, String roleName)
132: throws IllegalArgumentException, RelationNotFoundException,
133: RoleNotFoundException;
134:
135: public void setRole(String relationId, Role role)
136: throws IllegalArgumentException,
137: RelationServiceNotRegisteredException,
138: RelationNotFoundException, RoleNotFoundException,
139: InvalidRoleValueException, RelationTypeNotFoundException;
140:
141: public RoleResult setRoles(String relationId, RoleList roleList)
142: throws RelationServiceNotRegisteredException,
143: IllegalArgumentException, RelationNotFoundException;
144:
145: public Map getReferencedMBeans(String relationId)
146: throws IllegalArgumentException, RelationNotFoundException;
147:
148: public String getRelationTypeName(String relationId)
149: throws IllegalArgumentException, RelationNotFoundException;
150: }
|