com.atlassian.crowd.server.console
Class Server

java.lang.Object
  extended by org.mortbay.util.Container
      extended by org.mortbay.http.HttpServer
          extended by org.mortbay.jetty.Server
              extended by com.atlassian.crowd.server.console.Server
All Implemented Interfaces:
java.io.Serializable, org.mortbay.util.EventProvider, org.mortbay.util.LifeCycle

public class Server
extends org.mortbay.jetty.Server

This class uses Jetty to run the Crowd web server.

You can run the user by passing the port and webapp directory into the constructor, or pass a jetty configuration file from the command line. Having this lets us execute the jar from the command line

See Also:
Serialized Form

Field Summary
static java.lang.String DEFAULT_JETTY_CONFIG
           
 
Constructor Summary
Server(int port, java.lang.String webAppDir, java.lang.String contextPathSpec)
          Instantiate the server without using a jetty configuration file.
Server(java.lang.String string)
          Instantiate the server using a jetty configuration file.
 
Method Summary
 javax.servlet.ServletContext getWebApp()
          Provide access to the Bamboo web application context.
static void main(java.lang.String[] args)
          Used by the Java Service Wrapper to run the program.
 
Methods inherited from class org.mortbay.jetty.Server
addWebApplication, addWebApplication, addWebApplications, addWebApplications, addWebApplications, addWebApplications, addWebApplications, configure, getConfiguration, getRootWebApp, getStopAtShutdown, getWebApplicationConfigurationClassNames, newHttpContext, newWebApplicationContext, setRootWebApp, setStopAtShutdown, setWebApplicationConfigurationClassNames
 
Methods inherited from class org.mortbay.http.HttpServer
addContext, addContext, addContext, addContext, addHostAlias, addListener, addListener, addListener, addRealm, destroy, doStart, doStop, findHandler, getConnections, getConnectionsDurationAve, getConnectionsDurationMax, getConnectionsDurationMin, getConnectionsDurationTotal, getConnectionsOpen, getConnectionsOpenMax, getConnectionsOpenMin, getConnectionsRequestsAve, getConnectionsRequestsMax, getConnectionsRequestsMin, getContext, getContext, getContext, getContexts, getErrors, getHostMap, getHttpServerList, getHttpServers, getListeners, getRealm, getRequestLog, getRequests, getRequestsActive, getRequestsActiveMax, getRequestsActiveMin, getRequestsDurationAve, getRequestsDurationMax, getRequestsDurationMin, getRequestsDurationTotal, getRequestsPerGC, getResolveRemoteHost, getServerClasses, getStatsOn, getStatsOnMs, getStopGracefully, getSystemClasses, getTrace, join, removeContext, removeListener, removeRealm, save, service, setAnonymous, setContexts, setListeners, setRequestLog, setRequestsPerGC, setResolveRemoteHost, setServerClasses, setStatsOn, setStopGracefully, setSystemClasses, setTrace, statsReset, stop
 
Methods inherited from class org.mortbay.util.Container
addComponent, addEventListener, getComponents, isStarted, isStarting, isStopping, removeComponent, removeEventListener, start, stop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.mortbay.util.LifeCycle
isStarted, start, stop
 
Methods inherited from interface org.mortbay.util.EventProvider
addEventListener, removeEventListener
 

Field Detail

DEFAULT_JETTY_CONFIG

public static final java.lang.String DEFAULT_JETTY_CONFIG
See Also:
Constant Field Values
Constructor Detail

Server

public Server(int port,
              java.lang.String webAppDir,
              java.lang.String contextPathSpec)
       throws java.io.IOException
Instantiate the server without using a jetty configuration file.

Parameters:
port - The port bamboo is listening on
webAppDir - The location of the bamboo webapp files
contextPathSpec - The context path spec. Which must be of the form / or /path/*
Throws:
java.io.IOException

Server

public Server(java.lang.String string)
       throws java.lang.Exception
Instantiate the server using a jetty configuration file.

Parameters:
string - Location of the Jetty config file
Throws:
java.lang.Exception - if the server cannot be configured
Method Detail

main

public static void main(java.lang.String[] args)
Used by the Java Service Wrapper to run the program.

Parameters:
args - The arguments contained in the conf/wrapper.conf file

getWebApp

public javax.servlet.ServletContext getWebApp()
Provide access to the Bamboo web application context.

Used for acceptance testing

Returns:
The web app context÷


Copyright © 2009 Atlassian Pty Ltd. All Rights Reserved.