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>>
Info object for registered listeners.
-
Constructor Summary
ConstructorsConstructorDescriptionListenerInfo(org.osgi.framework.ServiceReference<EventListener> ref) ConstructorListenerInfo(org.osgi.framework.ServiceReference<EventListener> ref, Set<String> types, String[] dtos) Constructor -
Method Summary
Modifier and TypeMethodDescription@NotNull String[]The types as reported through the DTOsGet the registered listener types@NotNull StringgetType()Get the type represented by this infobooleanisListenerType(@NotNull String className) Is this listener of the required type?booleanisSame(AbstractInfo<EventListener> other) Compare two info objectsbooleanisValid()Methods inherited from class org.apache.felix.http.base.internal.runtime.WhiteboardServiceInfo
getContextSelection, getContextSelectionFilterMethods 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 Details
-
ListenerInfo
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 referencetypes- The listener typesdtos- Optional dto types
-
-
Method Details
-
isValid
public boolean isValid()- Overrides:
isValidin classWhiteboardServiceInfo<EventListener>
-
getDTOListenerTypes
The types as reported through the DTOs- Returns:
- Array of types
-
isListenerType
Is this listener of the required type?- Parameters:
className- The listener type- Returns:
trueIf the listener should be registered as that type
-
getListenerTypes
Get the registered listener types- Returns:
- The set of types
-
getType
Description copied from class:AbstractInfoGet the type represented by this info- Specified by:
getTypein classAbstractInfo<EventListener>- Returns:
- The type
-
isSame
Description copied from class:AbstractInfoCompare two info objects- Overrides:
isSamein classWhiteboardServiceInfo<EventListener>- Parameters:
other- The other info object- Returns:
trueif the objects are the same
-