public interface Relation
简单的关系,即只有角色,没有属性或方法,可以直接通过关系服务创造了(表示为relationsupport对象、内部处理的关系服务)。
如果用户想表示更复杂的关系,涉及属性和/或方法,他必须提供自己的类实现的关系接口。这可以通过从relationsupport类继承实现,或者实现接口(完全或代表团一relationsupport对象成员)。
指定这样的用户关系类是要引入属性和/或方法。那些必须被曝光的远程管理。这意味着,任何用户关系类必须是一个MBean类。
Modifier and Type | Method and Description |
---|---|
RoleResult |
getAllRoles()
返回当前在关系中的所有角色。
|
Map<ObjectName,List<String>> |
getReferencedMBeans()
检索关系的各种角色引用MBeans。
|
String |
getRelationId()
返回关系标识符(用于唯一标识关系服务中的关系)。
|
ObjectName |
getRelationServiceName()
返回对象的关系服务处理的关系。
|
String |
getRelationTypeName()
关联关系类型的返回名称。
|
List<ObjectName> |
getRole(String roleName)
检索给定角色名的角色值。
|
Integer |
getRoleCardinality(String roleName)
返回给定引用在MBeans目前角色的数量。
|
RoleResult |
getRoles(String[] roleNameArray)
检索给定名称的角色的值。
|
void |
handleMBeanUnregistration(ObjectName objectName, String roleName)
回调的关系服务当MBean中引用的作用是未注册。
|
RoleList |
retrieveAllRoles()
返回关系中的所有角色,而不检查读模式。
|
void |
setRole(Role role)
设置给定的角色。
|
RoleResult |
setRoles(RoleList roleList)
设置给定的角色。
|
List<ObjectName> getRole(String roleName) throws IllegalArgumentException, RoleNotFoundException, RelationServiceNotRegisteredException
检查角色是否存在,并根据关系类型进行可读性检查。
roleName
名字的角色
IllegalArgumentException
如果空角色名
RoleNotFoundException
如果:
-有没有角色与给定的名称
-角色是不可读的。
RelationServiceNotRegisteredException
如果关系服务不在MBean服务器注册
setRole(javax.management.relation.Role)
RoleResult getRoles(String[] roleNameArray) throws IllegalArgumentException, RelationServiceNotRegisteredException
检查每个角色是否存在,并根据关系类型进行可读性。
roleNameArray
-要获取名称角色阵列
IllegalArgumentException
如果空角色名
RelationServiceNotRegisteredException
如果关系服务不在MBean服务器注册
setRoles(javax.management.relation.RoleList)
Integer getRoleCardinality(String roleName) throws IllegalArgumentException, RoleNotFoundException
roleName
名字的角色
IllegalArgumentException
如果空角色名
RoleNotFoundException
-如果名字没有作用
RoleResult getAllRoles() throws RelationServiceNotRegisteredException
RelationServiceNotRegisteredException
如果关系服务不在MBean服务器注册
RoleList retrieveAllRoles()
void setRole(Role role) throws IllegalArgumentException, RoleNotFoundException, RelationTypeNotFoundException, InvalidRoleValueException, RelationServiceNotRegisteredException, RelationNotFoundException
将根据其在关系类型中所提供的相应角色定义来检查角色
将发送通知(relationnotification relation_basic_update型或relation_mbean_update,如果关系是MBean或不)。
role
角色被设置(名称和新价值)
IllegalArgumentException
如果空的作用
RoleNotFoundException
-如果没有角色提供的角色名称或角色如果不写(在写访问模式进行初始化的作用在没有测试)
InvalidRoleValueException
-如果提供的角色值无效,即:
-引用MBeans给定值的数量少于预期的最低程度
-提供价值参考MBeans最大程度超过预期的数量
一个引用MBean的价值不在于MBean类预期,作用对象
对于这个角色不存在提供一个MBean。
RelationServiceNotRegisteredException
如果关系服务不在MBean服务器注册
RelationTypeNotFoundException
如果关系类型没有关系的服务声明。
RelationNotFoundException
如果关系没有关系的服务添加。
getRole(java.lang.String)
RoleResult setRoles(RoleList roleList) throws IllegalArgumentException, RelationServiceNotRegisteredException, RelationTypeNotFoundException, RelationNotFoundException
将根据其在关系类型中所提供的相应角色定义来检查角色
将发送一个通知(relationnotification relation_basic_update型或relation_mbean_update,如果关系是MBean或不)每更新的作用。
roleList
-角色设定
IllegalArgumentException
如果空角色列表
RelationServiceNotRegisteredException
如果关系服务不在MBean服务器注册
RelationTypeNotFoundException
如果关系类型没有关系的服务声明。
RelationNotFoundException
如果关系的MBean没有关系的服务添加。
getRoles(java.lang.String[])
void handleMBeanUnregistration(ObjectName objectName, String roleName) throws IllegalArgumentException, RoleNotFoundException, InvalidRoleValueException, RelationServiceNotRegisteredException, RelationTypeNotFoundException, RelationNotFoundException
关系服务将调用这个方法来让关系采取行动来反映这些注销的影响。
当心。用户不希望调用此方法。
当前的实现是其当前价值的角色设定(对引用MBeans objectnames列表)没有注册一个。
objectName
-未注册MBean ObjectName
roleName
名字的角色在MBean参考
IllegalArgumentException
如果空参数
RoleNotFoundException
-如果角色不在关系存在或不可写
InvalidRoleValueException
-如果角色值不符合相关的角色信息(这将永远不会发生在被称为从关系服务)
RelationServiceNotRegisteredException
如果关系服务不在MBean服务器注册
RelationTypeNotFoundException
如果关系类型没有关系的服务声明。
RelationNotFoundException
-如果这种方法被称为一个关系的MBean中不添加关系服务。
Map<ObjectName,List<String>> getReferencedMBeans()
ArrayList对象->字符串(角色名称)
String getRelationTypeName()
ObjectName getRelationServiceName()
String getRelationId()
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.