Class EarHandler
- java.lang.Object
-
- org.glassfish.internal.deployment.GenericHandler
-
- com.sun.enterprise.deploy.shared.AbstractArchiveHandler
-
- org.glassfish.javaee.full.deployment.EarHandler
-
- All Implemented Interfaces:
ArchiveHandler
,CompositeHandler
@Service(name="ear") public class EarHandler extends AbstractArchiveHandler implements CompositeHandler
-
-
Field Summary
Fields Modifier and Type Field Description protected PermissionCollection
earDeclaredPC
-
Fields inherited from class com.sun.enterprise.deploy.shared.AbstractArchiveHandler
deplLogger
-
Fields inherited from class org.glassfish.internal.deployment.GenericHandler
habitat
-
-
Constructor Summary
Constructors Constructor Description EarHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
accept(ReadableArchive source, String entryName)
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 toArchiveDetector.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.String
getVersionIdentifier(ReadableArchive archive)
Returns the default value for versionIdentifier.boolean
handles(ReadableArchive archive)
Returns true if this handler understands the specified archive and can process it.void
initCompositeMetaData(DeploymentContext context)
protected void
processEEPermissions(DeploymentContext dc)
-
Methods inherited from class com.sun.enterprise.deploy.shared.AbstractArchiveHandler
getManifestLibraries, getXMLInputFactory
-
Methods inherited from class org.glassfish.internal.deployment.GenericHandler
getClassPathURIs, getDefaultApplicationName, getDefaultApplicationName, getDefaultApplicationName, getDefaultApplicationNameFromArchiveName, getManifest, requiresAnnotationScanning
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.glassfish.api.deployment.archive.ArchiveHandler
getClassPathURIs, getDefaultApplicationName, getDefaultApplicationName, getDefaultApplicationName, getManifest, requiresAnnotationScanning
-
-
-
-
Field Detail
-
earDeclaredPC
protected PermissionCollection earDeclaredPC
-
-
Method Detail
-
getArchiveType
public String getArchiveType()
Description copied from interface:ArchiveHandler
This method is semantically equivalent toArchiveDetector.getArchiveType()
except that this method returns string equivalent of ArchiveType because of backward compatibility reasons.- Specified by:
getArchiveType
in interfaceArchiveHandler
- Returns:
- the type of the archive or deployment unit handled by this handler
- See Also:
ArchiveDetector.getArchiveType()
-
getVersionIdentifier
public String getVersionIdentifier(ReadableArchive archive)
Description copied from class:GenericHandler
Returns the default value for versionIdentifier. This allows us to override the method only where thhe version-identifier element is supported.- Specified by:
getVersionIdentifier
in interfaceArchiveHandler
- Overrides:
getVersionIdentifier
in classGenericHandler
- Parameters:
archive
- the archive for which to provide the version identifier- Returns:
- null
-
handles
public boolean handles(ReadableArchive archive) throws IOException
Description copied from interface:ArchiveHandler
Returns true if this handler understands the specified archive and can process it.- Specified by:
handles
in interfaceArchiveHandler
- Throws:
IOException
- The implementation of this method is expected to interact with the given archive, and if methods onReadableArchive
throws anIOException
, it can be simply tunneled to the caller.
-
expand
public void expand(ReadableArchive source, WritableArchive target, DeploymentContext context) throws IOException
Description copied from class:GenericHandler
Prepares the jar file to a format the ApplicationContainer is expecting. This could be just a pure unzipping of the jar or nothing at all.- Specified by:
expand
in interfaceArchiveHandler
- Overrides:
expand
in classGenericHandler
- Parameters:
source
- of the expandingtarget
- of the expandingcontext
- deployment context- Throws:
IOException
- when the archive is corrupted
-
getClassLoader
public ClassLoader getClassLoader(ClassLoader parent, DeploymentContext context)
Description copied from interface:ArchiveHandler
Creates a classloader that can load code from inside the archive.- Specified by:
getClassLoader
in interfaceArchiveHandler
- Parameters:
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 container
-
processEEPermissions
protected void processEEPermissions(DeploymentContext dc)
-
accept
public boolean accept(ReadableArchive source, String entryName)
- Specified by:
accept
in interfaceCompositeHandler
-
initCompositeMetaData
public void initCompositeMetaData(DeploymentContext context)
- Specified by:
initCompositeMetaData
in interfaceCompositeHandler
-
-