Package org.eclipse.jetty.maven.plugin
Class ServerSupport
- java.lang.Object
-
- org.eclipse.jetty.maven.plugin.ServerSupport
-
public class ServerSupport extends java.lang.ObjectServerSupport Helps configure the Server instance.
-
-
Constructor Summary
Constructors Constructor Description ServerSupport()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidaddWebApplication(Server server, WebAppContext webapp)static ServerapplyXmlConfigurations(Server server, java.util.List<java.io.File> files)Apply xml files to server instance.static ServerapplyXmlConfigurations(Server server, java.util.List<java.io.File> files, java.util.Map<java.lang.String,java.lang.String> properties)Apply xml files to server instance.static voidconfigureConnectors(Server server, Connector connector)Configure at least one connector for the serverstatic voidconfigureDefaultConfigurationClasses(Server server)static voidconfigureHandlers(Server server, RequestLog requestLog)Set up the handler structure to receive a webapp.static voidconfigureLoginServices(Server server, LoginService[] loginServices)Set up any security LoginServices provided.static ContextHandlerCollectionfindContextHandlerCollection(Server server)
-
-
-
Method Detail
-
configureDefaultConfigurationClasses
public static void configureDefaultConfigurationClasses(Server server)
-
configureHandlers
public static void configureHandlers(Server server, RequestLog requestLog) throws java.lang.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.- Parameters:
server- the serverrequestLog- the request log- Throws:
java.lang.Exception- if unable to configure the handlers
-
configureConnectors
public static void configureConnectors(Server server, Connector connector)
Configure at least one connector for the server- Parameters:
server- the serverconnector- the connector
-
configureLoginServices
public static void configureLoginServices(Server server, LoginService[] loginServices)
Set up any security LoginServices provided.- Parameters:
server- the serverloginServices- the login services
-
addWebApplication
public static void addWebApplication(Server server, WebAppContext webapp) throws java.lang.Exception
- Throws:
java.lang.Exception
-
findContextHandlerCollection
public static ContextHandlerCollection findContextHandlerCollection(Server server)
-
applyXmlConfigurations
public static Server applyXmlConfigurations(Server server, java.util.List<java.io.File> files, java.util.Map<java.lang.String,java.lang.String> properties) throws java.lang.Exception
Apply xml files to server instance.- Parameters:
server- the server to apply the xml tofiles- the list of xml filesproperties- list of jetty properties- Returns:
- the Server implementation, after the xml is applied
- Throws:
java.lang.Exception- if unable to apply the xml configuration
-
applyXmlConfigurations
public static Server applyXmlConfigurations(Server server, java.util.List<java.io.File> files) throws java.lang.Exception
Apply xml files to server instance.- Parameters:
server- the Server instance to configurefiles- the xml configs to apply- Returns:
- the Server after application of configs
- Throws:
java.lang.Exception- if unable to apply the xml configuration
-
-