类 ListenerInfo
- java.lang.Object
-
- org.apache.felix.framework.util.ListenerInfo
-
- 所有已实现的接口:
ListenerHook.ListenerInfo
public class ListenerInfo extends java.lang.Object implements ListenerHook.ListenerInfo
-
-
构造器概要
构造器 构造器 说明 ListenerInfo(ListenerInfo info, boolean removed)ListenerInfo(Bundle bundle, BundleContext context, java.lang.Class listenerClass, java.util.EventListener listener, Filter filter, java.lang.Object acc, boolean removed)
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 booleanequals(java.lang.Object obj)Compares thisListenerInfoto anotherListenerInfo.BundlegetBundle()BundleContextgetBundleContext()Return the context of the bundle which added the listener.java.lang.StringgetFilter()Return the filter string with which the listener was added.java.util.EventListenergetListener()java.lang.ClassgetListenerClass()FiltergetParsedFilter()java.lang.ObjectgetSecurityContext()inthashCode()Returns the hash code for thisListenerInfo.booleanisRemoved()Return the state of the listener for this addition and removal life cycle.
-
-
-
构造器详细资料
-
ListenerInfo
public ListenerInfo(Bundle bundle, BundleContext context, java.lang.Class listenerClass, java.util.EventListener listener, Filter filter, java.lang.Object acc, boolean removed)
-
ListenerInfo
public ListenerInfo(ListenerInfo info, boolean removed)
-
-
方法详细资料
-
getBundle
public Bundle getBundle()
-
getBundleContext
public BundleContext getBundleContext()
从接口复制的说明:ListenerHook.ListenerInfoReturn the context of the bundle which added the listener.- 指定者:
getBundleContext在接口中ListenerHook.ListenerInfo- 返回:
- The context of the bundle which added the listener.
-
getListenerClass
public java.lang.Class getListenerClass()
-
getListener
public java.util.EventListener getListener()
-
getParsedFilter
public Filter getParsedFilter()
-
getFilter
public java.lang.String getFilter()
从接口复制的说明:ListenerHook.ListenerInfoReturn the filter string with which the listener was added.- 指定者:
getFilter在接口中ListenerHook.ListenerInfo- 返回:
- The filter string with which the listener was added. This may
be
nullif the listener was added without a filter.
-
getSecurityContext
public java.lang.Object getSecurityContext()
-
isRemoved
public boolean isRemoved()
从接口复制的说明:ListenerHook.ListenerInfoReturn the state of the listener for this addition and removal life cycle. Initially this method will returnfalseindicating the listener has been added but has not been removed. After the listener has been removed, this method must always returntrue.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. BecauseListenerHooks 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在接口中ListenerHook.ListenerInfo- 返回:
falseif the listener has not been been removed,trueotherwise.
-
equals
public boolean equals(java.lang.Object obj)
从接口复制的说明:ListenerHook.ListenerInfoCompares thisListenerInfoto anotherListenerInfo. TwoListenerInfos 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 differentListenerInfowhich is not equal to thisListenerInfo.- 指定者:
equals在接口中ListenerHook.ListenerInfo- 覆盖:
equals在类中java.lang.Object- 参数:
obj- The object to compare against thisListenerInfo.- 返回:
trueif the other object is aListenerInfoobject and both objects refer to the same listener for a given addition and removal life cycle.
-
hashCode
public int hashCode()
从接口复制的说明:ListenerHook.ListenerInfoReturns the hash code for thisListenerInfo.- 指定者:
hashCode在接口中ListenerHook.ListenerInfo- 覆盖:
hashCode在类中java.lang.Object- 返回:
- The hash code of this
ListenerInfo.
-
-