[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[p2-dev] Wrap SimpleArtifactRepository

I would like to have some code which monitors (some) calls made to the simple artifact repository.

My initial plan was to implement a class WrappedSimpleArtifactRepository which has a single constructor to which the p2 simple artifact repository is passed in.

Then there would be a factory WrappedSimpleArtifactRepositoryFactory which creates or loads the simple artifact repository and then wraps it into the in WrappedSimpleArtifactRepository.

If I am not mistaken there is however no way to make WrappedSimpleArtifactRepositoryFactory be used instead of SimpleArtifactRepositoryFactory.?
If there is no way is the envisioned way to provide my own IArtifactRepositoryManager service which then can wrap the simple artifact repository? How to ensure that this is done early enough?

Does WrappedSimpleArtifactRepository have to implement equals and hashCode perhaps mirroring the implementation in AbstractArtifactRepository?