saker.nest Documentation TaskDoc JavaDoc Packages
public interface DependencyResolutionLogger<BC>
Interface accepting dependency resolution events.

This interface is used with the dependency resolution algorithm used in DependencyUtils.satisfyDependencyRequirements. The methods in this interface is called to allow logging of various dependency resolution events in order for analysis purposes.

This interface may and is recommended to be subclassed.

BCThe bundle context type used in DependencyUtils.satisfyDependencyRequirements.
Methods
public default void
dependencyFoundPinned(BundleIdentifier dependency, BC bundlecontext, BundleIdentifier pinnedbundle, BC pinnedbundlecontext)
Notifies the logger that a dependency was satisfied using a previously pinned bundle.
public default void
dependencyVersionRangeMismatch(BundleDependency dependency, BundleIdentifier bundleid, BC bundlecontext)
Notifies the logger that the bundle dependency cannot be satisfied for the given bundle identifier because the version is out of the allowed range.
public default void
dependencyVersionRangeMismatchForPinnedBundle(BundleDependency dependency, BundleIdentifier pinnedbundleid, BC pinnedbundlecontext)
Notifies the logger that a dependency cannot be satisfied because a pinned bundle is not allowed for the specified range.
public default void
enter(BundleIdentifier bundleid, BC bundlecontext)
Called when the possible bundles for a given bundle identifier is being resolved.
public default void
enterVersion(BundleIdentifier bundleid, BC bundlecontext)
Called after enter(BundleIdentifier, BC) when a specific version of a bundle is being considered.
public default void
exit(BundleIdentifier bundleid, BC bundlecontext, BundleIdentifier matchedidentifier, BC matchedbundlecontext)
Called when the bundles resolution for a given bundle identifier has ended.
public default void
exitVersion(BundleIdentifier bundleid, BC bundlecontext)
Called after a specific version of a bundle has been visited.
public default void dependencyFoundPinned(BundleIdentifier dependency, BC bundlecontext, BundleIdentifier pinnedbundle, BC pinnedbundlecontext)
Notifies the logger that a dependency was satisfied using a previously pinned bundle.

When a bundle is resolved, it will be pinned for further resolution. This method is called when a bundle was previously pinned, and the given dependency was satisfied because this pinned bundle is already present. (Note that unpinning may also occurr in case of backtracking due to failures.)

dependencyThe dependency that is being satisfied.
bundlecontextThe bundle context.
pinnedbundleThe found pinned bundle identifier.
pinnedbundlecontextThe pinned bundle context.
public default void dependencyVersionRangeMismatch(BundleDependency dependency, BundleIdentifier bundleid, BC bundlecontext)
Notifies the logger that the bundle dependency cannot be satisfied for the given bundle identifier because the version is out of the allowed range.
dependencyThe dependency that is being satisfied.
bundleidThe considered versioned bundle identifier.
bundlecontextThe bundle context.
public default void dependencyVersionRangeMismatchForPinnedBundle(BundleDependency dependency, BundleIdentifier pinnedbundleid, BC pinnedbundlecontext)
Notifies the logger that a dependency cannot be satisfied because a pinned bundle is not allowed for the specified range.

This method is called when a previously resolved bundle is out of range for the given dependency, therefore it cannot be used for the given dependency due to version conflicts.

dependencyThe dependency being satisfied.
pinnedbundleidThe pinned bundle identifier that caused the conflict.
pinnedbundlecontextThe pinned bundle context.
public default void enter(BundleIdentifier bundleid, BC bundlecontext)
Called when the possible bundles for a given bundle identifier is being resolved.

This method may be called multiple times for a given bundle identifier-bundle context pair. As the dependency resolution may backtrack in case of failed resolutions, entering a bundle multiple times is possible.

Each call to this function will be matched with a subsequenc exit(BundleIdentifier, BC, BundleIdentifier, BC) call.

bundleidThe bundle identifier for which the dependencies are resolved. The bundle identifier doesn't contain any version qualifiers.
bundlecontextThe bundle context.
public default void enterVersion(BundleIdentifier bundleid, BC bundlecontext)
Called after enter(BundleIdentifier, BC) when a specific version of a bundle is being considered.

This method is called after entering a given bundle name. The bundle with a possible version is being resolved by the algorithm.

Each call to this function will be matched with a subsequenc exitVersion(BundleIdentifier, BC) call.

bundleidThe bundle identifier that is being considered. Contains a version qualifier.
bundlecontextThe bundle context.
public default void exit(BundleIdentifier bundleid, BC bundlecontext, BundleIdentifier matchedidentifier, BC matchedbundlecontext)
Called when the bundles resolution for a given bundle identifier has ended.

The success or failure of bundle resolution is based on the nullness of the matched bundle identifier argument.

bundleidThe bundle identifier for which the versioned bundle was resolved.
bundlecontextThe bundle context.
matchedidentifierThe matched versioned bundle identifier. null if the resolution failed for the given bundle identifier.
matchedbundlecontextThe matched bundle context.
public default void exitVersion(BundleIdentifier bundleid, BC bundlecontext)
Called after a specific version of a bundle has been visited.

It is not specified if the bundle with the given version was accepted or not for this function.

bundleidThe bundle identifier that was visited. Contains a version qualifier.
bundlecontextThe bundle context.