Package com.helger.photon.jetty
Class JettyRunner
- java.lang.Object
-
- com.helger.photon.jetty.JettyStarter
-
- com.helger.photon.jetty.JettyRunner
-
public class JettyRunner extends JettyStarter
A simple wrapper around Jetty. It synchronously starts and stops Jetty.- Since:
- 7.0.2
- Author:
- Philip Helger
-
-
Field Summary
-
Fields inherited from class com.helger.photon.jetty.JettyStarter
CONTAINER_INCLUDE_JAR_PATTERN_ALL, CONTAINER_INCLUDE_JAR_PATTERN_CLASSES, CONTAINER_INCLUDE_JAR_PATTERN_JAR, DEFAULT_ALLOW_ANNOTATION_BASED_CONFIG, DEFAULT_ALLOW_DIRECTORY_LISTING, DEFAULT_CONTAINER_INCLUDE_JAR_PATTERN, DEFAULT_CONTEXT_PATH, DEFAULT_PORT, DEFAULT_SESSION_COOKIE_NAME, DEFAULT_STOP_KEY, DEFAULT_STOP_PORT, DEFAULT_WEB_INF_INCLUDE_JAR_PATTERN
-
-
Constructor Summary
Constructors Constructor Description JettyRunner()JettyRunner(String sAppName)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidonServerStarted(org.eclipse.jetty.server.Server aServer)Callback to be invoked when server successfully finished startup.protected voidonServerStartFailure(org.eclipse.jetty.server.Server aServer, Throwable t)Callback to be invoked when server failed startup.voidshutDownServer()voidstartServer()-
Methods inherited from class com.helger.photon.jetty.JettyStarter
createWebAppContext, customizeHandlerList, customizeHttpConfiguration, customizeHttpConnectionFactory, customizeServer, customizeServerConnector, customizeWebAppCtx, getContainerIncludeJarPattern, getContextPath, getPort, getResourceBase, getSessionCookieName, getStopKey, getStopPort, getThreadPool, getWebInfIncludeJarPattern, getWebXmlResource, isAllowAnnotationBasedConfig, isAllowDirectoryListing, isRunStopMonitor, isSpecialSessionMgr, run, setAllowAnnotationBasedConfig, setAllowDirectoryListing, setContainerIncludeJarPattern, setContextPath, setPort, setResourceBase, setResourceBase, setRunStopMonitor, setSessionCookieName, setSpecialSessionMgr, setStopKey, setStopPort, setStopPort, setThreadPool, setWebInfIncludeJarPattern, setWebXmlResource
-
-
-
-
Method Detail
-
onServerStarted
protected void onServerStarted(@Nonnull org.eclipse.jetty.server.Server aServer)
Description copied from class:JettyStarterCallback to be invoked when server successfully finished startup.- Overrides:
onServerStartedin classJettyStarter- Parameters:
aServer- The server that was started. Nevernull.
-
onServerStartFailure
protected void onServerStartFailure(@Nonnull org.eclipse.jetty.server.Server aServer, @Nonnull Throwable t)
Description copied from class:JettyStarterCallback to be invoked when server failed startup.- Overrides:
onServerStartFailurein classJettyStarter- Parameters:
aServer- The server that was started. Nevernull.t- The exception that occurred
-
shutDownServer
public void shutDownServer() throws IOException, InterruptedException- Throws:
IOExceptionInterruptedException
-
-