@Contract
public interface ArchiveHandler
| Modifier and Type | Method and Description |
|---|---|
void |
expand(ReadableArchive source,
WritableArchive target,
DeploymentContext context)
Prepares the jar file to a format the ApplicationContainer is
expecting.
|
String |
getArchiveType()
This method is semantically equivalent to
ArchiveDetector.getArchiveType() except that
this method returns string equivalent of ArchiveType because of backward compatibility reasons. |
ClassLoader |
getClassLoader(ClassLoader parent,
DeploymentContext context)
Creates a classloader that can load code from inside the archive.
|
List<URI> |
getClassPathURIs(ReadableArchive archive)
Returns the classpath URIs for this archive.
|
String |
getDefaultApplicationName(ReadableArchive archive)
Returns the default name by which the specified archive can be
identified.
|
String |
getDefaultApplicationName(ReadableArchive archive,
DeploymentContext context) |
Manifest |
getManifest(ReadableArchive archive)
Returns the manifest file for this archive, this file is usually located at
the META-INF/MANIFEST location, however, certain archive type can change this
default location or use another mean of expressing manifest information.
|
String |
getVersionIdentifier(ReadableArchive archive)
Returns the version identifier by which the specified archive can be
deployed.
|
boolean |
handles(ReadableArchive archive)
Returns true if this handler understands the specified archive and
can process it.
|
boolean |
requiresAnnotationScanning(ReadableArchive archive)
Returns whether this archive requires annotation scanning.
|
String getArchiveType()
ArchiveDetector.getArchiveType() except that
this method returns string equivalent of ArchiveType because of backward compatibility reasons.ArchiveDetector.getArchiveType()String getDefaultApplicationName(ReadableArchive archive)
The default name is used, for example, during deployment if no name was specified explicitly as part of the deployment request.
archive - the archive for which to provide the default nameString getDefaultApplicationName(ReadableArchive archive, DeploymentContext context)
String getVersionIdentifier(ReadableArchive archive)
The version identifier is used during deployment if no version identifier
was specified null must be returned
archive - the archive for which to provide the version identifiernullboolean handles(ReadableArchive archive) throws IOException
IOException - The implementation of this method is expected to interact with
the given archive, and if methods on ReadableArchive
throws an IOException, it can be simply tunneled to the caller.ClassLoader getClassLoader(ClassLoader parent, DeploymentContext context)
parent - The newly created classloader to be returned must eventually delegate to this classloader.
(This classloader is capable of resolving APIs and other things that the containercontext - void expand(ReadableArchive source, WritableArchive target, DeploymentContext context) throws IOException
source - of the expandingtarget - of the expandingcontext - IOExceptionManifest getManifest(ReadableArchive archive) throws IOException
archive - fileIOExceptionList<URI> getClassPathURIs(ReadableArchive archive)
archive - fileboolean requiresAnnotationScanning(ReadableArchive archive)
archive - fileCopyright © 2017–2020 Eclipse Foundation. All rights reserved.