org.codehaus.groovy.grails.web.container
Class JettyServer

java.lang.Object
  extended by org.codehaus.groovy.grails.web.container.JettyServer
All Implemented Interfaces:
EmbeddableServer, groovy.lang.GroovyObject

public class JettyServer
extends Object
implements EmbeddableServer, groovy.lang.GroovyObject


Field Summary
protected  String keyPassword
           
protected  String keystore
           
protected  File keystoreFile
           
 
Fields inherited from interface grails.web.container.EmbeddableServer
DEFAULT_HOST, DEFAULT_PORT, DEFAULT_SECURE_PORT
 
Constructor Summary
JettyServer(String warPath, String contextPath)
           
JettyServer(String basedir, String webXml, String contextPath, ClassLoader classLoader)
           
 
Method Summary
protected  groovy.lang.MetaClass $getStaticMetaClass()
           
protected  org.mortbay.jetty.Server configureHttpServer(org.mortbay.jetty.webapp.WebAppContext context)
           
protected  org.mortbay.jetty.Server configureHttpServer(org.mortbay.jetty.webapp.WebAppContext context, int serverPort)
           
protected  org.mortbay.jetty.Server configureHttpServer(org.mortbay.jetty.webapp.WebAppContext context, int serverPort, String serverHost)
           
protected  Object configureHttpsServer(org.mortbay.jetty.webapp.WebAppContext context)
           
protected  Object configureHttpsServer(org.mortbay.jetty.webapp.WebAppContext context, int httpPort)
           
protected  Object configureHttpsServer(org.mortbay.jetty.webapp.WebAppContext context, int httpPort, int httpsPort)
           
protected  Object configureHttpsServer(org.mortbay.jetty.webapp.WebAppContext context, int httpPort, int httpsPort, String serverHost)
           
protected  Object createSSLCertificate()
           
protected  org.mortbay.jetty.webapp.WebAppContext createStandardContext(String webappRoot, String webXml, String contextPath, ClassLoader classLoader)
           
 BuildSettings getBuildSettings()
           
 groovy.util.ConfigObject getConfig()
           
 org.mortbay.jetty.webapp.WebAppContext getContext()
           
 Object getEventListener()
           
 org.mortbay.jetty.Server getGrailsServer()
           
 groovy.lang.MetaClass getMetaClass()
           
 Object getProperty(String property)
           
protected  Object initialize()
           
 Object invokeMethod(String method, Object arguments)
           
 void restart()
          Typically combines the stop() and start() methods in order to restart the container
 void setBuildSettings(BuildSettings value)
           
 void setConfig(groovy.util.ConfigObject value)
           
 void setContext(org.mortbay.jetty.webapp.WebAppContext value)
           
 void setEventListener(Object value)
           
 void setGrailsServer(org.mortbay.jetty.Server value)
           
 void setMetaClass(groovy.lang.MetaClass mc)
           
 void setProperty(String property, Object value)
           
 void start()
          Starts the container on the default port
 void start(int port)
          Starts the container on the given port
 void start(String host, int port)
          Starts the container on the given port
 void startSecure()
          Starts a secure container running over HTTPS
 void startSecure(int httpsPort)
          Starts a secure container running over HTTPS for the given port
 void startSecure(String host, int httpPort, int httpsPort)
          Starts a secure container running over HTTPS for the given port and host.
protected  Object startServer(org.mortbay.jetty.Server grailsServer)
           
 void stop()
          Stops the container
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

keystore

protected String keystore

keystoreFile

protected File keystoreFile

keyPassword

protected String keyPassword
Constructor Detail

JettyServer

public JettyServer(String warPath,
                   String contextPath)

JettyServer

public JettyServer(String basedir,
                   String webXml,
                   String contextPath,
                   ClassLoader classLoader)
Method Detail

getBuildSettings

public BuildSettings getBuildSettings()

setBuildSettings

public void setBuildSettings(BuildSettings value)

getConfig

public groovy.util.ConfigObject getConfig()

setConfig

public void setConfig(groovy.util.ConfigObject value)

getContext

public org.mortbay.jetty.webapp.WebAppContext getContext()

setContext

public void setContext(org.mortbay.jetty.webapp.WebAppContext value)

