Class ListenerInfo
- java.lang.Object
-
- org.apache.felix.http.base.internal.runtime.AbstractInfo<T>
-
- org.apache.felix.http.base.internal.runtime.WhiteboardServiceInfo<EventListener>
-
- org.apache.felix.http.base.internal.runtime.ListenerInfo
-
- All Implemented Interfaces:
Comparable<AbstractInfo<EventListener>>
public class ListenerInfo extends WhiteboardServiceInfo<EventListener>
Info object for registered listeners.
-
-
Constructor Summary
Constructors Constructor Description ListenerInfo(org.osgi.framework.ServiceReference<EventListener> ref)ConstructorListenerInfo(org.osgi.framework.ServiceReference<EventListener> ref, Set<String> types, String[] dtos)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @NotNull String[]getDTOListenerTypes()The types as reported through the DTOs@NotNull Set<String>getListenerTypes()Get the registered listener types@NotNull StringgetType()Get the type represented by this infobooleanisListenerType(@NotNull String className)Is this listener of the required type?booleanisValid()-
Methods inherited from class org.apache.felix.http.base.internal.runtime.WhiteboardServiceInfo
getContextSelection, getContextSelectionFilter
-
Methods inherited from class org.apache.felix.http.base.internal.runtime.AbstractInfo
compareTo, equals, getBooleanProperty, getInitParams, getRanking, getService, getServiceId, getServiceReference, getStringArrayProperty, getStringProperty, getTarget, hashCode, isEmpty, isEmpty, ungetService
-
-
-
-
Constructor Detail
-
ListenerInfo
public ListenerInfo(org.osgi.framework.ServiceReference<EventListener> ref)
Constructor- Parameters:
ref- The service reference
-
ListenerInfo
public ListenerInfo(org.osgi.framework.ServiceReference<EventListener> ref, Set<String> types, String[] dtos)
Constructor- Parameters:
ref- The service referencedtoTypes- Optional dto typestypes- The listener types
-
-
Method Detail
-
isValid
public boolean isValid()
- Overrides:
isValidin classWhiteboardServiceInfo<EventListener>
-
getDTOListenerTypes
@NotNull public @NotNull String[] getDTOListenerTypes()
The types as reported through the DTOs- Returns:
- Array of types
-
isListenerType
public boolean isListenerType(@NotNull @NotNull String className)Is this listener of the required type?- Parameters:
className- The listener type- Returns:
trueIf the listener should be registered as that type
-
getListenerTypes
@NotNull public @NotNull Set<String> getListenerTypes()
Get the registered listener types- Returns:
- The set of types
-
getType
@NotNull public @NotNull String getType()
Description copied from class:AbstractInfoGet the type represented by this info- Specified by:
getTypein classAbstractInfo<EventListener>- Returns:
- The type
-
-