de.fzj.unicore.wsrflite.jetty
Class JettyServer

java.lang.Object
  extended by de.fzj.unicore.wsrflite.jetty.JettyServer

public class JettyServer
extends Object

a Jetty server hosting an xfire servlet

Author:
schuller

Field Summary
protected static HashMap<String,Integer> defaults
           
static String FAST_SESSION_ID
          use faster (but less secure) session ID generator default: false
static String LOW_RESOURCE_MAX_IDLE_TIME
          in low resource conditions, time (in ms.) before an idle connection will time out (default: 5000)
static String LOW_THREADS
          lowThreads is a threshold indicator.
static String MAX_IDLE_TIME
          time (in ms.) before an idle connection will time out (default: 30000)
static String MAX_THREADS
          maximum nuber of threads to have in the Jetty thread pool (default: 255)
static String MIN_THREADS
          minimum nuber of threads to have in the Jetty thread pool (default: 1)
static String SO_LINGER_TIME
          Socket linger time default: not set
 
Constructor Summary
JettyServer()
           
JettyServer(org.mortbay.jetty.webapp.WebAppContext webappCtx)
           
 
Method Summary
protected  void addServlets()
           
protected  void addWebApplication(org.mortbay.jetty.webapp.WebAppContext webapp)
           
protected  void configureConnector(org.mortbay.jetty.AbstractConnector http)
           
 void configureHandlers()
          Set up the handler structure to receive a webapp.
protected  void configureServer()
           
protected  org.mortbay.jetty.AbstractConnector createConnector(int port, String host)
           
protected  org.mortbay.jetty.AbstractConnector createSecureConnector(int port, String host)
           
 org.mortbay.jetty.servlet.Context getRootContext()
           
 org.mortbay.jetty.Server getServer()
          get the Jetty server
 String getUrl()
           
 void start()
           
 void stop()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MIN_THREADS

public static final String MIN_THREADS
minimum nuber of threads to have in the Jetty thread pool (default: 1)

See Also:
Constant Field Values

MAX_THREADS

public static final String MAX_THREADS
maximum nuber of threads to have in the Jetty thread pool (default: 255)

See Also:
Constant Field Values

LOW_THREADS

public static final String LOW_THREADS
lowThreads is a threshold indicator. If the available number of threads in the pool dips under this value (especially when max threads is reached), per connection max idle time will be cut from normal to low-resource (default: 50)

See Also:
Constant Field Values

MAX_IDLE_TIME

public static final String MAX_IDLE_TIME
time (in ms.) before an idle connection will time out (default: 30000)

See Also:
Constant Field Values

LOW_RESOURCE_MAX_IDLE_TIME

public static final String LOW_RESOURCE_MAX_IDLE_TIME
in low resource conditions, time (in ms.) before an idle connection will time out (default: 5000)

See Also:
LOW_THREADS, Constant Field Values

SO_LINGER_TIME

public static final String SO_LINGER_TIME
Socket linger time default: not set

See Also:
Constant Field Values

FAST_SESSION_ID

public static final String FAST_SESSION_ID
use faster (but less secure) session ID generator default: false

See Also:
Constant Field Values

defaults

protected static final HashMap<String,Integer> defaults
Constructor Detail

JettyServer

public JettyServer()
            throws Exception
Throws:
Exception

JettyServer

public JettyServer(org.mortbay.jetty.webapp.WebAppContext webappCtx)
            throws Exception
Throws:
Exception
Method Detail

start

public void start()
           throws Exception
Throws:
Exception

stop

public void stop()
          throws Exception
Throws:
Exception

configureServer

protected void configureServer()

createConnector

protected org.mortbay.jetty.AbstractConnector createConnector(int port,
                                                              String host)

configureHandlers

public void configureHandlers()
                       throws Exception
Set up the handler structure to receive a webapp. Also put in a DefaultHandler so we get a nice page than a 404 if we hit the root and the webapp's context isn't at root.

Throws:
Exception

addWebApplication

protected void addWebApplication(org.mortbay.jetty.webapp.WebAppContext webapp)
                          throws Exception
Throws:
Exception
See Also:
org.mortbay.jetty.plugin.util.JettyPluginServer#addWebApplication(java.lang.Object)

createSecureConnector

protected org.mortbay.jetty.AbstractConnector createSecureConnector(int port,
                                                                    String host)

configureConnector

protected void configureConnector(org.mortbay.jetty.AbstractConnector http)

addServlets

protected void addServlets()
                    throws Exception
Throws:
Exception

getRootContext

public org.mortbay.jetty.servlet.Context getRootContext()

getUrl

public String getUrl()
Returns:
Returns the url.

getServer

public org.mortbay.jetty.Server getServer()
get the Jetty server

Returns:
server


Copyright © 2010. All Rights Reserved.