GlassFish.Status| Modifier and Type | Field and Description |
|---|---|
static String |
PAYARA_SHUTDOWNGRACE_PROPERTY |
| Constructor and Description |
|---|
GlassFishImpl(com.sun.enterprise.module.bootstrap.ModuleStartup gfKernel,
org.glassfish.hk2.api.ServiceLocator habitat,
Properties gfProps) |
| Modifier and Type | Method and Description |
|---|---|
void |
dispose()
Call this method if you don't need this GlassFish instance any more.
|
CommandRunner |
getCommandRunner()
Gets a CommandRunner instance, using which the user can run asadmin commands.
|
Deployer |
getDeployer()
Gets a Deployer instance to deploy an application.
|
<T> T |
getService(Class<T> serviceType)
A service has a service interface and optionally a name.
|
<T> T |
getService(Class<T> serviceType,
String serviceName)
A service has a service interface and optionally a name.
|
GlassFish.Status |
getStatus()
Get the current status of GlassFish.
|
static void |
sleepShutdownGracePeriod() |
void |
start()
Start GlassFish.
|
void |
stop()
Stop GlassFish.
|
public static final String PAYARA_SHUTDOWNGRACE_PROPERTY
public GlassFishImpl(com.sun.enterprise.module.bootstrap.ModuleStartup gfKernel,
org.glassfish.hk2.api.ServiceLocator habitat,
Properties gfProps)
throws GlassFishException
GlassFishExceptionpublic void start()
throws GlassFishException
GlassFishGlassFish.Status.STARTED state is a no-op.start in interface GlassFishGlassFishException - if server can't be started for some unknown reason.public void stop()
throws GlassFishException
GlassFishGlassFish.Status.STARTED state is a no-op.stop in interface GlassFishGlassFishException - if server can't be started for some unknown reason.public static void sleepShutdownGracePeriod()
public void dispose()
throws GlassFishException
GlassFishGlassFish.getStatus()
on the GlassFish object will cause an IllegalStateException to be thrown. When this method is called,
any resource (like temporary files, threads, etc.) is also released.dispose in interface GlassFishGlassFishExceptionpublic GlassFish.Status getStatus()
GlassFishpublic <T> T getService(Class<T> serviceType) throws GlassFishException
GlassFishgetService in interface GlassFishserviceType - type of component required.GlassFishExceptionpublic <T> T getService(Class<T> serviceType, String serviceName) throws GlassFishException
GlassFishgetService in interface GlassFishserviceType - type of component required.serviceName - name of the component.GlassFishExceptionpublic Deployer getDeployer() throws GlassFishException
GlassFishgetService(Deployer.class, null)getDeployer in interface GlassFishGlassFishExceptionpublic CommandRunner getCommandRunner() throws GlassFishException
GlassFishgetService(CommandRunner.class, null)
Each invocation of this method returns a new CommandRunner object.getCommandRunner in interface GlassFishGlassFishExceptionCopyright © 2019. All rights reserved.