GlassFish.Status
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.
|
void |
start()
Start GlassFish.
|
void |
stop()
Stop GlassFish.
|
public void start() throws GlassFishException
GlassFish
GlassFish.Status.STARTED
state is a no-op.start
in interface GlassFish
GlassFishException
- if server can't be started for some unknown reason.public void stop() throws GlassFishException
GlassFish
GlassFish.Status.STARTED
state is a no-op.stop
in interface GlassFish
GlassFishException
- if server can't be started for some unknown reason.public void dispose() throws GlassFishException
GlassFish
GlassFish.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 GlassFish
GlassFishException
public GlassFish.Status getStatus() throws GlassFishException
GlassFish
getStatus
in interface GlassFish
GlassFishException
public <T> T getService(Class<T> serviceType) throws GlassFishException
GlassFish
getService
in interface GlassFish
serviceType
- type of component required.GlassFishException
public <T> T getService(Class<T> serviceType, String serviceName) throws GlassFishException
GlassFish
getService
in interface GlassFish
serviceType
- type of component required.serviceName
- name of the component.GlassFishException
public Deployer getDeployer() throws GlassFishException
GlassFish
getService(Deployer.class, null)
getDeployer
in interface GlassFish
GlassFishException
public CommandRunner getCommandRunner() throws GlassFishException
GlassFish
getService(CommandRunner.class, null)
Each invocation of this method returns a new CommandRunner object.getCommandRunner
in interface GlassFish
GlassFishException
Copyright © 2019. All rights reserved.