Software Defined Networking
1828385 Members
4190 Online
109977 Solutions
New Discussion

Extending FlowTrk class

 
HansChristian
Occasional Contributor

Extending FlowTrk class

Hello,

is there a way I can extendcom.hp.of.ctl.flow.impl.FlowTrk?

My HP-specific dependencies are: com.hp.sdn.sdn-of-lib, com.hp.sdn.sdn-of-ctl, com.hp.sdn.sdn-ctl-api
com.hp.of.ctl.flow.impl.FlowTrk is included in dependency com.hp.sdn.sdn-of-ctl

But whenever I do something like this:  public class MyFlowTrk extends FlowTrk { ... }
I get the following error: An Import-Package could not be resolved. Resolver error data <Import-Package: com.hp.of.ctl.flow.impl; version="0.0.0">. Caused by missing constraint in bundle

What am I doing wrong?

Thanks for your help!

1 REPLY 1
ShaunWackerly
HPE Pro

Re: Extending FlowTrk class

Hi HansChristian,

You're hitting this issue because FlowTrk is in a .impl package and those packages are not exposed via OSGI. Such classes can be extended if your implementation were within the same bundle (com.hp.sdn.sdn-of-ctl), but unfortunately it is outside of the bundle and therefore cannot reference any classes in a .impl package.

If you were aiming to provide a different FlowTracker implementation, then you could still do that and have it get used by OSGI, but you couldn't extend the HPE implementation (yours would need to start from scratch).

If you can let us know a little more about what you're trying to accomplish, maybe we could offer some other options?

Shaun

I am an HPE Employee