Class JettyHolder
java.lang.Object
org.openspaces.pu.container.jee.jetty.holder.JettyHolder
- Direct Known Subclasses:
PlainJettyHolder,SharedJettyHolder
A generic holder that holds a Jetty server and controls its lifecycle. Note, make not to call
start and stop on
Server.- Author:
- kimchy
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidCloses Jetty ports.static intgetConfidentialPort(org.eclipse.jetty.server.Connector connector) static org.eclipse.jetty.server.HttpConfigurationgetHttpConfig(org.eclipse.jetty.server.Connector connector) abstract org.eclipse.jetty.server.ServerReturns the jetty server.static intgetSslConnectionPort(org.eclipse.jetty.server.Connector connector) static intgetSslPort(org.eclipse.jetty.server.Connector connector) abstract booleanReturnstrueif this is a single instance.voidOpen Jetty ports.voidstart()Start Jetty.voidstop()Stops Jetty.voidupdateConfidentialPort(int port, int newPort)
-
Constructor Details
-
JettyHolder
public JettyHolder()
-
-
Method Details
-
getServer
public abstract org.eclipse.jetty.server.Server getServer()Returns the jetty server. -
isSingleInstance
public abstract boolean isSingleInstance()Returnstrueif this is a single instance. -
openConnectors
Open Jetty ports.- Throws:
Exception
-
closeConnectors
Closes Jetty ports.- Throws:
Exception
-
start
Start Jetty. Note, if this fails, make sure to callstop()- Throws:
Exception
-
stop
Stops Jetty.- Throws:
Exception
-
updateConfidentialPort
public void updateConfidentialPort(int port, int newPort) -
getConfidentialPort
public static int getConfidentialPort(org.eclipse.jetty.server.Connector connector) -
getHttpConfig
public static org.eclipse.jetty.server.HttpConfiguration getHttpConfig(org.eclipse.jetty.server.Connector connector) -
getSslPort
public static int getSslPort(org.eclipse.jetty.server.Connector connector) -
getSslConnectionPort
public static int getSslConnectionPort(org.eclipse.jetty.server.Connector connector)
-