1 23 24 package com.sun.enterprise.appclient; 25 26 import com.sun.enterprise.deployment.annotation.AnnotationProcessorException; 27 import com.sun.enterprise.deployment.ApplicationClientDescriptor; 28 import com.sun.enterprise.deployment.archivist.Archivist; 29 import com.sun.enterprise.deployment.deploy.shared.AbstractArchive; 30 import com.sun.enterprise.deployment.deploy.shared.FileArchive; 31 import com.sun.enterprise.deployment.RootDeploymentDescriptor; 32 import java.io.File ; 33 import java.io.IOException ; 34 import java.net.MalformedURLException ; 35 import java.net.URI ; 36 import java.net.URISyntaxException ; 37 import java.net.URL ; 38 import java.util.logging.Logger ; 39 40 44 public class ClassFileAppClientInfo extends AppClientInfo { 45 46 47 private String classFileFromCommandLine; 48 49 58 protected ClassFileAppClientInfo( 59 boolean isJWS, Logger logger, File archive, 60 Archivist archivist, String mainClassFromCommandLine, 61 String classFileFromCommandLine) { 62 super(isJWS, logger, archive, archivist, mainClassFromCommandLine); 63 this.classFileFromCommandLine = classFileFromCommandLine; 64 } 65 66 protected String getMainClassNameToRun(ApplicationClientDescriptor acDescr) { 67 return classFileFromCommandLine; 68 } 69 70 protected void messageDescriptor(RootDeploymentDescriptor d, 71 Archivist archivist, AbstractArchive archive) 72 throws IOException , AnnotationProcessorException { 73 ApplicationClientDescriptor appClient = (ApplicationClientDescriptor)d; 74 appClient.setMainClassName(classFileFromCommandLine); 75 appClient.getModuleDescriptor().setStandalone(true); 76 archivist.processAnnotations(appClient, archive); 77 } 78 79 protected AbstractArchive expand(File file) 80 throws IOException , Exception { 81 FileArchive appArchive = new FileArchive(); 82 appArchive.open(file.getAbsolutePath()); 83 return appArchive; 84 } 85 86 protected boolean deleteAppClientDir() { 87 return false; 88 } 89 } 90 | Popular Tags |