corba/src/java.corba/share/classes/com/sun/corba/se/spi/monitoring/MonitoredObject.java
author avstepan
Tue, 05 May 2015 15:17:13 +0400
changeset 30383 45960fdbe465
parent 25862 a5e25d68f971
permissions -rw-r--r--
8079075: some docs cleanup for CORBA - part 1 Summary: some fix for CORBA docs Reviewed-by: rriggs
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
4
02bb8761fcce Initial load
duke
parents:
diff changeset
     1
/*
5555
b2b5ed3f0d0d 6943119: Rebrand source copyright notices
ohair
parents: 4
diff changeset
     2
 * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
4
02bb8761fcce Initial load
duke
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
02bb8761fcce Initial load
duke
parents:
diff changeset
     4
 *
02bb8761fcce Initial load
duke
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
02bb8761fcce Initial load
duke
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
5555
b2b5ed3f0d0d 6943119: Rebrand source copyright notices
ohair
parents: 4
diff changeset
     7
 * published by the Free Software Foundation.  Oracle designates this
4
02bb8761fcce Initial load
duke
parents:
diff changeset
     8
 * particular file as subject to the "Classpath" exception as provided
5555
b2b5ed3f0d0d 6943119: Rebrand source copyright notices
ohair
parents: 4
diff changeset
     9
 * by Oracle in the LICENSE file that accompanied this code.
4
02bb8761fcce Initial load
duke
parents:
diff changeset
    10
 *
02bb8761fcce Initial load
duke
parents:
diff changeset
    11
 * This code is distributed in the hope that it will be useful, but WITHOUT
02bb8761fcce Initial load
duke
parents:
diff changeset
    12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
02bb8761fcce Initial load
duke
parents:
diff changeset
    13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
02bb8761fcce Initial load
duke
parents:
diff changeset
    14
 * version 2 for more details (a copy is included in the LICENSE file that
02bb8761fcce Initial load
duke
parents:
diff changeset
    15
 * accompanied this code).
02bb8761fcce Initial load
duke
parents:
diff changeset
    16
 *
02bb8761fcce Initial load
duke
parents:
diff changeset
    17
 * You should have received a copy of the GNU General Public License version
02bb8761fcce Initial load
duke
parents:
diff changeset
    18
 * 2 along with this work; if not, write to the Free Software Foundation,
02bb8761fcce Initial load
duke
parents:
diff changeset
    19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
02bb8761fcce Initial load
duke
parents:
diff changeset
    20
 *
5555
b2b5ed3f0d0d 6943119: Rebrand source copyright notices
ohair
parents: 4
diff changeset
    21
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
b2b5ed3f0d0d 6943119: Rebrand source copyright notices
ohair
parents: 4
diff changeset
    22
 * or visit www.oracle.com if you need additional information or have any
b2b5ed3f0d0d 6943119: Rebrand source copyright notices
ohair
parents: 4
diff changeset
    23
 * questions.
4
02bb8761fcce Initial load
duke
parents:
diff changeset
    24
 */
02bb8761fcce Initial load
duke
parents:
diff changeset
    25
package com.sun.corba.se.spi.monitoring;
02bb8761fcce Initial load
duke
parents:
diff changeset
    26
02bb8761fcce Initial load
duke
parents:
diff changeset
    27
02bb8761fcce Initial load
duke
parents:
diff changeset
    28
import com.sun.corba.se.spi.monitoring.MonitoredAttribute;
02bb8761fcce Initial load
duke
parents:
diff changeset
    29
import java.util.*;
02bb8761fcce Initial load
duke
parents:
diff changeset
    30
import java.util.Collection;
02bb8761fcce Initial load
duke
parents:
diff changeset
    31
02bb8761fcce Initial load
duke
parents:
diff changeset
    32
/**
30383
45960fdbe465 8079075: some docs cleanup for CORBA - part 1
avstepan
parents: 25862
diff changeset
    33
 * @author Hemanth Puttaswamy
4
02bb8761fcce Initial load
duke
parents:
diff changeset
    34
 *
02bb8761fcce Initial load
duke
parents:
diff changeset
    35
 * Monitored Object provides an Hierarchichal view of the ORB Monitoring
02bb8761fcce Initial load
duke
parents:
diff changeset
    36
 * System. It can contain multiple children and a single parent. Each
02bb8761fcce Initial load
duke
parents:
diff changeset
    37
 * Monitored Object may also contain Multiple Monitored Attributes.
02bb8761fcce Initial load
duke
parents:
diff changeset
    38
 */
02bb8761fcce Initial load
duke
parents:
diff changeset
    39
