java.beans.beancontext

Class BeanContextServiceRevokedEvent

public class BeanContextServiceRevokedEvent extends BeanContextEvent

Event fired when services are revoked from a BeanContextServices.

Since: JDK1.2

See Also: BeanContextServiceRevokedListener

Field Summary
protected ClassserviceClass
The Class representing the service which is now available.
Constructor Summary
BeanContextServiceRevokedEvent(BeanContextServices services, Class serviceClass, boolean revokeNow)
Create a new service revoked event.
Method Summary
ClassgetServiceClass()
Get the revoked service class.
BeanContextServicesgetSourceAsBeanContextServices()
Get the BeanContextServices through which the service was available.
booleanisCurrentServiceInvalidNow()
Tell whether current instances of the revoked service are usable or not.
booleanisServiceClass(Class c)
Tell whether the revoked service class is the same as the specified class.

Field Detail

serviceClass

protected Class serviceClass
The Class representing the service which is now available.

Constructor Detail

BeanContextServiceRevokedEvent

public BeanContextServiceRevokedEvent(BeanContextServices services, Class serviceClass, boolean revokeNow)
Create a new service revoked event.

Parameters: services the BeanContextServices through which the service was available. This is also the source of the event. serviceClass the service class that is now revoked. revokeNow whether the revocation is immediate for all classes or just a suggestion.

Method Detail

getServiceClass

public Class getServiceClass()
Get the revoked service class.

Returns: the service class.

getSourceAsBeanContextServices

public BeanContextServices getSourceAsBeanContextServices()
Get the BeanContextServices through which the service was available.

Returns: the BeanContextServices through which the service was available.

isCurrentServiceInvalidNow

public boolean isCurrentServiceInvalidNow()
Tell whether current instances of the revoked service are usable or not. This is determined by whether the service was revoked immediately.

Returns: whether current instances of the revoked service are usable.

isServiceClass

public boolean isServiceClass(Class c)
Tell whether the revoked service class is the same as the specified class. Identical to getServiceClass().equals(c).

Parameters: c the class to compare.

Returns: whether the clases are equal.