Interface InternalSession
- All Superinterfaces:
- ProtoSession,- Session
- All Known Implementing Classes:
- AbstractSession
- 
Nested Class SummaryNested classes/interfaces inherited from interface org.apache.maven.api.ProtoSessionProtoSession.Builder
- 
Method SummaryModifier and TypeMethodDescriptionstatic voidstatic InternalSessionstatic InternalSessionfrom(org.eclipse.aether.RepositorySystemSession session) <T extends Artifact>
 TgetArtifact(Class<T> clazz, org.eclipse.aether.artifact.Artifact artifact) getArtifact(org.eclipse.aether.artifact.Artifact artifact) Gets the current request trace for the session from thread-local storage.getDependency(org.eclipse.aether.graph.Dependency dependency) getLocalRepository(org.eclipse.aether.repository.LocalRepository repository) getNode(org.eclipse.aether.graph.DependencyNode node) getNode(org.eclipse.aether.graph.DependencyNode node, boolean verbose) getRemoteRepository(org.eclipse.aether.repository.RemoteRepository repository) getRepository(org.eclipse.aether.repository.ArtifactRepository repository) org.eclipse.aether.RepositorySystemorg.eclipse.aether.RepositorySystemSessiongetWorkspaceRepository(org.eclipse.aether.repository.WorkspaceRepository repository) Executes and optionally caches a request using the provided supplier function.voidsetCurrentTrace(RequestTrace trace) Sets the current request trace for the session.org.eclipse.aether.artifact.ArtifacttoArtifact(Artifact artifact) org.eclipse.aether.artifact.ArtifacttoArtifact(ArtifactCoordinates coords) List<org.eclipse.aether.artifact.Artifact> toArtifacts(Collection<? extends Artifact> artifacts) List<org.eclipse.aether.graph.Dependency> toDependencies(Collection<DependencyCoordinates> dependencies, boolean managed) org.eclipse.aether.graph.DependencytoDependency(DependencyCoordinates dependency, boolean managed) List<org.eclipse.aether.repository.RemoteRepository> toRepositories(List<RemoteRepository> repositories) org.eclipse.aether.repository.LocalRepositorytoRepository(LocalRepository repository) org.eclipse.aether.repository.RemoteRepositorytoRepository(RemoteRepository repository) Methods inherited from interface org.apache.maven.api.ProtoSessiongetRootDirectory, getStartTime, getSystemProperties, getTopDirectory, getUserProperties, toBuilderMethods inherited from interface org.apache.maven.api.SessioncollectDependencies, collectDependencies, collectDependencies, createArtifact, createArtifact, createArtifactCoordinates, createArtifactCoordinates, createArtifactCoordinates, createArtifactCoordinates, createDependencyCoordinates, createDependencyCoordinates, createLocalRepository, createProducedArtifact, createProducedArtifact, createRemoteRepository, createRemoteRepository, deployArtifact, flattenDependencies, getArtifactPath, getData, getDegreeOfConcurrency, getEffectiveProperties, getListeners, getLocalRepository, getMavenVersion, getPathForLocalArtifact, getPathForRemoteArtifact, getPluginContext, getProjects, getRemoteRepositories, getService, getSettings, getToolchains, installArtifacts, installArtifacts, isVersionSnapshot, parseVersion, parseVersionConstraint, parseVersionRange, registerListener, requireDependencyScope, requireLanguage, requirePackaging, requirePathScope, requireProjectScope, requireType, resolveArtifact, resolveArtifact, resolveArtifact, resolveArtifact, resolveArtifacts, resolveArtifacts, resolveArtifacts, resolveArtifacts, resolveDependencies, resolveDependencies, resolveDependencies, resolveDependencies, resolveDependencies, resolveHighestVersion, resolveVersion, resolveVersionRange, resolveVersionRange, setArtifactPath, unregisterListener, withLocalRepository, withRemoteRepositories
- 
Method Details- 
from
- 
from
- 
associate
- 
requestExecutes and optionally caches a request using the provided supplier function. If caching is enabled for this session, the result will be cached and subsequent identical requests will return the cached value without re-executing the supplier.- Type Parameters:
- REQ- The request type
- REP- The response type
- Parameters:
- req- The request object used as the cache key
- supplier- The function to execute and cache the result
- Returns:
- The result from the supplier (either fresh or cached)
- Throws:
- RuntimeException- Any exception thrown by the supplier will be cached and re-thrown on subsequent calls
 
- 
requests
- 
getRemoteRepository
- 
getLocalRepository
- 
getWorkspaceRepositoryWorkspaceRepository getWorkspaceRepository(org.eclipse.aether.repository.WorkspaceRepository repository) 
- 
getRepository
- 
getNode
- 
getNode
- 
getArtifact
- 
getArtifact
- 
getDependency
- 
toRepositoriesList<org.eclipse.aether.repository.RemoteRepository> toRepositories(List<RemoteRepository> repositories) 
- 
toRepository
- 
toRepository
- 
toDependenciesList<org.eclipse.aether.graph.Dependency> toDependencies(Collection<DependencyCoordinates> dependencies, boolean managed) 
- 
toDependency
- 
toArtifacts
- 
toArtifact
- 
toArtifact
- 
getSessionorg.eclipse.aether.RepositorySystemSession getSession()
- 
getRepositorySystemorg.eclipse.aether.RepositorySystem getRepositorySystem()
- 
setCurrentTraceSets the current request trace for the session. The request trace provides contextual information about the current operation being performed and can be used for debugging and monitoring purposes. The trace is stored in thread-local storage, allowing for concurrent operations with different traces.- Parameters:
- trace- the trace to set as current, may be null to clear the trace
- See Also:
 
- 
getCurrentTraceRequestTrace getCurrentTrace()Gets the current request trace for the session from thread-local storage. Each thread maintains its own trace context, ensuring thread-safety for concurrent operations.- Returns:
- the current request trace, or null if no trace is set
- See Also:
 
 
-