1 /*
2 * Copyright (c) 2000, 2005, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. Oracle designates this
8 * particular file as subject to the "Classpath" exception as provided
9 * by Oracle in the LICENSE file that accompanied this code.
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
23 * questions.
24 */
25
26 package javax.management.relation;
27
28 /**
29 * A RelationSupport object is used internally by the Relation Service to
30 * represent simple relations (only roles, no properties or methods), with an
31 * unlimited number of roles, of any relation type. As internal representation,
32 * it is not exposed to the user.
33 * <P>RelationSupport class conforms to the design patterns of standard MBean. So
34 * the user can decide to instantiate a RelationSupport object himself as
35 * a MBean (as it follows the MBean design patterns), to register it in the
36 * MBean Server, and then to add it in the Relation Service.
37 * <P>The user can also, when creating his own MBean relation class, have it
38 * extending RelationSupport, to retrieve the implementations of required
39 * interfaces (see below).
40 * <P>It is also possible to have in a user relation MBean class a member
41 * being a RelationSupport object, and to implement the required interfaces by
42 * delegating all to this member.
43 * <P> RelationSupport implements the Relation interface (to be handled by the
44 * Relation Service).
45 *
46 * @since 1.5
47 */
48 public interface RelationSupportMBean
49 extends Relation {
50
51 /**
52 * Returns an internal flag specifying if the object is still handled by
53 * the Relation Service.
54 *
55 * @return a Boolean equal to {@link Boolean#TRUE} if the object
56 * is still handled by the Relation Service and {@link
57 * Boolean#FALSE} otherwise.
58 */
59 public Boolean isInRelationService();
60
61 /**
62 * <p>Specifies whether this relation is handled by the Relation
63 * Service.</p>
64 * <P>BEWARE, this method has to be exposed as the Relation Service will
65 * access the relation through its management interface. It is RECOMMENDED
66 * NOT to use this method. Using it does not affect the registration of the
67 * relation object in the Relation Service, but will provide wrong
68 * information about it!
69 *
70 * @param flag whether the relation is handled by the Relation Service.
71 *
72 * @exception IllegalArgumentException if null parameter
73 */
74 public void setRelationServiceManagementFlag(Boolean flag)
75 throws IllegalArgumentException;
76 }