Package org.eclipse.aether
Class AbstractForwardingRepositorySystemSession
java.lang.Object
org.eclipse.aether.AbstractForwardingRepositorySystemSession
- All Implemented Interfaces:
RepositorySystemSession
public abstract class AbstractForwardingRepositorySystemSession
extends Object
implements RepositorySystemSession
A special repository system session to enable decorating or proxying another session. To do so, clients have to
create a subclass and implement
getSession(), and optionally override other methods.-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCreates a new forwarding session. -
Method Summary
Modifier and TypeMethodDescriptionGets the policy which controls how errors related to reading artifact descriptors should be handled.Gets the registry of artifact types recognized by this session, for instance when processing artifact descriptors.Gets the authentication selector to use for repositories discovered in artifact descriptors.getCache()Gets the cache the repository system may use to save data for future reuse during the session.Gets the global checksum policy.Gets the configuration properties used to tweak internal aspects of the repository system (e.g.getData()Gets the custom data associated with this session.Gets the dependency graph transformer to use for building dependency graphs.Gets the dependency manager to use for building dependency graphs.Gets the dependency selector to use for building dependency graphs.Gets the dependency traverser to use for building dependency graphs.Get the file transformer managerGets the local repository used during this session.Gets the local repository manager used during this session.Gets the mirror selector to use for repositories discovered in artifact descriptors.Gets the proxy selector to use for repositories discovered in artifact descriptors.Gets the listener being notified of actions in the repository system.Gets the policy which controls whether resolutions errors from remote repositories should be cached.protected abstract RepositorySystemSessionGets the repository system session to which this instance forwards calls.Gets the system properties to use, e.g.Gets the listener being notified of uploads/downloads by the repository system.Gets the global update policy.Gets the user properties to use, e.g.Gets the version filter to use for building dependency graphs.Gets the workspace reader used during this session.booleanIndicates whether repositories declared in artifact descriptors should be ignored during transitive dependency collection.booleanIndicates whether the repository system operates in offline mode and avoids/refuses any access to remote repositories.
-
Constructor Details
-
AbstractForwardingRepositorySystemSession
protected AbstractForwardingRepositorySystemSession()Creates a new forwarding session.
-
-
Method Details
-
getSession
Gets the repository system session to which this instance forwards calls. It's worth noting that this class does not save/cache the returned reference but queries this method before each forwarding. Hence, the session forwarded to may change over time or depending on the context (e.g. calling thread).- Returns:
- The repository system session to forward calls to, never
null.
-
isOffline
Description copied from interface:RepositorySystemSessionIndicates whether the repository system operates in offline mode and avoids/refuses any access to remote repositories.- Specified by:
isOfflinein interfaceRepositorySystemSession- Returns:
trueif the repository system is in offline mode,falseotherwise.
-
isIgnoreArtifactDescriptorRepositories
Description copied from interface:RepositorySystemSessionIndicates whether repositories declared in artifact descriptors should be ignored during transitive dependency collection. If enabled, only the repositories originally provided with the collect request will be considered.- Specified by:
isIgnoreArtifactDescriptorRepositoriesin interfaceRepositorySystemSession- Returns:
trueif additional repositories from artifact descriptors are ignored,falseto merge those with the originally specified repositories.
-
getResolutionErrorPolicy
Description copied from interface:RepositorySystemSessionGets the policy which controls whether resolutions errors from remote repositories should be cached.- Specified by:
getResolutionErrorPolicyin interfaceRepositorySystemSession- Returns:
- The resolution error policy for this session or
nullif resolution errors should generally not be cached.
-
getArtifactDescriptorPolicy
Description copied from interface:RepositorySystemSessionGets the policy which controls how errors related to reading artifact descriptors should be handled.- Specified by:
getArtifactDescriptorPolicyin interfaceRepositorySystemSession- Returns:
- The descriptor error policy for this session or
nullif descriptor errors should generally not be tolerated.
-
getChecksumPolicy
Description copied from interface:RepositorySystemSessionGets the global checksum policy. If set, the global checksum policy overrides the checksum policies of the remote repositories being used for resolution.- Specified by:
getChecksumPolicyin interfaceRepositorySystemSession- Returns:
- The global checksum policy or
null/empty if not set and the per-repository policies apply. - See Also:
-
getUpdatePolicy
Description copied from interface:RepositorySystemSessionGets the global update policy. If set, the global update policy overrides the update policies of the remote repositories being used for resolution.- Specified by:
getUpdatePolicyin interfaceRepositorySystemSession- Returns:
- The global update policy or
null/empty if not set and the per-repository policies apply. - See Also:
-
getLocalRepository
Description copied from interface:RepositorySystemSessionGets the local repository used during this session. This is a convenience method forLocalRepositoryManager.getRepository().- Specified by:
getLocalRepositoryin interfaceRepositorySystemSession- Returns:
- The local repository being during this session, never
null.
-
getLocalRepositoryManager
Description copied from interface:RepositorySystemSessionGets the local repository manager used during this session.- Specified by:
getLocalRepositoryManagerin interfaceRepositorySystemSession- Returns:
- The local repository manager used during this session, never
null.
-
getWorkspaceReader
Description copied from interface:RepositorySystemSessionGets the workspace reader used during this session. If set, the workspace reader will usually be consulted first to resolve artifacts.- Specified by:
getWorkspaceReaderin interfaceRepositorySystemSession- Returns:
- The workspace reader for this session or
nullif none.
-
getRepositoryListener
Description copied from interface:RepositorySystemSessionGets the listener being notified of actions in the repository system.- Specified by:
getRepositoryListenerin interfaceRepositorySystemSession- Returns:
- The repository listener or
nullif none.
-
getTransferListener
Description copied from interface:RepositorySystemSessionGets the listener being notified of uploads/downloads by the repository system.- Specified by:
getTransferListenerin interfaceRepositorySystemSession- Returns:
- The transfer listener or
nullif none.
-
getSystemProperties
Description copied from interface:RepositorySystemSessionGets the system properties to use, e.g. for processing of artifact descriptors. System properties are usually collected from the runtime environment likeSystem.getProperties()and environment variables.- Specified by:
getSystemPropertiesin interfaceRepositorySystemSession- Returns:
- The (read-only) system properties, never
null.
-
getUserProperties
Description copied from interface:RepositorySystemSessionGets the user properties to use, e.g. for processing of artifact descriptors. User properties are similar to system properties but are set on the discretion of the user and hence are considered of higher priority than system properties.- Specified by:
getUserPropertiesin interfaceRepositorySystemSession- Returns:
- The (read-only) user properties, never
null.
-
getConfigProperties
Description copied from interface:RepositorySystemSessionGets the configuration properties used to tweak internal aspects of the repository system (e.g. thread pooling, connector-specific behavior, etc.)- Specified by:
getConfigPropertiesin interfaceRepositorySystemSession- Returns:
- The (read-only) configuration properties, never
null. - See Also:
-
getMirrorSelector
Description copied from interface:RepositorySystemSessionGets the mirror selector to use for repositories discovered in artifact descriptors. Note that this selector is not used for remote repositories which are passed as request parameters to the repository system, those repositories are supposed to denote the effective repositories.- Specified by:
getMirrorSelectorin interfaceRepositorySystemSession- Returns:
- The mirror selector to use, never
null. - See Also:
-
getProxySelector
Description copied from interface:RepositorySystemSessionGets the proxy selector to use for repositories discovered in artifact descriptors. Note that this selector is not used for remote repositories which are passed as request parameters to the repository system, those repositories are supposed to have their proxy (if any) already set.- Specified by:
getProxySelectorin interfaceRepositorySystemSession- Returns:
- The proxy selector to use, never
null. - See Also:
-
getAuthenticationSelector
Description copied from interface:RepositorySystemSessionGets the authentication selector to use for repositories discovered in artifact descriptors. Note that this selector is not used for remote repositories which are passed as request parameters to the repository system, those repositories are supposed to have their authentication (if any) already set.- Specified by:
getAuthenticationSelectorin interfaceRepositorySystemSession- Returns:
- The authentication selector to use, never
null. - See Also:
-
getArtifactTypeRegistry
Description copied from interface:RepositorySystemSessionGets the registry of artifact types recognized by this session, for instance when processing artifact descriptors.- Specified by:
getArtifactTypeRegistryin interfaceRepositorySystemSession- Returns:
- The artifact type registry, never
null.
-
getDependencyTraverser
Description copied from interface:RepositorySystemSessionGets the dependency traverser to use for building dependency graphs.- Specified by:
getDependencyTraverserin interfaceRepositorySystemSession- Returns:
- The dependency traverser to use for building dependency graphs or
nullif dependencies are unconditionally traversed.
-
getDependencyManager
Description copied from interface:RepositorySystemSessionGets the dependency manager to use for building dependency graphs.- Specified by:
getDependencyManagerin interfaceRepositorySystemSession- Returns:
- The dependency manager to use for building dependency graphs or
nullif dependency management is not performed.
-
getDependencySelector
Description copied from interface:RepositorySystemSessionGets the dependency selector to use for building dependency graphs.- Specified by:
getDependencySelectorin interfaceRepositorySystemSession- Returns:
- The dependency selector to use for building dependency graphs or
nullif dependencies are unconditionally included.
-
getVersionFilter
Description copied from interface:RepositorySystemSessionGets the version filter to use for building dependency graphs.- Specified by:
getVersionFilterin interfaceRepositorySystemSession- Returns:
- The version filter to use for building dependency graphs or
nullif versions aren't filtered.
-
getDependencyGraphTransformer
Description copied from interface:RepositorySystemSessionGets the dependency graph transformer to use for building dependency graphs.- Specified by:
getDependencyGraphTransformerin interfaceRepositorySystemSession- Returns:
- The dependency graph transformer to use for building dependency graphs or
nullif none.
-
getData
Description copied from interface:RepositorySystemSessionGets the custom data associated with this session.- Specified by:
getDatain interfaceRepositorySystemSession- Returns:
- The session data, never
null.
-
getCache
Description copied from interface:RepositorySystemSessionGets the cache the repository system may use to save data for future reuse during the session.- Specified by:
getCachein interfaceRepositorySystemSession- Returns:
- The repository cache or
nullif none.
-
getFileTransformerManager
Description copied from interface:RepositorySystemSessionGet the file transformer manager- Specified by:
getFileTransformerManagerin interfaceRepositorySystemSession- Returns:
- the manager, never
null
-