com.sun.enterprise.deployment.archivist
Class AppClientArchivist

java.lang.Object
  extended by com.sun.enterprise.deployment.archivist.Archivist<ApplicationClientDescriptor>
      extended by com.sun.enterprise.deployment.archivist.AppClientArchivist
Direct Known Subclasses:
ACCAppClientArchivist

@Service
@Scoped(value=org.jvnet.hk2.component.PerLookup.class)
public class AppClientArchivist
extends Archivist<ApplicationClientDescriptor>

This class is responsible for handling J2EE app client files.

Author:
Sheetal Vartak

Field Summary
static java.util.jar.Attributes.Name GLASSFISH_ANCHOR_DIR
           
static java.util.jar.Attributes.Name GLASSFISH_APPCLIENT
           
static java.util.jar.Attributes.Name GLASSFISH_CLIENT_PU_SCAN_TARGETS_NAME
           
static java.util.jar.Attributes.Name GLASSFISH_GROUP_FACADE
           
 
Fields inherited from class com.sun.enterprise.deployment.archivist.Archivist
annotationProcessingRequested, APPCLIENT_EXTENSION, APPLICATION_EXTENSION, classLoader, CONNECTOR_EXTENSION, descriptor, EJB_EXTENSION, handleRuntimeInfo, logger, manifest, MANIFEST_VERSION_VALUE, path, UPLOAD_EXTENSION, WEB_EXTENSION, WEB_FRAGMENT_EXTENSION
 
Constructor Summary
AppClientArchivist()
          Creates new ApplicationClientArchvisit
 
Method Summary
protected  java.lang.String getArchiveExtension()
           
 DeploymentDescriptorFile getConfigurationDDFile()
           
 ApplicationClientDescriptor getDefaultBundleDescriptor()
           
 java.lang.String getMainClassName(java.util.jar.Manifest m)
           
 XModuleType getModuleType()
           
 DeploymentDescriptorFile<ApplicationClientDescriptor> getStandardDDFile()
           
 DeploymentDescriptorFile getSunConfigurationDDFile()
           
 ApplicationClientDescriptor open(ReadableArchive archive, java.lang.String mainClassNameToRun)
           
protected  boolean postHandles(ReadableArchive archive)
           
protected  void postOpen(ApplicationClientDescriptor descriptor, ReadableArchive archive)
          perform any post deployment descriptor reading action
protected  void postStandardDDsRead(ApplicationClientDescriptor descriptor, ReadableArchive archive, java.util.Map<ExtensionsArchivist,RootDeploymentDescriptor> extensions)
          perform any action after all standard DDs is read
protected  void runValidations(ApplicationClientDescriptor acDesc, ReadableArchive archive)
           
 void setDescriptor(Application application)
           
 void validate(java.lang.ClassLoader aClassLoader)
          validates the DOL Objects associated with this archivist, usually it requires that a class loader being set on this archivist or passed as a parameter
protected  void writeContents(ReadableArchive in, WritableArchive out, java.util.Vector entriesToSkip)
          writes the content of an archive to a JarFile
 
Methods inherited from class com.sun.enterprise.deployment.archivist.Archivist
addFileToArchive, applyRuntimeInfo, containsRuntimeDeploymentDescriptors, copyAnEntry, copyExtraElements, copyInto, copyInto, copyInto, copyInto, copyInto, copyJarElements, copyStandardDeploymentDescriptors, createModuleDescriptor, extractEntry, getAnnotationErrorHandler, getClassLoader, getClassPath, getDeploymentDescriptorPath, getDescriptor, getLibraries, getListOfFilesToSkip, getManifest, getPath, getRuntimeDeploymentDescriptorPath, getRuntimeXMLValidation, getRuntimeXMLValidationLevel, getScanner, getTempFile, getTempFile, getUniqueEntryFilenameFor, getWebServicesDDFile, getWebServicesDeploymentDescriptorPath, getWLConfigurationDDFile, getXMLValidation, getXMLValidationLevel, handles, hasRuntimeDeploymentDescriptor, hasStandardDeploymentDescriptor, initializeContext, isAnnotationProcessingRequested, isHandlingRuntimeInfo, isProcessAnnotation, open, open, open, open, open, open, openWith, performOptionalPkgDependenciesCheck, postAnnotationProcess, postRuntimeDDsRead, printDescriptor, processAnnotations, processAnnotations, readAnnotations, readAnnotations, readMetaInfo, readRuntimeDDFromDeploymentPlan, readRuntimeDDFromDeploymentPlan, readRuntimeDeploymentDescriptor, readRuntimeDeploymentDescriptor, readStandardDeploymentDescriptor, renameTmp, saveRuntimeInfo, setAnnotationErrorHandler, setAnnotationProcessingRequested, setArchiveUri, setClassLoader, setClassPath, setDescriptor, setHandleRuntimeInfo, setManifest, setModuleDescriptor, setRuntimeXMLValidation, setRuntimeXMLValidationLevel, setXMLValidation, setXMLValidationLevel, supportsModuleType, write, write, write, write, writeContents, writeContents, writeDeploymentDescriptors, writeExtraDeploymentDescriptors, writeRuntimeDeploymentDescriptors, writeRuntimeDeploymentDescriptors, writeStandardDeploymentDescriptors, writeStandardDeploymentDescriptors, writeWebServicesDescriptors, writeWLRuntimeDeploymentDescriptors
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

