public abstract class AppClientDeployerHelper extends Object
See also StandaloneAppClientDeployerHelper
and
NestedAppClientDeployerHelper
, the concrete implementation subclasses
of AppClientDeployerHelper.
Modifier and Type | Class and Description |
---|---|
static class |
AppClientDeployerHelper.Proxy
Wrapper around AppClientDeployer for storage in the deployment context's
meta data.
|
Modifier and Type | Field and Description |
---|---|
static String |
ACC_MAIN_LOGGER |
protected AppClientArchivist |
archivist |
static String |
LOG_MESSAGE_RESOURCE |
Modifier | Constructor and Description |
---|---|
protected |
AppClientDeployerHelper(DeploymentContext dc,
ApplicationClientDescriptor bundleDesc,
AppClientArchivist archivist,
ClassLoader gfClientModuleClassLoader,
Application application,
org.glassfish.hk2.api.ServiceLocator habitat) |
Modifier and Type | Method and Description |
---|---|
protected void |
addClientPolicyFiles(OutputJarArchive clientFacadeArchive)
Adds the client policy files to the top-level generated JAR.
|
protected abstract void |
addTopLevelContentToClientFacade(OutputJarArchive facadeArchive) |
ApplicationClientDescriptor |
appClientDesc() |
abstract URI |
appClientServerOriginalAnchor(DeploymentContext dc)
Returns the URI on the server to the original location of the app client.
|
abstract URI |
appClientServerURI(DeploymentContext dc)
Returns the URI to the server's copy of the developer's original app
client JAR.
|
abstract URI |
appClientURIWithinApp(DeploymentContext dc)
Returns the URI within the enclosing app of the app client JAR.
|
abstract URI |
appClientUserURI(DeploymentContext dc)
Returns the URI to the developer's original app client JAR within
the download directory the user specifies in "deploy --retrieve" or
"get-client-stubs."
|
abstract URI |
appClientUserURIForFacade(DeploymentContext dc)
Returns the URI to be used for the GlassFish-AppClient manifest entry
in the facade.
|
String |
appName() |
String |
appName(DeploymentContext dc) |
protected abstract Set<Artifacts.FullAndPartURIs> |
clientLevelDownloads() |
String |
clientName() |
protected abstract void |
copyFileToTopLevelJAR(OutputJarArchive clientFacadeArchive,
File f,
String path) |
abstract void |
createAndAddLibraryJNLPs(AppClientDeployerHelper helper,
TokenHelper tHelper,
Map<String,DynamicContent> dynamicContent) |
DeploymentContext |
dc() |
abstract Set<Artifacts.FullAndPartURIs> |
earLevelDownloads() |
protected abstract String |
facadeClassPath()
Returns the class path to be stored in the manifest for the
generated facade JAR file.
|
protected abstract String |
facadeFileNameAndType(DeploymentContext dc)
Returns the file name (and type) for the facade, excluding any
directory information.
|
abstract URI |
facadeServerURI(DeploymentContext dc)
Returns the URI to the server's copy of the facade JAR file.
|
abstract URI |
facadeUserURI(DeploymentContext dc)
Returns the URI for the facade JAR, relative to the download
directory to which the user will fetch the relevant JARs (either
as part of "deploy --retrieve" or "get-client-stubs."
|
abstract FixedContent |
fixedContentWithinEAR(String uriString)
Returns a FixedContent object for the file, within the EAR, at the
specified relative location.
|
protected void |
generateAppClientFacade() |
abstract URI |
groupFacadeServerURI(DeploymentContext dc) |
abstract URI |
groupFacadeUserURI(DeploymentContext dc)
Returns the URI for the group facade JAR, relative to the download
directory to which the user will fetch the relevant JARs (either
as part of "deploy --retrieve" or "get-client-stubs."
|
protected InputStream |
openByteCodeStream(String resourceName) |
abstract String |
pathToAppclientWithinApp(DeploymentContext dc)
Returns the relative path to the app client within the enclosing app.
|
protected void |
prepareJARs() |
protected abstract String |
PUScanTargets() |
protected URI |
relativeURIToGroupFacade() |
abstract File |
rootForSignedFilesInApp()
Returns the root directory for signed files in the applications.
|
ApplicationSignedJARManager |
signedJARManager() |
Map<String,Map<URI,StaticContent>> |
signingAliasToJar() |
abstract URI |
URIWithinAppDir(DeploymentContext dc,
URI absoluteURI)
Returns a relative URI within the app directory for the specified
absolute URI.
|
protected final AppClientArchivist archivist
public static final String ACC_MAIN_LOGGER
public static final String LOG_MESSAGE_RESOURCE
protected AppClientDeployerHelper(DeploymentContext dc, ApplicationClientDescriptor bundleDesc, AppClientArchivist archivist, ClassLoader gfClientModuleClassLoader, Application application, org.glassfish.hk2.api.ServiceLocator habitat) throws IOException
IOException
public abstract URI facadeServerURI(DeploymentContext dc)
dc
- the deployment context for the current deploymentpublic abstract URI facadeUserURI(DeploymentContext dc)
dc
- the deployment context for the current deploymentpublic abstract URI groupFacadeUserURI(DeploymentContext dc)
dc
- the deployment context for the current deploymentpublic abstract URI groupFacadeServerURI(DeploymentContext dc)
protected abstract String facadeFileNameAndType(DeploymentContext dc)
dc
- the deployment context for the current deploymentpublic abstract URI appClientUserURI(DeploymentContext dc)
dc
- public abstract URI appClientUserURIForFacade(DeploymentContext dc)
dc
- public abstract URI appClientServerURI(DeploymentContext dc)
dc
- public abstract URI appClientServerOriginalAnchor(DeploymentContext dc)
This is distinct from the appClientServerURI which could be in the generated directory (in the case of a directory deployment, for example). In some cases we need the original location of the app client on the server (for example, to resolve relative references from the app client JAR's manifest Class-Path).
dc
- public abstract URI appClientURIWithinApp(DeploymentContext dc)
dc
- public abstract String pathToAppclientWithinApp(DeploymentContext dc)
dc
- public abstract URI URIWithinAppDir(DeploymentContext dc, URI absoluteURI)
dc
- absoluteURI
- protected abstract String facadeClassPath()
protected abstract String PUScanTargets()
public ApplicationSignedJARManager signedJARManager()
public abstract void createAndAddLibraryJNLPs(AppClientDeployerHelper helper, TokenHelper tHelper, Map<String,DynamicContent> dynamicContent) throws IOException
IOException
public Map<String,Map<URI,StaticContent>> signingAliasToJar()
public final DeploymentContext dc()
public ApplicationClientDescriptor appClientDesc()
public String appName()
public String appName(DeploymentContext dc)
public String clientName()
public abstract FixedContent fixedContentWithinEAR(String uriString)
uriString
- relative path within the EARpublic abstract File rootForSignedFilesInApp()
protected URI relativeURIToGroupFacade()
protected void prepareJARs() throws IOException, URISyntaxException
IOException
URISyntaxException
protected abstract void addTopLevelContentToClientFacade(OutputJarArchive facadeArchive) throws IOException
IOException
protected void addClientPolicyFiles(OutputJarArchive clientFacadeArchive) throws IOException
For a stand-alone client (not in an EAR) this implementation adds the policy files to the generated app client facade JAR.
clientFacadeArchive
- the generated app client facade JARIOException
protected abstract void copyFileToTopLevelJAR(OutputJarArchive clientFacadeArchive, File f, String path) throws IOException
IOException
protected final void generateAppClientFacade() throws IOException, URISyntaxException
IOException
URISyntaxException
protected InputStream openByteCodeStream(String resourceName) throws IOException
IOException
protected abstract Set<Artifacts.FullAndPartURIs> clientLevelDownloads() throws IOException
IOException
public abstract Set<Artifacts.FullAndPartURIs> earLevelDownloads() throws IOException
IOException
Copyright © 2018. All rights reserved.