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 PermissionCollectionearDeclaredPC-
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 booleanaccept(ReadableArchive source, String entryName)voidexpand(ReadableArchive source, WritableArchive target, DeploymentContext context)Prepares the jar file to a format the ApplicationContainer is expecting.StringgetArchiveType()This method is semantically equivalent toArchiveDetector.getArchiveType()except that this method returns string equivalent of ArchiveType because of backward compatibility reasons.ClassLoadergetClassLoader(ClassLoader parent, DeploymentContext context)Creates a classloader that can load code from inside the archive.StringgetVersionIdentifier(ReadableArchive archive)Returns the default value for versionIdentifier.booleanhandles(ReadableArchive archive)Returns true if this handler understands the specified archive and can process it.voidinitCompositeMetaData(DeploymentContext context)protected voidprocessEEPermissions(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:ArchiveHandlerThis method is semantically equivalent toArchiveDetector.getArchiveType()except that this method returns string equivalent of ArchiveType because of backward compatibility reasons.- Specified by:
getArchiveTypein 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:GenericHandlerReturns the default value for versionIdentifier. This allows us to override the method only where thhe version-identifier element is supported.- Specified by:
getVersionIdentifierin interfaceArchiveHandler- Overrides:
getVersionIdentifierin 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:ArchiveHandlerReturns true if this handler understands the specified archive and can process it.- Specified by:
handlesin interfaceArchiveHandler- Throws:
IOException- The implementation of this method is expected to interact with the given archive, and if methods onReadableArchivethrows 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:GenericHandlerPrepares 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:
expandin interfaceArchiveHandler- Overrides:
expandin 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:ArchiveHandlerCreates a classloader that can load code from inside the archive.- Specified by:
getClassLoaderin 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:
acceptin interfaceCompositeHandler
-
initCompositeMetaData
public void initCompositeMetaData(DeploymentContext context)
- Specified by:
initCompositeMetaDatain interfaceCompositeHandler
-
-