Package org.osgi.service.useradmin
Class UserAdminEvent
java.lang.Object
org.osgi.service.useradmin.UserAdminEvent
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.
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
ARole
object has been modified.static final int
ARole
object has been created.static final int
ARole
object has been removed. -
Constructor Summary
ConstructorDescriptionUserAdminEvent
(ServiceReference<UserAdmin> ref, int type, Role role) Constructs aUserAdminEvent
object from the givenServiceReference
object, event type, andRole
object. -
Method Summary
-
Field Details
-
ROLE_CREATED
public static final int ROLE_CREATEDARole
object has been created.The value of
ROLE_CREATED
is 0x00000001.- See Also:
-
ROLE_CHANGED
public static final int ROLE_CHANGEDARole
object has been modified.The value of
ROLE_CHANGED
is 0x00000002.- See Also:
-
ROLE_REMOVED
public static final int ROLE_REMOVEDARole
object has been removed.The value of
ROLE_REMOVED
is 0x00000004.- See Also:
-
-
Constructor Details
-
UserAdminEvent
Constructs aUserAdminEvent
object from the givenServiceReference
object, event type, andRole
object.- Parameters:
ref
- TheServiceReference
object of the User Admin service that generated this event.type
- The event type.role
- TheRole
object on which this event occurred.
-
-
Method Details
-
getServiceReference
Gets theServiceReference
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, andROLE_REMOVED
type.- Returns:
- The event type.
-
getRole
Gets theRole
object this event was generated for.- Returns:
- The
Role
object this event was generated for.
-