public interface MonitoredObject {
02bb8761fcce Initial load
duke
parents:
diff changeset
    40
02bb8761fcce Initial load
duke
parents:
diff changeset
    41
  ///////////////////////////////////////
02bb8761fcce Initial load
duke
parents:
diff changeset
    42
  // operations
02bb8761fcce Initial load
duke
parents:
diff changeset
    43
/**
02bb8761fcce Initial load
duke
parents:
diff changeset
    44
 * Gets the name of this MonitoredObject
02bb8761fcce Initial load
duke
parents:
diff changeset
    45
 *
02bb8761fcce Initial load
duke
parents:
diff changeset
    46
 * @return a String with name of this Monitored Object
02bb8761fcce Initial load
duke
parents:
diff changeset
    47
 */
02bb8761fcce Initial load
duke
parents:
diff changeset
    48
    public String getName();
02bb8761fcce Initial load
duke
parents:
diff changeset
    49
/**
02bb8761fcce Initial load
duke
parents:
diff changeset
    50
 * Gets the description of MonitoredObject
02bb8761fcce Initial load
duke
parents:
diff changeset
    51
 *
02bb8761fcce Initial load
duke
parents:
diff changeset
    52
 * @return a String with Monitored Object Description.
02bb8761fcce Initial load
duke
parents:
diff changeset
    53
 */
02bb8761fcce Initial load
duke
parents:
diff changeset
    54
    public String getDescription();
02bb8761fcce Initial load
duke
parents:
diff changeset
    55
/**
02bb8761fcce Initial load
duke
parents:
diff changeset
    56
 * This method will add a child Monitored Object to this Monitored Object.
02bb8761fcce Initial load
duke
parents:
diff changeset
    57
 */
02bb8761fcce Initial load
duke
parents:
diff changeset
    58
    public void addChild( MonitoredObject m );
02bb8761fcce Initial load
duke
parents:
diff changeset
    59
/**
02bb8761fcce Initial load
duke
parents:
diff changeset
    60
 * This method will remove child Monitored Object identified by the given name
30383
45960fdbe465 8079075: some docs cleanup for CORBA - part 1
avstepan
parents: 25862
diff changeset
    61
 *
4
02bb8761fcce Initial load
duke
parents:
diff changeset
    62
 * @param name of the ChildMonitored Object
02bb8761fcce Initial load
duke
parents:
diff changeset
    63
 */
02bb8761fcce Initial load
duke
parents:
diff changeset
    64
    public void removeChild( String name );
02bb8761fcce Initial load
duke
parents:
diff changeset
    65
02bb8761fcce Initial load
duke
parents:
diff changeset
    66
/**
02bb8761fcce Initial load
duke
parents:
diff changeset
    67
 * Gets the child MonitoredObject associated with this MonitoredObject
02bb8761fcce Initial load
duke
parents:
diff changeset
    68
 * instance using name as the key. The name should be fully qualified name
02bb8761fcce Initial load
duke
parents:
diff changeset
    69
 * like orb.connectionmanager
02bb8761fcce Initial load
duke
parents:
diff changeset
    70
 *
02bb8761fcce Initial load
duke
parents:
diff changeset
    71
 * @return a MonitoredObject identified by the given name
02bb8761fcce Initial load
duke
parents:
diff changeset
    72
 * @param name of the ChildMonitored Object
02bb8761fcce Initial load
duke
parents:
diff changeset
    73
 */
02bb8761fcce Initial load
duke
parents:
diff changeset
    74
    public MonitoredObject getChild(String name);
02bb8761fcce Initial load
duke
parents:
diff changeset
    75
/**
02bb8761fcce Initial load
duke
parents:
diff changeset
    76
 * Gets all the Children registered under this instance of Monitored
02bb8761fcce Initial load
duke
parents:
diff changeset
    77
 * Object.
02bb8761fcce Initial load
duke
parents:
diff changeset
    78
 *
02bb8761fcce Initial load
duke
parents:
diff changeset
    79
 * @return Collection of immediate Children associated with this MonitoredObject.
02bb8761fcce Initial load
duke
parents:
diff changeset
    80
 */
02bb8761fcce Initial load
duke
parents:
diff changeset
    81
    public Collection getChildren();
02bb8761fcce Initial load
duke
parents:
diff changeset
    82
/**
02bb8761fcce Initial load
duke
parents:
diff changeset
    83
 * Sets the parent for this Monitored Object.
02bb8761fcce Initial load
duke
parents:
diff changeset
    84
 */
02bb8761fcce Initial load
duke
parents:
diff changeset
    85
    public void setParent( MonitoredObject m );
02bb8761fcce Initial load
duke
parents:
diff changeset
    86
/**
02bb8761fcce Initial load
duke
parents:
diff changeset
    87
 * There will be only one parent for an instance of MontoredObject, this
02bb8761fcce Initial load
duke
parents:
diff changeset
    88
 * call gets parent and returns null if the Monitored Object is the root.
02bb8761fcce Initial load
duke
parents:
diff changeset
    89
 *
02bb8761fcce Initial load
duke
parents:
diff changeset
    90
 * @return a MonitoredObject which is a Parent of this Monitored Object instance
02bb8761fcce Initial load
duke
parents:
diff changeset
    91
 */
02bb8761fcce Initial load
duke
parents:
diff changeset
    92
    public MonitoredObject getParent();
02bb8761fcce Initial load
duke
parents:
diff changeset
    93
02bb8761fcce Initial load
duke
parents:
diff changeset
    94
/**
02bb8761fcce Initial load
duke
parents:
diff changeset
    95
 * Adds the attribute with the given name.
02bb8761fcce Initial load
duke
parents:
diff changeset
    96
 *
02bb8761fcce Initial load
duke
parents:
diff changeset
    97
 * @param value is the MonitoredAttribute which will be set as one of the
02bb8761fcce Initial load
duke
parents:
diff changeset
    98
 * attribute of this MonitoredObject.
02bb8761fcce Initial load
duke
parents:
diff changeset
    99
 */
02bb8761fcce Initial load
duke
parents:
diff changeset
   100
    public void addAttribute(MonitoredAttribute value);
02bb8761fcce Initial load
duke
parents:
diff changeset
   101
/**
02bb8761fcce Initial load
duke
parents:
diff changeset
   102
 * Removes the attribute with the given name.
02bb8761fcce Initial load
duke
parents:
diff changeset
   103
 *
02bb8761fcce Initial load
duke
parents:
diff changeset
   104
 * @param name is the MonitoredAttribute name
02bb8761fcce Initial load
duke
parents:
diff changeset
   105
 */
02bb8761fcce Initial load
duke
parents:
diff changeset
   106
    public void removeAttribute(String name);
02bb8761fcce Initial load
duke
parents:
diff changeset
   107
02bb8761fcce Initial load
duke
parents:
diff changeset
   108
/**
02bb8761fcce Initial load
duke
parents:
diff changeset
   109
 * Gets the Monitored Object registered by the given name
02bb8761fcce Initial load
duke
parents:
diff changeset
   110
 *
02bb8761fcce Initial load
duke
parents:
diff changeset
   111
 * @return a MonitoredAttribute identified by the given name
02bb8761fcce Initial load
duke
parents:
diff changeset
   112
 * @param name of the attribute
02bb8761fcce Initial load
duke
parents:
diff changeset
   113
 */
02bb8761fcce Initial load
duke
parents:
diff changeset
   114
    public MonitoredAttribute getAttribute(String name);
02bb8761fcce Initial load
duke
parents:
diff changeset
   115
/**
02bb8761fcce Initial load
duke
parents:
diff changeset
   116
 * Gets all the Monitored Attributes for this Monitored Objects. It doesn't
02bb8761fcce Initial load
duke
parents:
diff changeset
   117
 * include the Child Monitored Object, that needs to be traversed using
02bb8761fcce Initial load
duke
parents:
diff changeset
   118
 * getChild() or getChildren() call.
02bb8761fcce Initial load
duke
parents:
diff changeset
   119
 *
02bb8761fcce Initial load
duke
parents:
diff changeset
   120
 * @return Collection of all the Attributes for this MonitoredObject
02bb8761fcce Initial load
duke
parents:
diff changeset
   121
 */
02bb8761fcce Initial load
duke
parents:
diff changeset
   122
    public Collection getAttributes();
02bb8761fcce Initial load
duke
parents:
diff changeset
   123
/**
02bb8761fcce Initial load
duke
parents:
diff changeset
   124
 * Clears the state of all the Monitored Attributes associated with the
02bb8761fcce Initial load
duke
parents:
diff changeset
   125
 * Monitored Object. It will also clear the state on all it's child
02bb8761fcce Initial load
duke
parents:
diff changeset
   126
 * Monitored Object. The call to clearState will be initiated from
02bb8761fcce Initial load
duke
parents:
diff changeset
   127
 * CORBAMBean.startMonitoring() call.
02bb8761fcce Initial load
duke
parents:
diff changeset
   128
 */
02bb8761fcce Initial load
duke
parents:
diff changeset
   129
    public void clearState();
02bb8761fcce Initial load
duke
parents:
diff changeset
   130
02bb8761fcce Initial load
duke
parents:
diff changeset
   131
} // end MonitoredObject