|
JavaTM Platform Standard Ed. 6 |
|||||||||
앞의 클래스 다음의 클래스 | 프레임 있어 프레임 없음 | |||||||||
개요: 상자 | 필드 | 생성자 | 메소드 | 상세: 필드 | 생성자 | 메소드 |
java.lang.Objectjavax.management.NotificationBroadcasterSupport
javax.management.relation.RelationService
public class RelationService
관계 서비스에는, 관계형과 관계의 작성 및 삭제, 무결성의 처리, 및 쿼리기구의 제공의 기능이 있습니다.
관계 서비스는, 관계의 삭제시에 통지를 송신하기 위해(때문에), NotificationBroadcasterSupport 를 확장하는 것에 의해 NotificationBroadcaster 를 구현합니다.
또, 관계 롤내의 참조 대상의 MBean 및 관계 MBean 의 등록 해제에 관한 통지를 수신할 수 있도록(듯이) 하기 위한(해), NotificationListener 인터페이스를 구현합니다.
게다가 ObjectName 와 MBean Server 를 취득할 수 있도록(듯이), MBeanRegistration 인터페이스를 구현합니다.
생성자 의 개요 | |
---|---|
RelationService (boolean immediatePurgeFlag)
생성자 입니다. |
메소드의 개요 | |
---|---|
void |
addRelation (ObjectName relationObjectName)
사용자에 의해 작성되어 MBean Server 에 등록되는 MBean 를, 관계로서 관계 서비스에 추가합니다. |
void |
addRelationType (RelationType relationTypeObj)
지정된 객체를 관계형으로서 추가합니다. |
Integer |
checkRoleReading (String roleName,
String relationTypeName)
지정된 형태의 관계로, 지정된 Role 의 읽기가 가능한가 어떤가를 체크합니다. |
Integer |
checkRoleWriting (Role role,
String relationTypeName,
Boolean initFlag)
지정된 형태의 관계로, 지정된 Role 의 설정이 가능한가 어떤가를 체크합니다. |
void |
createRelation (String relationId,
String relationTypeName,
RoleList roleList)
지정된 관계형의 단순한 관계 (RelationSupport 객체)를 작성해, 이것을 관계 서비스에 추가합니다. |
void |
createRelationType (String relationTypeName,
RoleInfo [] roleInfoArray)
RoleInfo 객체로부터 제공된 롤 정보를 사용해, 관계형 (RelationTypeSupport 객체)을 작성해, 관계 서비스에 추가합니다. |
Map <ObjectName ,List <String >> |
findAssociatedMBeans (ObjectName mbeanName,
String relationTypeName,
String roleName)
관계내의 지정된 MBean 에 관련지을 수 있었던 MBean 를 가져옵니다. |
Map <String ,List <String >> |
findReferencingRelations (ObjectName mbeanName,
String relationTypeName,
String roleName)
지정된 MBean 가 참조되는 관계를 가져옵니다. |
List <String > |
findRelationsOfType (String relationTypeName)
지정된 형태의 관계의 관계 ID 를 돌려줍니다. |
List <String > |
getAllRelationIds ()
관계 서비스에 의해 처리되는 모든 관계의 모든 관계 ID 를 돌려줍니다. |
List <String > |
getAllRelationTypeNames ()
기존의 모든 관계형의 이름을 가져옵니다. |
RoleResult |
getAllRoles (String relationId)
관계에 포함되는 모든 롤을 돌려줍니다. |
MBeanNotificationInfo [] |
getNotificationInfo ()
통지의 Java 클래스명과 송신되는 통지형을 포함한 NotificationInfo 객체를 돌려줍니다. |
boolean |
getPurgeFlag ()
관계내의 참조 대상의 MBean 의 등록 해제의 통지를 언제 수신했는지, 관계를 즉시 「퍼지」 (유효하지 않게 된 관계를 검색) 할 필요가 있을지 어떨지, 또는 purgeRelations 메소드가 명시적으로 불려 가는 경우에게만 퍼지가 실행될지 어떨지를 나타내는 플래그를 돌려줍니다. |
Map <ObjectName ,List <String >> |
getReferencedMBeans (String relationId)
관계의 다양한 롤로 참조되는 MBean 를 가져옵니다. |
String |
getRelationTypeName (String relationId)
지정된 관계의 관계형의 이름을 돌려줍니다. |
List <ObjectName > |
getRole (String relationId,
String roleName)
지정된 관계에 포함되는 지정된 롤명의 롤치를 가져옵니다. |
Integer |
getRoleCardinality (String relationId,
String roleName)
지정된 롤내에서 현재 참조되고 있는 MBean 의 수를 가져옵니다. |
RoleInfo |
getRoleInfo (String relationTypeName,
String roleInfoName)
지정된 관계형의 지정된 롤명의 롤 정보를 가져옵니다. |
List <RoleInfo > |
getRoleInfos (String relationTypeName)
지정된 관계형의 롤 정보 (RoleInfo 객체)의 리스트를 가져옵니다. |
RoleResult |
getRoles (String relationId,
String [] roleNameArray)
지정된 관계에 포함되는 지정된 이름의 롤의 값을 가져옵니다. |
void |
handleNotification (Notification notif,
Object handback)
JMX 통지가 발생했을 때 불려 갑니다. |
Boolean |
hasRelation (String relationId)
관계 서비스내로 지정된 관계 ID 로 식별되는 관계가 있을지 어떨지를 체크합니다. |
void |
isActive ()
관계 서비스가 액티브한가 어떤가를 체크합니다. |
String |
isRelation (ObjectName objectName)
MBean 가 관계로서 관계 서비스에 추가되고 있는 경우, 지정된 ObjectName 에 관련지을 수 있는 관계 ID 를 돌려줍니다. |
ObjectName |
isRelationMBean (String relationId)
사용자에 의해 작성되어 관계로서 관계 서비스에 추가된 MBean 가 관계를 나타내는 경우, 이 MBean 의 ObjectName 를 돌려줍니다. |
void |
postDeregister ()
MBean 서버로부터 등록 해제한 뒤, MBean 가 필요한 오퍼레이션을 실행할 수 있도록(듯이) 합니다. |
void |
postRegister (Boolean registrationDone)
MBean 서버에의 등록이 성공 또는 실패한 뒤, MBean 가 필요한 오퍼레이션을 실행할 수 있도록(듯이) 합니다. |
void |
preDeregister ()
MBean 서버로부터 등록 해제하기 전에, MBean 가 필요한 오퍼레이션을 실행할 수 있도록(듯이) 합니다. |
ObjectName |
preRegister (MBeanServer server,
ObjectName name)
MBean 서버에 등록하기 전에, MBean 에 필요한 오퍼레이션을 실행시킬 수가 있습니다. |
void |
purgeRelations ()
관계를 퍼지 합니다. |
void |
removeRelation (String relationId)
지정된 관계형을 관계 서비스로부터 삭제합니다. |
void |
removeRelationType (String relationTypeName)
지정된 관계형을 관계 서비스로부터 삭제합니다. |
void |
sendRelationCreationNotification (String relationId)
관계 작성의 통지 (RelationNotification)를 송신합니다. |
void |
sendRelationRemovalNotification (String relationId,
List <ObjectName > unregMBeanList)
관계 삭제의 통지 (RelationNotification)를 송신합니다. |
void |
sendRoleUpdateNotification (String relationId,
Role newRole,
List <ObjectName > oldValue)
지정된 관계내의 롤 갱신의 통지 (RelationNotification)를 송신합니다. |
void |
setPurgeFlag (boolean purgeFlag)
관계내의 참조 대상의 MBean 의 등록 해제의 통지를 언제 수신했는지, 관계를 즉시 「퍼지」 (유효하지 않게 된 관계를 검색) 할 필요가 있을지 어떨지, 또는 purgeRelations 메소드가 명시적으로 불려 가는 경우에게만 퍼지가 실행될지 어떨지를 나타내는 플래그를 설정합니다. |
void |
setRole (String relationId,
Role role)
지정된 관계내의 지정된 롤을 설정합니다. |
RoleResult |
setRoles (String relationId,
RoleList roleList)
지정된 관계내의 지정된 롤을 설정합니다. |
void |
updateRoleMap (String relationId,
Role newRole,
List <ObjectName > oldValue)
지정된 관계내의 지정된 롤을 갱신하기 위해(때문에), 관계 서비스 롤 맵의 갱신을 처리합니다. |
클래스 javax.management. NotificationBroadcasterSupport 로부터 상속된 메소드 |
---|
addNotificationListener , handleNotification , removeNotificationListener , removeNotificationListener , sendNotification |
클래스 java.lang. Object 로부터 상속된 메소드 |
---|
clone , equals , finalize , getClass , hashCode , notify , notifyAll , toString , wait , wait , wait |
생성자 의 상세 |
---|
public RelationService(boolean immediatePurgeFlag)
immediatePurgeFlag
- 관계내의 참조 대상의
MBean 의 등록 해제의 통지를 언제 수신했는지,
관계를 즉시 「퍼지」 (유효하지 않게 된 관계를 검색) 할 필요가 있을지 어떨지,
또는 purgeRelations 메소드가 명시적으로 불려 가는 경우에게만
퍼지가 실행될지 어떨지를 나타내는 플래그
true 의 경우, 즉시 퍼지를 실시할 필요가 있습니다.
메소드의 상세 |
---|
public void isActive() throws RelationServiceNotRegisteredException
RelationServiceMBean
내의 isActive
RelationServiceNotRegisteredException
- 관계 서비스가
미등록의 경우public ObjectName preRegister(MBeanServer server, ObjectName name) throws Exception
MBeanRegistration
의 기술:
MBeanRegistration
내의 preRegister
server
- MBean 서버. MBean 는 여기에 등록되는name
- MBean 의 객체명. MBeanServer
인터페이스내의
createMBean
또는 registerMBean
메소드의
name 파라미터가 null 의 경우,
이 이름도 null 가 된다. 이 경우, 이 메소드는,
새로운 MBean 용으로 null 이외의 ObjectName 를 반드시 돌려준다
name
파라미터가 null 이외의 경우, 일반적으로은 값이 돌려주어지지만,
이것은 필수는 아니다
Exception
- 이 예외는, MBean 서버에 캐치 되어
MBeanRegistrationException
로서 재throw 된다public void postRegister(Boolean registrationDone)
MBeanRegistration
의 기술:
MBeanRegistration
내의 postRegister
registrationDone
- MBean 가 MBean 서버에
정상적으로 등록되었는지의 여부를 나타낸다. 등록에
실패했을 경우의 값은 falsepublic void preDeregister() throws Exception
MBeanRegistration
의 기술:
MBeanRegistration
내의 preDeregister
Exception
- 이 예외는, MBean 서버에 캐치 되어
MBeanRegistrationException
로서 재throw 된다public void postDeregister()
MBeanRegistration
의 기술:
MBeanRegistration
내의 postDeregister
public boolean getPurgeFlag()
true 의 경우, 즉시 퍼지를 실시할 필요가 있습니다.
RelationServiceMBean
내의 getPurgeFlag
setPurgeFlag(boolean)
public void setPurgeFlag(boolean purgeFlag)
true 의 경우, 즉시 퍼지를 실시할 필요가 있습니다.
RelationServiceMBean
내의 setPurgeFlag
purgeFlag
- 플래그getPurgeFlag()
public void createRelationType(String relationTypeName, RoleInfo [] roleInfoArray) throws IllegalArgumentException , InvalidRelationTypeException
RelationServiceMBean
내의 createRelationType
relationTypeName
- 관계형의 이름roleInfoArray
- 롤 정보의 배열
IllegalArgumentException
- 파라미터가 null 의 경우
InvalidRelationTypeException
- 다음의 조건이 성립하는 경우:
- 같은 이름의 관계형이 벌써 존재하는 경우
- 같은 이름이 2 개가 다른 롤 정보로 사용되고 있는 경우
- 롤 정보가 제공되지 않았던 경우
- 롤 정보로서 null 가 제공되었을 경우
public void addRelationType(RelationType relationTypeObj) throws IllegalArgumentException , InvalidRelationTypeException
RelationServiceMBean
내의 addRelationType
relationTypeObj
- 관계형 객체 (RelationType 인터페이스를
구현)
IllegalArgumentException
- 파라미터가 null 인 경우, 또는
relationTypeObj.getRelationTypeName()
가 null 를 돌려주는 경우
InvalidRelationTypeException
- 다음의 조건이 성립하는 경우:
- 같은 이름이 2 개가 다른 롤로 사용되고 있는 경우
- 롤 정보가 제공되지 않았던 경우
- 롤 정보로서 null 가 제공되었을 경우
- 같은 이름의 관계형이 벌써 존재하는 경우
public List <String > getAllRelationTypeNames()
RelationServiceMBean
내의 getAllRelationTypeNames
public List <RoleInfo > getRoleInfos(String relationTypeName) throws IllegalArgumentException , RelationTypeNotFoundException
RelationServiceMBean
내의 getRoleInfos
relationTypeName
- 관계형의 이름
IllegalArgumentException
- 파라미터가 null 의 경우
RelationTypeNotFoundException
- 그 이름의 관계형이
존재하지 않는 경우public RoleInfo getRoleInfo(String relationTypeName, String roleInfoName) throws IllegalArgumentException , RelationTypeNotFoundException , RoleInfoNotFoundException
RelationServiceMBean
내의 getRoleInfo
relationTypeName
- 관계형의 이름roleInfoName
- 롤명
IllegalArgumentException
- 파라미터가 null 의 경우
RelationTypeNotFoundException
- 관계 서비스에 있어
미지의 관계형인 경우
RoleInfoNotFoundException
- 관계형에 롤이
포함되지 않은 경우public void removeRelationType(String relationTypeName) throws RelationServiceNotRegisteredException , IllegalArgumentException , RelationTypeNotFoundException
그 형태의 관계 객체가 관계 서비스로부터 삭제됩니다.
RelationServiceMBean
내의 removeRelationType
relationTypeName
- 삭제되는 관계형의 이름
RelationServiceNotRegisteredException
- 관계 서비스
하지만 MBean 서버에 등록되지 않은 경우
IllegalArgumentException
- 파라미터가 null 의 경우
RelationTypeNotFoundException
- 그 이름의 관계형이
존재하지 않는 경우public void createRelation(String relationId, String relationTypeName, RoleList roleList) throws RelationServiceNotRegisteredException , IllegalArgumentException , RoleNotFoundException , InvalidRelationIdException , RelationTypeNotFoundException , InvalidRoleValueException
롤은 파라미터로 지정된 롤 리스트에 따라 초기화됩니다. 이 방법으로 초기화되지 않는 롤은, ObjectName 의 빈 상태(empty)의 ArrayList 로 설정됩니다.
RELATION_BASIC_CREATION 형의 RelationNotification 가 송신됩니다.
RelationServiceMBean
내의 createRelation
relationId
- 관계 서비스내의 관계를 일의에 식별하기 위해서
사용되는 관계 식별자relationTypeName
- 관계 서비스내에 작성할 필요가 있다
관계형의 이름roleList
- 관계의 롤을 초기화하기 위한 롤 리스트
(null 도 가능)
RelationServiceNotRegisteredException
- 관계 서비스
하지만 MBean 서버에 등록되지 않은 경우
IllegalArgumentException
- 파라미터가 null 의 경우.
다만, 롤의 초기화를 하지 않는 경우 null 로 할 수 있는 롤 리스트를 제외하다
RoleNotFoundException
- 관계형내에 존재하지 않는 롤에
값이 제공되었을 경우
InvalidRelationIdException
- 관계 ID 가 벌써 사용되고 있는 경우
RelationTypeNotFoundException
- 관계 서비스에 있어 미지의
관계형인 경우
InvalidRoleValueException
- 다음의 조건이 성립하는 경우:
- 같은 이름이 2 개가 다른 롤로 사용되고 있는 경우
- 지정된 값에 포함되는 참조 대상의 MBean 의 수가 예상 최소치보다 작은 경우
- 지정된 값에 포함되는 참조 대상의 MBean 의 수가 예상 최대치를 넘고 있는 경우
- 값에 포함되는 참조 대상의 MBean 중 1 개(살)이, 그 롤의 MBean 클래스의 객체가 아닌 경우
- 그 롤의 MBean 가 존재하지 않는 경우
public void addRelation(ObjectName relationObjectName) throws IllegalArgumentException , RelationServiceNotRegisteredException , NoSuchMethodException , InvalidRelationIdException , InstanceNotFoundException , InvalidRelationServiceException , RelationTypeNotFoundException , RoleNotFoundException , InvalidRoleValueException
MBean 를 관계로서 추가하기 위해서는, 다음의 조건이 채워지고 있을 필요가 있습니다.
- MBean 가 Relation 인터페이스를 구현하고 있다
- MBean 가 RelationService ObjectName 용으로서 현재의 관계 서비스의 ObjectName 를 가지고 있다
- MBean 가 현재의 관계 서비스내에서 일의 또한 미사용의 관계 ID 를 가지고 있다
- MBean 가 관계형용으로서 관계 서비스내에서 작성된 관계형을 가지고 있다
- MBean 가 관계형내에서 제공된 롤 정보에 적합하는 롤을 가지고 있다
RelationServiceMBean
내의 addRelation
relationObjectName
- 추가되는 관계 MBean 의 ObjectName
IllegalArgumentException
- 파라미터가 null 의 경우
RelationServiceNotRegisteredException
- 관계 서비스
하지만 MBean 서버에 등록되지 않은 경우
NoSuchMethodException
- MBean 가 Relation 인터페이스를
구현하고 있지 않는 경우
InvalidRelationIdException
- 다음의 조건이 성립하는 경우:
- MBean 내에 관계 식별자가 존재하지 않는다
- 관계 식별자가 관계 서비스로 벌써 사용되고 있는 경우
InstanceNotFoundException
- 지정된 ObjectName 의 MBean 가
등록되지 않은 경우
InvalidRelationServiceException
- 다음의 조건이 성립하는 경우:
- MBean 내에 관계 서비스명이 존재하지 않는 경우
- MBean 내의 관계 서비스명이 현재의 관계 서비스의 관계 서비스명이 아닌 경우
RelationTypeNotFoundException
- 다음의 조건이 성립하는 경우:
- MBean 내에 관계형명이 존재하지 않는 경우
- MBean 내의 관계형명이 관계 서비스내에 작성되었다 관계형에 대응하고 있지 않는 경우
InvalidRoleValueException
- 다음의 조건이 성립하는 경우:
- 롤에 포함되는 참조 대상의 MBean 의 수가 예상 최소치보다 작은 경우
- 롤에 포함되는 참조 대상의 MBean 의 수가 예상 최대치를 넘고 있는 경우
- 값에 포함되는 참조 대상의 MBean 중 1 개(살)이, 그 롤의 MBean 클래스의 객체가 아닌 경우
- 롤에 제공된 MBean 가 존재하지 않는 경우
RoleNotFoundException
- 관계형내에 존재하지 않는 롤에
값이 제공되었을 경우public ObjectName isRelationMBean(String relationId) throws IllegalArgumentException , RelationNotFoundException
RelationServiceMBean
내의 isRelationMBean
relationId
- 관계를 식별하는 관계 ID
IllegalArgumentException
- 파라미터가 null 의 경우
RelationNotFoundException
- 이 ID 에 관계가
관련지을 수 있지 않은 경우public String isRelation(ObjectName objectName) throws IllegalArgumentException
RelationServiceMBean
내의 isRelation
objectName
- 가정된 관계의 ObjectName
IllegalArgumentException
- 파라미터가 null 의 경우public Boolean hasRelation(String relationId) throws IllegalArgumentException
RelationServiceMBean
내의 hasRelation
relationId
- 관계를 식별하는 관계 ID
IllegalArgumentException
- 파라미터가 null 의 경우public List <String > getAllRelationIds()
RelationServiceMBean
내의 getAllRelationIds
public Integer checkRoleReading(String roleName, String relationTypeName) throws IllegalArgumentException , RelationTypeNotFoundException
RelationServiceMBean
내의 checkRoleReading
roleName
- 체크되는 롤의 이름relationTypeName
- 관계형의 이름
- 롤의 읽기가 가능한 경우는 0
- RoleStatus.NO_ROLE_WITH_NAME 에 대응하는 정수형
- RoleStatus.ROLE_NOT_READABLE 에 대응하는 정수형
IllegalArgumentException
- 파라미터가 null 의 경우
RelationTypeNotFoundException
- 관계 서비스에 있어
미지의 관계형인 경우public Integer checkRoleWriting(Role role, String relationTypeName, Boolean initFlag) throws IllegalArgumentException , RelationTypeNotFoundException
RelationServiceMBean
내의 checkRoleWriting
role
- 체크되는 롤relationTypeName
- 관계형의 이름initFlag
- 롤의 초기화를 위해서(때문에) 체크를 한 것을 나타내는 플래그.
기입 액세스의 검증은 행해지지 않는다
- 롤의 설정이 가능한 경우는 0
- RoleStatus.NO_ROLE_WITH_NAME 에 대응하는 정수형
- RoleStatus.ROLE_NOT_WRITABLE 의 정수형
- RoleStatus.LESS_THAN_MIN_ROLE_DEGREE 의 정수형
- RoleStatus.MORE_THAN_MAX_ROLE_DEGREE 의 정수형
- RoleStatus.REF_MBEAN_OF_INCORRECT_CLASS 의 정수형
- RoleStatus.REF_MBEAN_NOT_REGISTERED 의 정수형
IllegalArgumentException
- 파라미터가 null 의 경우
RelationTypeNotFoundException
- 미지의 관계형의 경우public void sendRelationCreationNotification(String relationId) throws IllegalArgumentException , RelationNotFoundException
- RelationNotification.RELATION_BASIC_CREATION. 관계가 관계 서비스의 내부 객체인 경우
- RelationNotification.RELATION_MBEAN_CREATION. 관계가 관계로서 추가된 MBean 인 경우
소스 객체는 관계 서비스 자체입니다.
관계 서비스의 createRelation() 메소드 및 addRelation() 메소드로 불려 갑니다.
RelationServiceMBean
내의 sendRelationCreationNotification
relationId
- 갱신된 관계의 관계 식별자
IllegalArgumentException
- 파라미터가 null 의 경우
RelationNotFoundException
- 지정된 관계 ID 의 관계가
존재하지 않는 경우public void sendRoleUpdateNotification(String relationId, Role newRole, List <ObjectName > oldValue) throws IllegalArgumentException , RelationNotFoundException
- RelationNotification.RELATION_BASIC_UPDATE. 관계가 관계 서비스의 내부 객체인 경우
- RelationNotification.RELATION_MBEAN_UPDATE. 관계가 관계로서 추가된 MBean 인 경우
소스 객체는 관계 서비스 자체입니다.
관계 MBean 의 setRole() 메소드 (지정된 롤용) 및 setRoles() 메소드 ( 각 롤용)로 불려 갑니다. 이 구현은 RelationSupport 클래스에서 제공됩니다.
관계 서비스의 setRole() 메소드 (지정된 롤용) 및 setRoles() 메소드 ( 각 롤용)에서도 호출할 수 있습니다.
RelationServiceMBean
내의 sendRoleUpdateNotification
relationId
- 갱신된 관계의 관계 식별자newRole
- 새로운 롤 (이름과 새로운 값)oldValue
- 낡은 롤치 (ObjectName 객체의 List)
IllegalArgumentException
- 파라미터가 null 의 경우
RelationNotFoundException
- 지정된 관계 ID 의 관계가
존재하지 않는 경우public void sendRelationRemovalNotification(String relationId, List <ObjectName > unregMBeanList) throws IllegalArgumentException , RelationNotFoundException
- RelationNotification.RELATION_BASIC_REMOVAL. 관계가 관계 서비스의 내부 객체인 경우
- RelationNotification.RELATION_MBEAN_REMOVAL. 관계가 관계로서 추가된 MBean 인 경우
소스 객체는 관계 서비스 자체입니다.
관계 서비스의 removeRelation() 메소드로 불려 갑니다.
RelationServiceMBean
내의 sendRelationRemovalNotification
relationId
- 갱신된 관계의 관계 식별자unregMBeanList
- 관계의 삭제의 결과,
등록 해제되는 MBean 의 ObjectName 의 리스트 (null 도 가능)
IllegalArgumentException
- 파라미터가 null 의 경우
RelationNotFoundException
- 지정된 관계 ID 의 관계가
존재하지 않는 경우public void updateRoleMap(String relationId, Role newRole, List <ObjectName > oldValue) throws IllegalArgumentException , RelationServiceNotRegisteredException , RelationNotFoundException
관계 MBean 의 setRole() 메소드 (지정된 롤용) 및 setRoles() 메소드 ( 각 롤용)로 불려 갑니다. 이 구현은 RelationSupport 클래스에서 제공됩니다.
관계 서비스의 setRole() 메소드 (지정된 롤용) 및 setRoles() 메소드 ( 각 롤용)에서도 호출할 수 있습니다.
관계 서비스가 MBean 의 등록 해제시도 무결성을 확보해, 쿼리를 실행할 수 있도록(듯이) 하려면 , 롤의 갱신시에 이 메소드를 호출할 필요가 있습니다.
RelationServiceMBean
내의 updateRoleMap
relationId
- 갱신된 관계의 관계 식별자newRole
- 새로운 롤 (이름과 새로운 값)oldValue
- 낡은 롤치 (ObjectName 객체의 List)
IllegalArgumentException
- 파라미터가 null 의 경우
RelationServiceNotRegisteredException
- 관계 서비스
하지만 MBean 서버에 등록되지 않은 경우
RelationNotFoundException
- 지정된 ID 에 대응하는 관계가 존재하지 않는 경우public void removeRelation(String relationId) throws RelationServiceNotRegisteredException , IllegalArgumentException , RelationNotFoundException
RelationNotification 통지가 송신됩니다. 그 형태는 다음과 같습니다.
- RelationNotification.RELATION_BASIC_REMOVAL. 관계 서비스내 전용의 관계인 경우
- RelationNotification.RELATION_MBEAN_REMOVAL. 관계가 MBean 로서 등록되어 있는 경우
이러한 관계로 참조되는 MBean 의 경우, 아무것도 행해지지 않습니다.
RelationServiceMBean
내의 removeRelation
relationId
- 삭제되는 관계의 관계 ID
RelationServiceNotRegisteredException
- 관계 서비스
하지만 MBean 서버에 등록되지 않은 경우
IllegalArgumentException
- 파라미터가 null 의 경우
RelationNotFoundException
- 지정된 관계 ID 에
대응하는 관계가 존재하지 않는 경우public void purgeRelations() throws RelationServiceNotRegisteredException
이 메소드는, purgeFlag 치에 의존합니다. 플래그가 true 로 설정되어 있는 경우는, 관계내의 참조 대상의 MBean 의 등록 해제를 알리는 통지를 수신했을 때 자동적으로 불려 갑니다. 플래그가 false 로 설정되어 있는 경우는 불려 가지 않습니다.
플래그가 false 로 설정되어 있는 경우, 관계의 무결성을 확보하기 위해서 이 메소드를 호출할지 어떨지는 사용자가 결정합니다. MBean 의 등록이 해제된 뒤 즉시 퍼지를 하지 않는 경우, ObjectName 가 재사용되어 관계내의 참조 대상의 다른 MBean 에 할당할 수 있을 때 이 purgeRelations() 메소드를 수동으로 호출하면(자), 문제가 발생합니다. 이것은, 새로운 MBean 가 인식되지 않고, ObjectName 가 등록 해제된 MBean 에 대응한다고 보여지기 때문입니다.
동작은, 등록 해제된 MBean 가 참조되는 롤의 카디나리티에 의해 결정됩니다.
- 롤내의 MBean 참조를 1 개 삭제했을 때 참조의 수가 최소치보다 적게 되는 경우는, 관계를 삭제할 필요가 있다
- MBean 참조를 삭제한 뒤 남은 참조의 수가 카디나리티 범위내인 경우는, 관계를 보관 유지해, handleMBeanUnregistration() 콜백을 호출해 갱신한다
RelationServiceMBean
내의 purgeRelations
RelationServiceNotRegisteredException
- 관계 서비스
하지만 MBean 서버에 등록되지 않은 경우public Map <String ,List <String >> findReferencingRelations(ObjectName mbeanName, String relationTypeName, String roleName) throws IllegalArgumentException
이것은, CIM 의 「Reference」 및 「ReferenceName」오퍼레이션에 대응합니다.
RelationServiceMBean
내의 findReferencingRelations
mbeanName
- MBean 의 ObjectNamerelationTypeName
- null 도 가능. 지정했을 경우,
검색에서는 그 형태의 관계만이 고려된다. 그 이외의 경우,
모든 관계형이 고려되는roleName
- null 도 가능. 지정했을 경우,
그 롤내의 MBean 가 참조되는 관계만이 반환된다. 그 이외의 경우,
모든 롤이 고려된다
IllegalArgumentException
- 파라미터가 null 의 경우public Map <ObjectName ,List <String >> findAssociatedMBeans(ObjectName mbeanName, String relationTypeName, String roleName) throws IllegalArgumentException
이것은, CIM 의 Associator 및 AssociatorName 오퍼레이션에 대응합니다.
RelationServiceMBean
내의 findAssociatedMBeans
mbeanName
- MBean 의 ObjectNamerelationTypeName
- null 도 가능. 지정했을 경우,
검색에서는 그 형태의 관계만이 고려된다. 그 이외의 경우,
모든 관계형이 고려되는roleName
- null 도 가능. 지정했을 경우,
그 롤내의 MBean 가 참조되는 관계만이 고려된다. 그 이외의 경우,
모든 롤이 고려된다
IllegalArgumentException
- 파라미터가 null 의 경우public List <String > findRelationsOfType(String relationTypeName) throws IllegalArgumentException , RelationTypeNotFoundException
RelationServiceMBean
내의 findRelationsOfType
relationTypeName
- 관계형명
IllegalArgumentException
- 파라미터가 null 의 경우
RelationTypeNotFoundException
- 그 이름의 관계형이
존재하지 않는 경우public List <ObjectName > getRole(String relationId, String roleName) throws RelationServiceNotRegisteredException , IllegalArgumentException , RelationNotFoundException , RoleNotFoundException
RelationServiceMBean
내의 getRole
relationId
- 관계 IDroleName
- 롤명
RelationServiceNotRegisteredException
- 관계 서비스
하지만 미등록의 경우
IllegalArgumentException
- 파라미터가 null 의 경우
RelationNotFoundException
- 지정된 ID 에 대응하는 관계가 존재하지 않는 경우
RoleNotFoundException
- 다음의 조건이 성립하는 경우:
- 지정된 이름의 롤이 존재하지 않는 경우
또는
- 롤이 읽어내 불가인 경우
setRole(java.lang.String, javax.management.relation.Role)
public RoleResult getRoles(String relationId, String [] roleNameArray) throws RelationServiceNotRegisteredException , IllegalArgumentException , RelationNotFoundException
RelationServiceMBean
내의 getRoles
relationId
- 관계 IDroleNameArray
- 취득되는 롤의 이름으로부터 완성되는 배열
RelationServiceNotRegisteredException
- 관계 서비스
하지만 MBean 서버에 등록되지 않은 경우
IllegalArgumentException
- 파라미터가 null 의 경우
RelationNotFoundException
- 지정된 ID 에 대응하는 관계가 존재하지 않는 경우setRoles(java.lang.String, javax.management.relation.RoleList)
public RoleResult getAllRoles(String relationId) throws IllegalArgumentException , RelationNotFoundException , RelationServiceNotRegisteredException
RelationServiceMBean
내의 getAllRoles
relationId
- 관계 ID
IllegalArgumentException
- 파라미터가 null 의 경우
RelationNotFoundException
- 지정된 ID 에 대응하는 관계가 존재하지 않는 경우
RelationServiceNotRegisteredException
- 관계 서비스
하지만 MBean 서버에 등록되지 않은 경우public Integer getRoleCardinality(String relationId, String roleName) throws IllegalArgumentException , RelationNotFoundException , RoleNotFoundException
RelationServiceMBean
내의 getRoleCardinality
relationId
- 관계 IDroleName
- 롤명
IllegalArgumentException
- 파라미터가 null 의 경우
RelationNotFoundException
- 지정된 ID 에 대응하는 관계가 존재하지 않는 경우
RoleNotFoundException
- 지정된 이름의 롤이 존재하지 않는 경우public void setRole(String relationId, Role role) throws RelationServiceNotRegisteredException , IllegalArgumentException , RelationNotFoundException , RoleNotFoundException , InvalidRoleValueException
관계의 관계형에 포함되어 있는 대응하는 롤 정의에 따라, 롤을 체크합니다.
관계 서비스는, 관계의 무결성을 확보하기 위해(때문에), 참조 대상의 MBean 의 등록 해제를 처리하는 것으로써, 변경을 추적합니다.
RelationServiceMBean
내의 setRole
relationId
- 관계 IDrole
- 설정되는 롤 (이름과 새로운 값)
RelationServiceNotRegisteredException
- 관계 서비스
하지만 MBean 서버에 등록되지 않은 경우
IllegalArgumentException
- 파라미터가 null 의 경우
RelationNotFoundException
- 지정된 ID 에 대응하는 관계가 존재하지 않는 경우
RoleNotFoundException
- 롤이 존재하지 않는지,
기입 불가인 경우
InvalidRoleValueException
- 롤에 대해서 제공된 값이
무효인 경우:
- 지정된 값에 포함되는 참조 대상의 MBean 의 수가 예상 최소치보다 작은 경우
또는
- 지정된 값에 포함되는 참조 대상의 MBean 의 수가 예상 최대치를 넘고 있는 경우
또는
- 값에 포함되는 참조 대상의 MBean 중 1 개(살)이, 그 롤의 MBean 클래스의 객체가 아닌 경우
또는
- 그 롤의 MBean 가 존재하지 않는 경우
getRole(java.lang.String, java.lang.String)
public RoleResult setRoles(String relationId, RoleList roleList) throws RelationServiceNotRegisteredException , IllegalArgumentException , RelationNotFoundException
관계의 관계형에 포함되어 있는 대응하는 롤 정의에 따라, 롤을 체크합니다.
관계 서비스는, 관계의 무결성을 확보하기 위해(때문에), 참조 대상의 MBean 의 등록 해제를 처리하는 것으로써, 변경을 추적합니다.
RelationServiceMBean
내의 setRoles
relationId
- 관계 IDroleList
- 설정되는 롤의 리스트
RelationServiceNotRegisteredException
- 관계 서비스
하지만 MBean 서버에 등록되지 않은 경우
IllegalArgumentException
- 파라미터가 null 의 경우
RelationNotFoundException
- 지정된 ID 에 대응하는 관계가 존재하지 않는 경우getRoles(java.lang.String, java.lang.String[])
public Map <ObjectName ,List <String >> getReferencedMBeans(String relationId) throws IllegalArgumentException , RelationNotFoundException
RelationServiceMBean
내의 getReferencedMBeans
relationId
- 관계 ID
ObjectName → String (롤명)로부터 완성되는 ArrayList
IllegalArgumentException
- 파라미터가 null 의 경우
RelationNotFoundException
- 지정된 관계 ID 에 대응하는 관계가
존재하지 않는 경우public String getRelationTypeName(String relationId) throws IllegalArgumentException , RelationNotFoundException
RelationServiceMBean
내의 getRelationTypeName
relationId
- 관계 ID
IllegalArgumentException
- 파라미터가 null 의 경우
RelationNotFoundException
- 지정된 관계 ID 에 대응하는 관계가
존재하지 않는 경우public void handleNotification(Notification notif, Object handback)
NotificationListener
내의 handleNotification
notif
- 통지handback
- 청취자에 의한 MBean 이미터의 정보의 관련지어에 도움이 되는,
불투명한 객체 (null 도 사용 가능)public MBeanNotificationInfo [] getNotificationInfo()
NotificationBroadcaster
내의 getNotificationInfo
NotificationBroadcasterSupport
내의 getNotificationInfo
|
JavaTM Platform Standard Ed. 6 |
|||||||||
앞의 클래스 다음의 클래스 | 프레임 있어 프레임 없음 | |||||||||
개요: 상자 | 필드 | 생성자 | 메소드 | 상세: 필드 | 생성자 | 메소드 |
Copyright 2006 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms . Documentation Redistribution Policy 도 참조해 주세요.