LispMappingService.java implements a binding aware consumer service. According to the MD-SAL FAQ A1 a plugin can be both a consumer and provider. I want to add provider capabilities to this service, in order to be able to add nodes into the data store based on current LISP registration data and send notifications when certain types of changes occur.
I tried adding provider capabilities to
LispMappingService first by adding "
extends AbstractBindingAwareProvider" to the class declaration. However, this gives me the error: "
onSessionInitialized(ConsumerContext) in LispMappingService cannot override onSessionInitialized(ConsumerContext) in AbstractBindingAwareProvider". And I need both
Next I tried adding
implements BindingAwareProvider. I get no errors here, but
onSessionInitiated(ProviderContext) is not called, so I cannot get a session reference.
Right now I only see two potential solutions:
- Create a new bundle for the provider service part
- Use the southbound plugin, which already has a ProviderContext
I don't like these approaches, because most of the logic I need resides in the mapping service implementation, and the inventory service fits there best.
Anything I can do to get a ProviderContext properly in