Path: blob/master/test/jdk/javax/management/remote/mandatory/subjectDelegation/SimpleStandardMBean.java
41159 views
/*1* Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.2* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3*4* This code is free software; you can redistribute it and/or modify it5* under the terms of the GNU General Public License version 2 only, as6* published by the Free Software Foundation.7*8* This code is distributed in the hope that it will be useful, but WITHOUT9* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or10* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License11* version 2 for more details (a copy is included in the LICENSE file that12* accompanied this code).13*14* You should have received a copy of the GNU General Public License version15* 2 along with this work; if not, write to the Free Software Foundation,16* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.17*18* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA19* or visit www.oracle.com if you need additional information or have any20* questions.21*/2223/**24* This is the management interface explicitly defined for the25* "SimpleStandard" standard MBean.26* The "SimpleStandard" standard MBean implements this interface27* in order to be manageable through a JMX agent.28*29* The "SimpleStandardMBean" interface shows how to expose for management:30* - a read/write attribute (named "State") through its getter and setter31* methods,32* - a read-only attribute (named "NbChanges") through its getter method,33* - an operation (named "reset").34*/35public interface SimpleStandardMBean {3637/**38* Getter: set the "State" attribute of the "SimpleStandard" standard39* MBean.40*41* @return the current value of the "State" attribute.42*/43public String getState();4445/**46* Setter: set the "State" attribute of the "SimpleStandard" standard47* MBean.48*49* @param <VAR>s</VAR> the new value of the "State" attribute.50*/51public void setState(String s);5253/**54* Getter: get the "NbChanges" attribute of the "SimpleStandard" standard55* MBean.56*57* @return the current value of the "NbChanges" attribute.58*/59public int getNbChanges();6061/**62* Operation: reset to their initial values the "State" and "NbChanges"63* attributes of the "SimpleStandard" standard MBean.64*/65public void reset();66}676869