javax.management.relation

Class RelationSupport

  • All Implemented Interfaces:
    MBeanRegistration, Relation, RelationSupportMBean

    public class RelationSupport
    extends Object
    implements RelationSupportMBean, MBeanRegistration
    A RelationSupport object is used internally by the Relation Service to represent simple relations (only roles, no properties or methods), with an unlimited number of roles, of any relation type. As internal representation, it is not exposed to the user.

    RelationSupport class conforms to the design patterns of standard MBean. So the user can decide to instantiate a RelationSupport object himself as a MBean (as it follows the MBean design patterns), to register it in the MBean Server, and then to add it in the Relation Service.

    The user can also, when creating his own MBean relation class, have it extending RelationSupport, to retrieve the implementations of required interfaces (see below).

    It is also possible to have in a user relation MBean class a member being a RelationSupport object, and to implement the required interfaces by delegating all to this member.

    RelationSupport implements the Relation interface (to be handled by the Relation Service).

    It implements also the MBeanRegistration interface to be able to retrieve the MBean Server where it is registered (if registered as a MBean) to access to its Relation Service.

    Since:
    1.5
    • Constructor Detail

      • RelationSupport

        public RelationSupport(String relationId,
                       ObjectName relationServiceName,
                       String relationTypeName,
                       RoleList list)
                        throws InvalidRoleValueException,
                               IllegalArgumentException
        Creates a RelationSupport object.

        This constructor has to be used when the RelationSupport object will be registered as a MBean by the user, or when creating a user relation MBean whose class extends RelationSupport.

        Nothing is done at the Relation Service level, i.e. the RelationSupport object is not added to the RelationService and no checks are performed to see if the provided values are correct. The object is always created, EXCEPT if:

        - any of the required parameters is null.

        - the same name is used for two roles.

        To be handled as a relation, the RelationSupport object has to be added to the Relation Service using the Relation Service method addRelation().

        Parameters:
        relationId - relation identifier, to identify the relation in the Relation Service.

        Expected to be unique in the given Relation Service.

        relationServiceName - ObjectName of the Relation Service where the relation will be registered.

        This parameter is required as it is the Relation Service that is aware of the definition of the relation type of the given relation, so that will be able to check update operations (set).

        relationTypeName - Name of relation type.

        Expected to have been created in the given Relation Service.

        list - list of roles (Role objects) to initialize the relation. Can be null.

        Expected to conform to relation info in associated relation type.

        Throws:
        InvalidRoleValueException - if the same name is used for two roles.
        IllegalArgumentException - if any of the required parameters (relation id, relation service ObjectName, or relation type name) is null.
      • RelationSupport

        public RelationSupport(String relationId,
                       ObjectName relationServiceName,
                       MBeanServer relationServiceMBeanServer,
                       String relationTypeName,
                       RoleList list)
                        throws InvalidRoleValueException,
                               IllegalArgumentException
        Creates a RelationSupport object.

        This constructor has to be used when the user relation MBean implements the interfaces expected to be supported by a relation by delegating to a RelationSupport object.

        This object needs to know the Relation Service expected to handle the relation. So it has to know the MBean Server where the Relation Service is registered.

        According to a limitation, a relation MBean must be registered in the same MBean Server as the Relation Service expected to handle it. So the user relation MBean has to be created and registered, and then the wrapped RelationSupport object can be created within the identified MBean Server.

        Nothing is done at the Relation Service level, i.e. the RelationSupport object is not added to the RelationService and no checks are performed to see if the provided values are correct. The object is always created, EXCEPT if:

        - any of the required parameters is null.

        - the same name is used for two roles.

        To be handled as a relation, the RelationSupport object has to be added to the Relation Service using the Relation Service method addRelation().

        Parameters:
        relationId - relation identifier, to identify the relation in the Relation Service.

        Expected to be unique in the given Relation Service.

        relationServiceName - ObjectName of the Relation Service where the relation will be registered.

        This parameter is required as it is the Relation Service that is aware of the definition of the relation type of the given relation, so that will be able to check update operations (set).

        relationServiceMBeanServer - MBean Server where the wrapping MBean is or will be registered.

        Expected to be the MBean Server where the Relation Service is or will be registered.

        relationTypeName - Name of relation type.

        Expected to have been created in the given Relation Service.

        list - list of roles (Role objects) to initialize the relation. Can be null.

        Expected to conform to relation info in associated relation type.

        Throws:
        InvalidRoleValueException - if the same name is used for two roles.
        IllegalArgumentException - if any of the required parameters (relation id, relation service ObjectName, relation service MBeanServer, or relation type name) is null.

Traduction non disponible

Les API Java ne sont pas encore traduites en français sur l'infobrol. Seule la version anglaise est disponible pour l'instant.

Version en cache

17/11/2024 17:49:05 Cette version de la page est en cache (à la date du 17/11/2024 17:49:05) afin d'accélérer le traitement. Vous pouvez activer le mode utilisateur dans le menu en haut pour afficher la dernère version de la page.

Document créé le 31/08/2006, dernière modification le 04/03/2020
Source du document imprimé : https://www.gaudry.be/java-api-rf-javax/management/relation/relationsupport.html

L'infobrol est un site personnel dont le contenu n'engage que moi. Le texte est mis à disposition sous licence CreativeCommons(BY-NC-SA). Plus d'info sur les conditions d'utilisation et sur l'auteur.

Références

  1. Consulter le document html Langue du document :fr Manuel PHP : https://docs.oracle.com, RelationSupport

Ces références et liens indiquent des documents consultés lors de la rédaction de cette page, ou qui peuvent apporter un complément d'information, mais les auteurs de ces sources ne peuvent être tenus responsables du contenu de cette page.
L'auteur de ce site est seul responsable de la manière dont sont présentés ici les différents concepts, et des libertés qui sont prises avec les ouvrages de référence. N'oubliez pas que vous devez croiser les informations de sources multiples afin de diminuer les risques d'erreurs.

Table des matières Haut