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
FieldsModifier and TypeFieldDescriptionstatic final intARoleobject has been modified.static final intARoleobject has been created.static final intARoleobject has been removed. -
Constructor Summary
ConstructorsConstructorDescriptionUserAdminEvent(ServiceReference<UserAdmin> ref, int type, Role role) Constructs aUserAdminEventobject from the givenServiceReferenceobject, event type, andRoleobject. -
Method Summary
-
Field Details
-
ROLE_CREATED
public static final int ROLE_CREATEDARoleobject has been created.The value of
ROLE_CREATEDis 0x00000001.- See Also:
-
ROLE_CHANGED
public static final int ROLE_CHANGEDARoleobject has been modified.The value of
ROLE_CHANGEDis 0x00000002.- See Also:
-
ROLE_REMOVED
public static final int ROLE_REMOVEDARoleobject has been removed.The value of
ROLE_REMOVEDis 0x00000004.- See Also:
-
-
Constructor Details
-
UserAdminEvent
Constructs aUserAdminEventobject from the givenServiceReferenceobject, event type, andRoleobject.- Parameters:
ref- TheServiceReferenceobject of the User Admin service that generated this event.type- The event type.role- TheRoleobject on which this event occurred.
-
-
Method Details
-
getServiceReference
Gets theServiceReferenceobject of the User Admin service that generated this event.- Returns:
- The User Admin service's
ServiceReferenceobject.
-
getType
public int getType()Returns the type of this event.The type values are
ROLE_CREATEDtype,ROLE_CHANGEDtype, andROLE_REMOVEDtype.- Returns:
- The event type.
-
getRole
Gets theRoleobject this event was generated for.- Returns:
- The
Roleobject this event was generated for.
-