|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.felix.framework.util.ListenerInfo
public class ListenerInfo
Constructor Summary | |
---|---|
ListenerInfo(Bundle bundle,
BundleContext context,
java.lang.Class listenerClass,
java.util.EventListener listener,
Filter filter,
java.lang.Object acc,
boolean removed)
|
|
ListenerInfo(ListenerInfo info,
boolean removed)
|
Method Summary | |
---|---|
boolean |
equals(java.lang.Object obj)
Compares this ListenerInfo to another
ListenerInfo . |
Bundle |
getBundle()
|
BundleContext |
getBundleContext()
Return the context of the bundle which added the listener. |
java.lang.String |
getFilter()
Return the filter string with which the listener was added. |
java.util.EventListener |
getListener()
|
java.lang.Class |
getListenerClass()
|
Filter |
getParsedFilter()
|
java.lang.Object |
getSecurityContext()
|
int |
hashCode()
Returns the hash code for this ListenerInfo . |
boolean |
isRemoved()
Return the state of the listener for this addition and removal life cycle. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ListenerInfo(Bundle bundle, BundleContext context, java.lang.Class listenerClass, java.util.EventListener listener, Filter filter, java.lang.Object acc, boolean removed)
public ListenerInfo(ListenerInfo info, boolean removed)
Method Detail |
---|
public Bundle getBundle()
public BundleContext getBundleContext()
ListenerHook.ListenerInfo
getBundleContext
in interface ListenerHook.ListenerInfo
public java.lang.Class getListenerClass()
public java.util.EventListener getListener()
public Filter getParsedFilter()
public java.lang.String getFilter()
ListenerHook.ListenerInfo
getFilter
in interface ListenerHook.ListenerInfo
null
if the listener was added without a
filter.public java.lang.Object getSecurityContext()
public boolean isRemoved()
ListenerHook.ListenerInfo
false
indicating the listener has been added but has not been removed.
After the listener has been removed, this method must always return
true
.
There is an extremely rare case in which removed notification to
ListenerHook
s can be made before added notification if two
threads are racing to add and remove the same service listener.
Because ListenerHook
s are called synchronously during service
listener addition and removal, the Framework cannot guarantee
in-order delivery of added and removed notification for a given
service listener. This method can be used to detect this rare
occurrence.
isRemoved
in interface ListenerHook.ListenerInfo
false
if the listener has not been been removed,
true
otherwise.public boolean equals(java.lang.Object obj)
ListenerHook.ListenerInfo
ListenerInfo
to another
ListenerInfo
. Two ListenerInfo
s are equals
if they refer to the same listener for a given addition and removal
life cycle. If the same listener is added again, it must have a
different ListenerInfo
which is not equal to this
ListenerInfo
.
equals
in interface ListenerHook.ListenerInfo
equals
in class java.lang.Object
obj
- The object to compare against this
ListenerInfo
.
true
if the other object is a
ListenerInfo
object and both objects refer to
the same listener for a given addition and removal life
cycle.public int hashCode()
ListenerHook.ListenerInfo
ListenerInfo
.
hashCode
in interface ListenerHook.ListenerInfo
hashCode
in class java.lang.Object
ListenerInfo
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |