public class ListenerInfo extends Object implements ListenerHook.ListenerInfo
| Constructor and Description |
|---|
ListenerInfo(Bundle bundle,
BundleContext context,
Class listenerClass,
EventListener listener,
Filter filter,
Object acc,
boolean removed) |
ListenerInfo(ListenerInfo info,
boolean removed) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj)
Compares this
ListenerInfo to another ListenerInfo. |
Bundle |
getBundle() |
BundleContext |
getBundleContext()
Return the context of the bundle which added the listener.
|
String |
getFilter()
Return the filter string with which the listener was added.
|
EventListener |
getListener() |
Class |
getListenerClass() |
Filter |
getParsedFilter() |
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.
|
public ListenerInfo(Bundle bundle, BundleContext context, Class listenerClass, EventListener listener, Filter filter, Object acc, boolean removed)
public ListenerInfo(ListenerInfo info, boolean removed)
public Bundle getBundle()
public BundleContext getBundleContext()
ListenerHook.ListenerInfogetBundleContext in interface ListenerHook.ListenerInfopublic Class getListenerClass()
public EventListener getListener()
public Filter getParsedFilter()
public String getFilter()
ListenerHook.ListenerInfogetFilter in interface ListenerHook.ListenerInfonull if the listener was added without a filter.public Object getSecurityContext()
public boolean isRemoved()
ListenerHook.ListenerInfofalse 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
ListenerHooks can be made before added notification if two
threads are racing to add and remove the same service listener.
Because ListenerHooks 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.ListenerInfofalse if the listener has not been removed,
true otherwise.public boolean equals(Object obj)
ListenerHook.ListenerInfoListenerInfo to another ListenerInfo.
Two ListenerInfos 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.ListenerInfoequals in class Objectobj - 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.ListenerInfoListenerInfo.hashCode in interface ListenerHook.ListenerInfohashCode in class ObjectListenerInfo.Copyright © 2006–2021 The Apache Software Foundation. All rights reserved.