Package org.apache.felix.http.base.internal.runtime

# 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)`
Constructor
`ListenerInfo(org.osgi.framework.ServiceReference<EventListener> ref, Set<String> types, String[] dtos)`
Constructor

## Method Summary

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 String`
`getType()`
Get the type represented by this info
`boolean`
`isListenerType(@NotNull String className)`
Is this listener of the required type?
`boolean`
`isSame(AbstractInfo<EventListener> other)`
Compare two info objects
`boolean`
`isValid()`

### 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`

### Methods inherited from class java.lang.Object

`clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### 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 reference
  `types` - The listener types
  `dtos` - Optional dto types

## Method Details

### isValid

public boolean isValid()

Overrides:
  `isValid` in class `WhiteboardServiceInfo<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:
  `true` If 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: `AbstractInfo`
Get the type represented by this info

Specified by:
  `getType` in class `AbstractInfo<EventListener>`
Returns:
  The type

### isSame

public boolean isSame(AbstractInfo<EventListener> other)
Description copied from class: `AbstractInfo`
Compare two info objects

Overrides:
  `isSame` in class `WhiteboardServiceInfo<EventListener>`
Parameters:
  `other` - The other info object
Returns:
  `true` if the objects are the same