RoleStatus (Java SE 26 & JDK 26)
Description: declaration: module: java.management, package: javax.management.relation, class: RoleStatus
Keywords: javax.management.relation.RoleStatus class

# Class RoleStatus

java.lang.Object
javax.management.relation.RoleStatus

public class RoleStatus extends Object
This class describes the various problems which can be encountered when accessing a role.

Since:
  1.5

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final int`
  `LESS_THAN_MIN_ROLE_DEGREE`
  Problem type when trying to set a role value with less ObjectNames than the minimum expected cardinality.
  `static final int`
  `MORE_THAN_MAX_ROLE_DEGREE`
  Problem type when trying to set a role value with more ObjectNames than the maximum expected cardinality.
  `static final int`
  `NO_ROLE_WITH_NAME`
  Problem type when trying to access an unknown role.
  `static final int`
  `REF_MBEAN_NOT_REGISTERED`
  Problem type when trying to set a role value including the ObjectName of a MBean not registered in the MBean Server.
  `static final int`
  `REF_MBEAN_OF_INCORRECT_CLASS`
  Problem type when trying to set a role value including the ObjectName of a MBean not of the class expected for that role.
  `static final int`
  `ROLE_NOT_READABLE`
  Problem type when trying to read a non-readable attribute.
  `static final int`
  `ROLE_NOT_WRITABLE`
  Problem type when trying to update a non-writable attribute.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `RoleStatus()`
  Deprecated, for removal: This API element is subject to removal in a future version.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static boolean`
  `isRoleStatus(int status)`
  Returns true if given value corresponds to a known role status, false otherwise.

  ### Methods declared in class Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`
  Modifier and Type
  Method
  Description
  `protected Object`
  `clone()`
  Creates and returns a copy of this object.
  `boolean`
  `equals(Object obj)`
  Indicates whether some other object is "equal to" this one.
  `protected void`
  `finalize()`
  Deprecated, for removal: This API element is subject to removal in a future version.
  Finalization is deprecated and subject to removal in a future release.
  `final Class<?>`
  `getClass()`
  Returns the runtime class of this `Object`.
  `int`
  `hashCode()`
  Returns a hash code value for this object.
  `final void`
  `notify()`
  Wakes up a single thread that is waiting on this object's monitor.
  `final void`
  `notifyAll()`
  Wakes up all threads that are waiting on this object's monitor.
  `String`
  `toString()`
  Returns a string representation of the object.
  `final void`
  `wait()`
  Causes the current thread to wait until it is awakened, typically by being notified or interrupted.
  `final void`
  `wait(long timeoutMillis)`
  Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.
  `final void`
  `wait(long timeoutMillis, int nanos)`
  Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.

- ## Field Details

  - ### NO_ROLE_WITH_NAME

    public static final int NO_ROLE_WITH_NAME
    Problem type when trying to access an unknown role.
    See Also:
      - Constant Field Values

  - ### ROLE_NOT_READABLE

    public static final int ROLE_NOT_READABLE
    Problem type when trying to read a non-readable attribute.
    See Also:
      - Constant Field Values

  - ### ROLE_NOT_WRITABLE

    public static final int ROLE_NOT_WRITABLE
    Problem type when trying to update a non-writable attribute.
    See Also:
      - Constant Field Values

  - ### LESS_THAN_MIN_ROLE_DEGREE

    public static final int LESS_THAN_MIN_ROLE_DEGREE
    Problem type when trying to set a role value with less ObjectNames than the minimum expected cardinality.
    See Also:
      - Constant Field Values

  - ### MORE_THAN_MAX_ROLE_DEGREE

    public static final int MORE_THAN_MAX_ROLE_DEGREE
    Problem type when trying to set a role value with more ObjectNames than the maximum expected cardinality.
    See Also:
      - Constant Field Values

  - ### REF_MBEAN_OF_INCORRECT_CLASS

    public static final int REF_MBEAN_OF_INCORRECT_CLASS
    Problem type when trying to set a role value including the ObjectName of a MBean not of the class expected for that role.
    See Also:
      - Constant Field Values

  - ### REF_MBEAN_NOT_REGISTERED

    public static final int REF_MBEAN_NOT_REGISTERED
    Problem type when trying to set a role value including the ObjectName of a MBean not registered in the MBean Server.
    See Also:
      - Constant Field Values

- ## Constructor Details

  - ### RoleStatus

    @Deprecated(since="16", forRemoval=true) public RoleStatus()
    Deprecated, for removal: This API element is subject to removal in a future version.
    Do not call.

- ## Method Details

  - ### isRoleStatus

    public static boolean isRoleStatus(int status)
    Returns true if given value corresponds to a known role status, false otherwise.
    Parameters:
      `status` - a status code.
    Returns:
      true if this value is a known role status.