Class AppClientServerApplication
- java.lang.Object
-
- org.glassfish.appclient.server.core.AppClientServerApplication
-
- All Implemented Interfaces:
ApplicationContainer<ApplicationClientDescriptor>
@Service @PerLookup public class AppClientServerApplication extends Object implements ApplicationContainer<ApplicationClientDescriptor>
Represents an app client module, either stand-alone or nested inside an EAR, loaded on the server.The primary purpose of this class is to implement Java Web Start support for launches of this app client. Other than in that sense, app clients do not run in the server. To support a client for Java Web Start launches, this class figures out what static content (JAR files) and dynamic content (JNLP documents) are needed by the client. It then generates the required dynamic content templates and submits them and the static content to a Grizzly adapter which actually serves the data in response to requests.
- Author:
- tjquinn
-
-
Constructor Summary
Constructors Constructor Description AppClientServerApplication()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DeploymentContext
dc()
String
deployedAppName()
ClassLoader
getClassLoader()
Returns the class loader associated with this applicationApplicationClientDescriptor
getDescriptor()
Returns the deployment descriptor associated with this applicationAppClientDeployerHelper
helper()
void
init(DeploymentContext dc, AppClientDeployerHelper helper)
boolean
matches(String appName, String moduleName)
String
moduleExpression()
String
registrationName()
boolean
resume()
Resumes this application container.boolean
start(ApplicationContext startupContext)
Starts an application container.boolean
stop(ApplicationContext stopContext)
boolean
suspend()
Suspends this application container.-
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.ApplicationContainer
initialize, reload
-
-
-
-
Method Detail
-
init
public void init(DeploymentContext dc, AppClientDeployerHelper helper)
-
deployedAppName
public String deployedAppName()
-
getDescriptor
public ApplicationClientDescriptor getDescriptor()
Description copied from interface:ApplicationContainer
Returns the deployment descriptor associated with this application- Specified by:
getDescriptor
in interfaceApplicationContainer<ApplicationClientDescriptor>
- Returns:
- deployment descriptor if they exist or null if not
-
helper
public AppClientDeployerHelper helper()
-
start
public boolean start(ApplicationContext startupContext) throws Exception
Description copied from interface:ApplicationContainer
Starts an application container. ContractProvider starting should not throw an exception but rather should use their prefered Logger instance to log any issue they encounter while starting. Returning false from a start mean that the container failed to start- Specified by:
start
in interfaceApplicationContainer<ApplicationClientDescriptor>
- Parameters:
startupContext
- the start up context- Returns:
- true if the container startup was successful.
- Throws:
Exception
- if this application container could not be started
-
stop
public boolean stop(ApplicationContext stopContext)
- Specified by:
stop
in interfaceApplicationContainer<ApplicationClientDescriptor>
-
suspend
public boolean suspend()
Description copied from interface:ApplicationContainer
Suspends this application container.- Specified by:
suspend
in interfaceApplicationContainer<ApplicationClientDescriptor>
- Returns:
- true if suspending was successful, false otherwise.
-
resume
public boolean resume() throws Exception
Description copied from interface:ApplicationContainer
Resumes this application container.- Specified by:
resume
in interfaceApplicationContainer<ApplicationClientDescriptor>
- Returns:
- true if resumption was successful, false otherwise
- Throws:
Exception
- if this application container could not be resumed
-
getClassLoader
public ClassLoader getClassLoader()
Description copied from interface:ApplicationContainer
Returns the class loader associated with this application- Specified by:
getClassLoader
in interfaceApplicationContainer<ApplicationClientDescriptor>
- Returns:
- ClassLoader for this app
-
dc
public DeploymentContext dc()
-
registrationName
public String registrationName()
-
moduleExpression
public String moduleExpression()
-
-