RelationService
RelationService
관계 타입과 관계의 생성·삭제, 일관성 처리, 쿼리 메커니즘 제공을 담당하는 클래스예요. NotificationBroadcasterSupport를 상속해(관계가 제거될 때 알림 발행) 알림 브로드캐스터를 구현하고, 역할에 참조된 MBean의 등록 해제 알림을 받기 위해 NotificationListener를 구현하며, ObjectName·MBean 서버를 얻기 위해 MBeanRegistration도 구현해요.
본문
관계 타입과 관계의 생성·삭제, 일관성 처리, 쿼리 메커니즘 제공을 담당하는 클래스예요. NotificationBroadcasterSupport를 상속해(관계가 제거될 때 알림 발행) 알림 브로드캐스터를 구현하고, 역할에 참조된 MBean의 등록 해제 알림을 받기 위해 NotificationListener를 구현하며, ObjectName·MBean 서버를 얻기 위해 MBeanRegistration도 구현해요.
public class RelationService extends NotificationBroadcasterSupport implements RelationServiceMBean, MBeanRegistration, NotificationListener
public void isActive() throws RelationServiceNotRegisteredException
public boolean getPurgeFlag()
public void setPurgeFlag(boolean purgeFlag)
public void createRelationType(String relationTypeName, RoleInfo[] roleInfoArray) throws IllegalArgumentException, InvalidRelationTypeException
public void addRelationType(RelationType relationTypeObj) throws IllegalArgumentException, InvalidRelationTypeException
public List<String> getAllRelationTypeNames()
public List<RoleInfo> getRoleInfos(String relationTypeName) throws IllegalArgumentException, RelationTypeNotFoundException
public RoleInfo getRoleInfo(String relationTypeName, String roleInfoName) throws IllegalArgumentException, RelationTypeNotFoundException, RoleInfoNotFoundException
public void removeRelationType(String relationTypeName) throws RelationServiceNotRegisteredException, IllegalArgumentException, RelationTypeNotFoundException
public void createRelation(String relationId, String relationTypeName, RoleList roleList) throws RelationServiceNotRegisteredException, IllegalArgumentException, RoleNotFoundException, InvalidRelationIdException, RelationTypeNotFoundException, InvalidRoleValueException
public void addRelation(ObjectName relationObjectName) throws IllegalArgumentException, RelationServiceNotRegisteredException, NoSuchMethodException, InvalidRelationIdException, InstanceNotFoundException, InvalidRelationServiceException, RelationTypeNotFoundException, RoleNotFoundException, InvalidRoleValueException
public ObjectName isRelationMBean(String relationId) throws IllegalArgumentException, RelationNotFoundException
public String isRelation(ObjectName objectName) throws IllegalArgumentException
public Boolean hasRelation(String relationId) throws IllegalArgumentException
public List<String> getAllRelationIds()
public Integer checkRoleReading(String roleName, String relationTypeName) throws IllegalArgumentException, RelationTypeNotFoundException
public Integer checkRoleWriting(Role role, String relationTypeName, Boolean initFlag) throws IllegalArgumentException, RelationTypeNotFoundException
public void removeRelation(String relationId) throws RelationServiceNotRegisteredException, IllegalArgumentException, RelationNotFoundException
public void purgeRelations() throws RelationServiceNotRegisteredException
public Map<String,List<String>> findReferencingRelations(ObjectName mbeanName, String relationTypeName, String roleName) throws IllegalArgumentException
public Map<ObjectName,List<String>> findAssociatedMBeans(ObjectName mbeanName, String relationTypeName, String roleName) throws IllegalArgumentException
public List<String> findRelationsOfType(String relationTypeName) throws IllegalArgumentException, RelationTypeNotFoundException
public List<ObjectName> getRole(String relationId, String roleName) throws RelationServiceNotRegisteredException, IllegalArgumentException, RelationNotFoundException, RoleNotFoundException
public RoleResult getRoles(String relationId, String[] roleNameArray) throws RelationServiceNotRegisteredException, IllegalArgumentException, RelationNotFoundException
public RoleResult getAllRoles(String relationId) throws IllegalArgumentException, RelationNotFoundException, RelationServiceNotRegisteredException
public Integer getRoleCardinality(String relationId, String roleName) throws IllegalArgumentException, RelationNotFoundException, RoleNotFoundException
public void setRole(String relationId, Role role) throws RelationServiceNotRegisteredException, IllegalArgumentException, RelationNotFoundException, RoleNotFoundException, InvalidRoleValueException
public RoleResult setRoles(String relationId, RoleList roleList) throws RelationServiceNotRegisteredException, IllegalArgumentException, RelationNotFoundException
public Map<ObjectName,List<String>> getReferencedMBeans(String relationId) throws IllegalArgumentException, RelationNotFoundException
public String getRelationTypeName(String relationId) throws IllegalArgumentException, RelationNotFoundException
public void handleNotification(Notification notif, Object handback)
public MBeanNotificationInfo[] getNotificationInfo()