SI
- the type of ServiceInfo
that this fallback creator will returnSD
- the type of service definition data that this creator will consumepublic abstract class FallbackServiceInfoCreator<SI extends ServiceInfo,SD> extends Object implements ServiceInfoCreator<SI,SD>
ServiceInfoCreator
that can
accept service data.
A fallback mechanism is needed, for example, when a services is bound to an app, but there is no ServiceInfoCreator
implemented to handle it or the ServiceInfoCreator
implementation
for it isn't placed properly to be picked up by scanning. By having a fallback mechanism, we can
extract as much info from the service data as possible (minimally, the service id) and issue a warning.Constructor and Description |
---|
FallbackServiceInfoCreator() |
Modifier and Type | Method and Description |
---|---|
boolean |
accept(SD serviceData) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
createServiceInfo
public final boolean accept(SD serviceData)
accept
in interface ServiceInfoCreator<SI extends ServiceInfo,SD>