Please note that this documentation is not final and is subject to change.

Java™ Platform
Standard Ed. 7

DRAFT ea-b76

javax.management
Enum Impact

java.lang.Object
  extended by java.lang.Enum<Impact>
      extended by javax.management.Impact
All Implemented Interfaces:
Serializable, Comparable<Impact>

public enum Impact
extends Enum<Impact>

Defines the impact of an MBean operation, in particular whether it has an effect on the MBean or simply returns information. This enum is used in the @ManagedOperation annotation. Its getCode() method can be used to get an int suitable for use as the impact parameter in an MBeanOperationInfo constructor.


Enum Constant Summary
Enum Constant and Description
ACTION
          The operation is write-like: it has an effect but does not return any information from the MBean.
ACTION_INFO
          The operation is both read-like and write-like: it has an effect, and it also returns information from the MBean.
INFO
          The operation is read-like: it returns information but does not change any state.
UNKNOWN
          The impact of the operation is unknown or cannot be expressed using one of the other values.
 
Method Summary
Modifier and Type Method and Description
static Impact forCode(int code)
          Return the Impact value corresponding to the given int code.
 int getCode()
          The equivalent int code used by the MBeanOperationInfo constructors.
static Impact valueOf(String name)
          Returns the enum constant of this type with the specified name.
static Impact[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

INFO

public static final Impact INFO
The operation is read-like: it returns information but does not change any state.

See Also:
MBeanOperationInfo.INFO

ACTION

public static final Impact ACTION
The operation is write-like: it has an effect but does not return any information from the MBean.

See Also:
MBeanOperationInfo.ACTION

ACTION_INFO

public static final Impact ACTION_INFO
The operation is both read-like and write-like: it has an effect, and it also returns information from the MBean.

See Also:
MBeanOperationInfo.ACTION_INFO

UNKNOWN

public static final Impact UNKNOWN
The impact of the operation is unknown or cannot be expressed using one of the other values.

See Also:
MBeanOperationInfo.UNKNOWN
Method Detail

values

public static Impact[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (Impact c : Impact.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static Impact valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

getCode

public int getCode()
The equivalent int code used by the MBeanOperationInfo constructors.

Returns:
the int code.

forCode

public static Impact forCode(int code)
Return the Impact value corresponding to the given int code. The code is the value that would be used in an MBeanOperationInfo constructor.

Parameters:
code - the int code.
Returns:
an Impact value x such that code == x.getCode(), or Impact.UNKNOWN if there is no such value.

Java™ Platform
Standard Ed. 7

DRAFT ea-b76

Submit a bug or feature

Copyright 2009 Sun Microsystems, Inc. All Rights Reserved. Use is subject to license terms.