Top Description Fields Constructors Methods
org.osgi.service.useradmin

public Class UserAdminEvent

extends Object
Class Inheritance
Imports
org.osgi.framework.ServiceReference

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
UserAdmin, UserAdminListener

Field Summary

Modifier and TypeField and Description
private ServiceReference<UserAdmin>
private Role
public static final int
ROLE_CHANGED

A Role object has been modified.

public static final int
ROLE_CREATED

A Role object has been created.

public static final int
ROLE_REMOVED

A Role object has been removed.

private int

Constructor Summary

AccessConstructor and Description
public
UserAdminEvent(ServiceReference<UserAdmin>
The ServiceReference object of the User Admin service that generated this event.
ref
,
int
The event type.
type
,
Role
The Role object on which this event occurred.
role
)

Constructs a UserAdminEvent object from the given ServiceReference object, event type, and Role object.

Method Summary

Modifier and TypeMethod and Description
public Role

Returns:

The Role object this event was generated for.
getRole
()

Gets the Role object this event was generated for.

public ServiceReference<UserAdmin>

Returns:

The User Admin service's ServiceReference object.
getServiceReference
()

Gets the ServiceReference object of the User Admin service that generated this event.

public int

Returns:

The event type.
getType
()

Returns the type of this event.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

refback to summary
private ServiceReference<UserAdmin> ref
roleback to summary
private Role role
ROLE_CHANGEDback to summary
public static final int ROLE_CHANGED

A Role object has been modified.

The value of ROLE_CHANGED is 0x00000002.

ROLE_CREATEDback to summary
public static final int ROLE_CREATED

A Role object has been created.

The value of ROLE_CREATED is 0x00000001.

ROLE_REMOVEDback to summary
public static final int ROLE_REMOVED

A Role object has been removed.

The value of ROLE_REMOVED is 0x00000004.

typeback to summary
private int type

Constructor Detail

UserAdminEventback to summary
public UserAdminEvent(ServiceReference<UserAdmin> ref, int type, Role role)

Constructs a UserAdminEvent object from the given ServiceReference object, event type, and Role object.

Parameters
ref:ServiceReference<UserAdmin>

The ServiceReference object of the User Admin service that generated this event.

type:int

The event type.

role:Role

The Role object on which this event occurred.

Method Detail

getRoleback to summary
public Role getRole()

Gets the Role object this event was generated for.

Returns:Role

The Role object this event was generated for.

getServiceReferenceback to summary
public ServiceReference<UserAdmin> getServiceReference()

Gets the ServiceReference object of the User Admin service that generated this event.

Returns:ServiceReference<UserAdmin>

The User Admin service's ServiceReference object.

getTypeback to summary
public int getType()

Returns the type of this event.

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

Returns:int

The event type.