GLASSFISH_APPCLIENT

public static final java.util.jar.Attributes.Name GLASSFISH_APPCLIENT

GLASSFISH_CLIENT_PU_SCAN_TARGETS_NAME

public static final java.util.jar.Attributes.Name GLASSFISH_CLIENT_PU_SCAN_TARGETS_NAME

GLASSFISH_GROUP_FACADE

public static final java.util.jar.Attributes.Name GLASSFISH_GROUP_FACADE

GLASSFISH_ANCHOR_DIR

public static final java.util.jar.Attributes.Name GLASSFISH_ANCHOR_DIR
Constructor Detail

AppClientArchivist

public AppClientArchivist()
Creates new ApplicationClientArchvisit

Method Detail

getModuleType

public XModuleType getModuleType()
Specified by:
getModuleType in class Archivist<ApplicationClientDescriptor>
Returns:
the module type handled by this archivist as defined in the application DTD

open

public ApplicationClientDescriptor open(ReadableArchive archive,
                                        java.lang.String mainClassNameToRun)
                                 throws java.io.IOException,
                                        org.xml.sax.SAXParseException
Throws:
java.io.IOException
org.xml.sax.SAXParseException

setDescriptor

public void setDescriptor(Application application)

getStandardDDFile

public DeploymentDescriptorFile<ApplicationClientDescriptor> getStandardDDFile()
Specified by:
getStandardDDFile in class Archivist<ApplicationClientDescriptor>
Returns:
the DeploymentDescriptorFile responsible for handling standard deployment descriptor

getConfigurationDDFile

public DeploymentDescriptorFile getConfigurationDDFile()
Specified by:
getConfigurationDDFile in class Archivist<ApplicationClientDescriptor>
Returns:
if exists the DeploymentDescriptorFile responsible for handling the configuration deployment descriptors

getSunConfigurationDDFile

public DeploymentDescriptorFile getSunConfigurationDDFile()
Overrides:
getSunConfigurationDDFile in class Archivist<ApplicationClientDescriptor>
Returns:
if exists the DeploymentDescriptorFile responsible for handling the Sun configuration deployment descriptors

getDefaultBundleDescriptor

public ApplicationClientDescriptor getDefaultBundleDescriptor()
Specified by:
getDefaultBundleDescriptor in class Archivist<ApplicationClientDescriptor>
Returns:
a default BundleDescriptor for this archivist

validate

public void validate(java.lang.ClassLoader aClassLoader)
validates the DOL Objects associated with this archivist, usually it requires that a class loader being set on this archivist or passed as a parameter

Overrides:
validate in class Archivist<ApplicationClientDescriptor>

postStandardDDsRead

protected void postStandardDDsRead(ApplicationClientDescriptor descriptor,
                                   ReadableArchive archive,
                                   java.util.Map<ExtensionsArchivist,RootDeploymentDescriptor> extensions)
                            throws java.io.IOException
perform any action after all standard DDs is read

Overrides:
postStandardDDsRead in class Archivist<ApplicationClientDescriptor>
Parameters:
descriptor - the deployment descriptor for the module
archive - the module archive
extensions - map of extension archivists
Throws:
java.io.IOException

postOpen

protected void postOpen(ApplicationClientDescriptor descriptor,
                        ReadableArchive archive)
                 throws java.io.IOException
perform any post deployment descriptor reading action

Overrides:
postOpen in class Archivist<ApplicationClientDescriptor>
Parameters:
descriptor - the deployment descriptor for the module
archive - the module archive
Throws:
java.io.IOException

runValidations

protected void runValidations(ApplicationClientDescriptor acDesc,
                              ReadableArchive archive)

writeContents

protected void writeContents(ReadableArchive in,
                             WritableArchive out,
                             java.util.Vector entriesToSkip)
                      throws java.io.IOException
writes the content of an archive to a JarFile

Overrides:
writeContents in class Archivist<ApplicationClientDescriptor>
Parameters:
in - the input archive
out - the archive output stream to write to
entriesToSkip - the files to not write from the original archive
Throws:
java.io.IOException

getMainClassName

public java.lang.String getMainClassName(java.util.jar.Manifest m)
Returns:
the manifest attribute Main-class

postHandles

protected boolean postHandles(ReadableArchive archive)
                       throws java.io.IOException
Specified by:
postHandles in class Archivist<ApplicationClientDescriptor>
Returns:
true if the archivist is handling the provided archive
Throws:
java.io.IOException

getArchiveExtension

protected java.lang.String getArchiveExtension()
Specified by:
getArchiveExtension in class Archivist<ApplicationClientDescriptor>
Returns:
The archive extension handled by a specific archivist


Copyright © 2012 GlassFish Community. All Rights Reserved.