Class UserAdminEvent

java.lang.Object
org.osgi.service.useradmin.UserAdminEvent

public class UserAdminEvent extends Object
Role change event.

UserAdminEvent objects are delivered asynchronously to any UserAdminListener objects when a change occurs in any of the Role objects managed by a User Admin service.

A type code is used to identify the event. The following event types are defined: ROLE_CREATED type, ROLE_CHANGED type, and ROLE_REMOVED type. Additional event types may be defined in the future.

Author:
$Id: 2406ed14d59d91f340cc918e851d8ef89c901cb0 $
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    A Role object has been modified.
    static final int
    A Role object has been created.
    static final int
    A Role object has been removed.
  • Constructor Summary

    Constructors
    Constructor
    Description
    UserAdminEvent(org.osgi.framework.ServiceReference<UserAdmin> ref, int type, Role role)
    Constructs a UserAdminEvent object from the given ServiceReference object, event type, and Role object.
  • Method Summary

    Modifier and Type
    Method
    Description
    Gets the Role object this event was generated for.
    org.osgi.framework.ServiceReference<UserAdmin>
    Gets the ServiceReference object of the User Admin service that generated this event.
    int
    Returns the type of this event.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • ROLE_CREATED

      public static final int ROLE_CREATED
      A Role object has been created.

      The value of ROLE_CREATED is 0x00000001.

      See Also:
    • ROLE_CHANGED

      public static final int ROLE_CHANGED
      A Role object has been modified.

      The value of ROLE_CHANGED is 0x00000002.

      See Also:
    • ROLE_REMOVED

      public static final int ROLE_REMOVED
      A Role object has been removed.

      The value of ROLE_REMOVED is 0x00000004.

      See Also:
  • Constructor Details

    • UserAdminEvent

      public UserAdminEvent(org.osgi.framework.ServiceReference<UserAdmin> ref, int type, Role role)
      Constructs a UserAdminEvent object from the given ServiceReference object, event type, and Role object.
      Parameters:
      ref - The ServiceReference object of the User Admin service that generated this event.
      type - The event type.
      role - The Role object on which this event occurred.
  • Method Details

    • getServiceReference

      public org.osgi.framework.ServiceReference<UserAdmin> getServiceReference()
      Gets the ServiceReference object of the User Admin service that generated this event.
      Returns:
      The User Admin service's ServiceReference object.
    • getType

      public int getType()
      Returns the type of this event.

      The type values are ROLE_CREATED type, ROLE_CHANGED type, and ROLE_REMOVED type.

      Returns:
      The event type.
    • getRole

      public Role getRole()
      Gets the Role object this event was generated for.
      Returns:
      The Role object this event was generated for.