类 ListenerInfo

    • 构造器详细资料

      • 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()
      • getListenerClass

        public java.lang.Class getListenerClass()
      • getListener

        public java.util.EventListener getListener()
      • getParsedFilter

        public Filter getParsedFilter()
      • getFilter

        public java.lang.String getFilter()
        从接口复制的说明: ListenerHook.ListenerInfo
        Return the filter string with which the listener was added.
        指定者:
        getFilter 在接口中 ListenerHook.ListenerInfo
        返回:
        The filter string with which the listener was added. This may be null if the listener was added without a filter.
      • getSecurityContext

        public java.lang.Object getSecurityContext()
      • isRemoved

        public boolean isRemoved()
        从接口复制的说明: ListenerHook.ListenerInfo
        Return the state of the listener for this addition and removal life cycle. Initially this method will return 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 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 在接口中 ListenerHook.ListenerInfo
        返回:
        false if the listener has not been been removed, true otherwise.
      • equals

        public boolean equals​(java.lang.Object obj)
        从接口复制的说明: ListenerHook.ListenerInfo
        Compares this ListenerInfo 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 在接口中 ListenerHook.ListenerInfo
        覆盖:
        equals 在类中 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.