Package org.eclipse.jetty.maven.plugin
Class ServerSupport
java.lang.Object
org.eclipse.jetty.maven.plugin.ServerSupport
ServerSupport
Helps configure the Server instance.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddWebApplication(Server server, WebAppContext webapp) Add a WebAppContext to a Serverstatic ServerapplyXmlConfigurations(Server server, List<File> files) Apply xml files to server instance.static ServerApply xml files to server instance.static voidConfigure at least one connector for the serverstatic voidstatic voidconfigureHandlers(Server server, List<ContextHandler> contextHandlers, RequestLog requestLog) Set up the handler structure to receive a webapp.static voidconfigureLoginServices(Server server, List<LoginService> loginServices) Set up any security LoginServices provided.static ContextHandlerCollectionfindContextHandlerCollection(Server server) Locate a ContextHandlerCollection for a Server.
-
Constructor Details
-
ServerSupport
public ServerSupport()
-
-
Method Details
-
configureDefaultConfigurationClasses
-
configureHandlers
public static void configureHandlers(Server server, List<ContextHandler> contextHandlers, RequestLog requestLog) throws Exception Set up the handler structure to receive a webapp. Also put in a DefaultHandler so we get a nicer page than a 404 if we hit the root and the webapp's context isn't at root.- Parameters:
server- the server to usecontextHandlers- the context handlers to includerequestLog- a request log to use- Throws:
Exception
-
configureConnectors
public static void configureConnectors(Server server, Connector connector, Map<String, String> properties) Configure at least one connector for the server- Parameters:
server- the serverconnector- the connectorproperties- jetty properties
-
configureLoginServices
Set up any security LoginServices provided.- Parameters:
server- the serverloginServices- the login services
-
addWebApplication
Add a WebAppContext to a Server- Parameters:
server- the server to usewebapp- the webapp to add- Throws:
Exception
-
findContextHandlerCollection
Locate a ContextHandlerCollection for a Server.- Parameters:
server- the Server to check.- Returns:
- The ContextHandlerCollection or null if not found.
-
applyXmlConfigurations
public static Server applyXmlConfigurations(Server server, List<File> files, Map<String, String> properties) throws ExceptionApply 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:
Exception- if unable to apply the xml configuration
-
applyXmlConfigurations
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:
Exception
-