public class UserAdminEvent
extends java.lang.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.
UserAdmin
,
UserAdminListener
Modifier and Type | Field and Description |
---|---|
static int |
ROLE_CHANGED
A
Role object has been modified. |
static int |
ROLE_CREATED
A
Role object has been created. |
static int |
ROLE_REMOVED
A
Role object has been removed. |
Constructor and Description |
---|
UserAdminEvent(ServiceReference<UserAdmin> ref,
int type,
Role role)
Constructs a
UserAdminEvent object from the given
ServiceReference object, event type, and Role object. |
Modifier and Type | Method and Description |
---|---|
Role |
getRole()
Gets the
Role object this event was generated for. |
ServiceReference<UserAdmin> |
getServiceReference()
Gets the
ServiceReference object of the User Admin service that
generated this event. |
int |
getType()
Returns the type of this event.
|
public static final int ROLE_CREATED
Role
object has been created.
The value of ROLE_CREATED
is 0x00000001.
public static final int ROLE_CHANGED
Role
object has been modified.
The value of ROLE_CHANGED
is 0x00000002.
public static final int ROLE_REMOVED
Role
object has been removed.
The value of ROLE_REMOVED
is 0x00000004.
public UserAdminEvent(ServiceReference<UserAdmin> ref, int type, Role role)
UserAdminEvent
object from the given
ServiceReference
object, event type, and Role
object.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.public ServiceReference<UserAdmin> getServiceReference()
ServiceReference
object of the User Admin service that
generated this event.ServiceReference
object.public int getType()
The type values are ROLE_CREATED
type, ROLE_CHANGED
type, and ROLE_REMOVED
type.
public Role getRole()
Role
object this event was generated for.Role
object this event was generated for.Copyright © OSGi Alliance (2000, 2018). All Rights Reserved. Licensed under the OSGi Specification License, Version 2.0