|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.glassfish.embed.GlassFish
public class GlassFish
Entry point to the embedded GlassFish.
TODO: the way this is done today is that the embedded API wraps the ugliness of the underlying GFv3 internal abstractions, but ideally, it should be the other way around — this should be the native interface inside GlassFish, and application server launcher and CLI commands should be the client of this API. This is how all the other sensible containers do it, like Tomcat and Jetty.
| Field Summary | |
|---|---|
protected com.sun.enterprise.v3.server.ApplicationLifecycle |
appLife
|
protected com.sun.enterprise.deploy.shared.ArchiveFactory |
archiveFactory
|
protected com.sun.enterprise.v3.server.ServerEnvironment |
env
|
protected org.jvnet.hk2.component.Habitat |
habitat
|
protected com.sun.enterprise.v3.server.SnifferManager |
snifMan
|
| Constructor Summary | |
|---|---|
GlassFish()
Starts an empty do-nothing GlassFish v3. |
|
GlassFish(int httpPort)
Starts GlassFish v3 with minimalistic configuration that involves single HTTP listener listening on the given port. |
|
| Method Summary | |
|---|---|
GFHttpListener |
createHttpListener(int listenerPort)
|
protected java.io.File |
createTempDir()
|
GFVirtualServer |
createVirtualServer(GFHttpListener listener)
|
protected com.sun.hk2.component.InhabitantsParser |
decorateInhabitantsParser(com.sun.hk2.component.InhabitantsParser parser)
Tweaks the 'recipe' --- for embedded use, we'd like GFv3 to behave a little bit differently from normal stand-alone use. |
GFApplication |
deploy(java.io.File archive)
Deploys WAR/EAR/RAR/etc to this GlassFish. |
GFApplication |
deploy(org.glassfish.api.deployment.archive.ReadableArchive a)
|
static void |
setLogLevel(java.util.logging.Level level)
Sets the overall logging level for GlassFish. |
void |
stop()
Stops the running server. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected org.jvnet.hk2.component.Habitat habitat
protected com.sun.enterprise.v3.server.ApplicationLifecycle appLife
protected com.sun.enterprise.v3.server.SnifferManager snifMan
protected com.sun.enterprise.deploy.shared.ArchiveFactory archiveFactory
protected com.sun.enterprise.v3.server.ServerEnvironment env
| Constructor Detail |
|---|
public GlassFish()
throws GFException
In particular, no HTTP listener is configured out of the box, so you'd have to add
some programatically via createHttpListener(int) and createVirtualServer(GFHttpListener).
GFException
public GlassFish(int httpPort)
throws GFException
GFException| Method Detail |
|---|
public static void setLogLevel(java.util.logging.Level level)
protected com.sun.hk2.component.InhabitantsParser decorateInhabitantsParser(com.sun.hk2.component.InhabitantsParser parser)
protected java.io.File createTempDir()
throws java.io.IOException
java.io.IOExceptionpublic GFVirtualServer createVirtualServer(GFHttpListener listener)
public GFHttpListener createHttpListener(int listenerPort)
public GFApplication deploy(java.io.File archive)
throws java.io.IOException
java.io.IOException
public GFApplication deploy(org.glassfish.api.deployment.archive.ReadableArchive a)
throws java.io.IOException
java.io.IOExceptionpublic void stop()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||