getGrailsServer

public org.mortbay.jetty.Server getGrailsServer()

setGrailsServer

public void setGrailsServer(org.mortbay.jetty.Server value)

getEventListener

public Object getEventListener()

setEventListener

public void setEventListener(Object value)

initialize

protected Object initialize()

start

public void start()
Description copied from interface: EmbeddableServer
Starts the container on the default port

Specified by:
start in interface EmbeddableServer

start

public void start(int port)
Description copied from interface: EmbeddableServer
Starts the container on the given port

Specified by:
start in interface EmbeddableServer
Parameters:
port - The port number

start

public void start(String host,
                  int port)
Description copied from interface: EmbeddableServer
Starts the container on the given port

Specified by:
start in interface EmbeddableServer
Parameters:
host - The host to start on
port - The port number

startSecure

public void startSecure()
Description copied from interface: EmbeddableServer
Starts a secure container running over HTTPS

Specified by:
startSecure in interface EmbeddableServer

startSecure

public void startSecure(int httpsPort)
Description copied from interface: EmbeddableServer
Starts a secure container running over HTTPS for the given port

Specified by:
startSecure in interface EmbeddableServer
Parameters:
httpsPort - The port

startSecure

public void startSecure(String host,
                        int httpPort,
                        int httpsPort)
Description copied from interface: EmbeddableServer
Starts a secure container running over HTTPS for the given port and host.

Specified by:
startSecure in interface EmbeddableServer
Parameters:
host - The server host
httpPort - The port for HTTP traffic.
httpsPort - The port for HTTPS traffic.

stop

public void stop()
Description copied from interface: EmbeddableServer
Stops the container

Specified by:
stop in interface EmbeddableServer

restart

public void restart()
Description copied from interface: EmbeddableServer
Typically combines the stop() and start() methods in order to restart the container

Specified by:
restart in interface EmbeddableServer

startServer

protected Object startServer(org.mortbay.jetty.Server grailsServer)

createStandardContext

protected org.mortbay.jetty.webapp.WebAppContext createStandardContext(String webappRoot,
                                                                       String webXml,
                                                                       String contextPath,
                                                                       ClassLoader classLoader)

configureHttpServer

protected org.mortbay.jetty.Server configureHttpServer(org.mortbay.jetty.webapp.WebAppContext context,
                                                       int serverPort,
                                                       String serverHost)

configureHttpsServer

protected Object configureHttpsServer(org.mortbay.jetty.webapp.WebAppContext context,
                                      int httpPort,
                                      int httpsPort,
                                      String serverHost)

createSSLCertificate

protected Object createSSLCertificate()

configureHttpServer

protected org.mortbay.jetty.Server configureHttpServer(org.mortbay.jetty.webapp.WebAppContext context,
                                                       int serverPort)

configureHttpServer

protected org.mortbay.jetty.Server configureHttpServer(org.mortbay.jetty.webapp.WebAppContext context)

configureHttpsServer

protected Object configureHttpsServer(org.mortbay.jetty.webapp.WebAppContext context,
                                      int httpPort,
                                      int httpsPort)

configureHttpsServer

protected Object configureHttpsServer(org.mortbay.jetty.webapp.WebAppContext context,
                                      int httpPort)

configureHttpsServer

protected Object configureHttpsServer(org.mortbay.jetty.webapp.WebAppContext context)

$getStaticMetaClass

protected groovy.lang.MetaClass $getStaticMetaClass()

getMetaClass

public groovy.lang.MetaClass getMetaClass()
Specified by:
getMetaClass in interface groovy.lang.GroovyObject

setMetaClass

public void setMetaClass(groovy.lang.MetaClass mc)
Specified by:
setMetaClass in interface groovy.lang.GroovyObject

invokeMethod

public Object invokeMethod(String method,
                           Object arguments)
Specified by:
invokeMethod in interface groovy.lang.GroovyObject

getProperty

public Object getProperty(String property)
Specified by:
getProperty in interface groovy.lang.GroovyObject

setProperty

public void setProperty(String property,
                        Object value)
Specified by:
setProperty in interface groovy.lang.GroovyObject


Copyright (c) 2005-2009 The Grails project