Package io.bootique.jetty.server
Class ServerHolder
- java.lang.Object
-
- io.bootique.jetty.server.ServerHolder
-
public class ServerHolder extends Object
Holds JettyServerwith additional metadata information. Used by various extensions to extract server URLs.- Since:
- 2.0
-
-
Constructor Summary
Constructors Constructor Description ServerHolder(org.eclipse.jetty.server.Server server, String context, Collection<ConnectorHolder> connectors)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ConnectorHoldergetConnector()Returns the singleConnectorHolder.Stream<ConnectorHolder>getConnectors()intgetConnectorsCount()StringgetContext()org.eclipse.jetty.server.ServergetServer()StringgetUrl()Returns a URL of the service assuming there is a single connector.Stream<String>getUrls()voidstop()
-
-
-
Constructor Detail
-
ServerHolder
public ServerHolder(org.eclipse.jetty.server.Server server, String context, Collection<ConnectorHolder> connectors)
-
-
Method Detail
-
getServer
public org.eclipse.jetty.server.Server getServer()
-
getContext
public String getContext()
-
getConnectorsCount
public int getConnectorsCount()
-
getUrl
public String getUrl()
Returns a URL of the service assuming there is a single connector. If connector count is not equal to one, an exception is thrown.
-
getConnector
public ConnectorHolder getConnector()
Returns the singleConnectorHolder. If connector count is not equal to one, an exception is thrown.
-
getConnectors
public Stream<ConnectorHolder> getConnectors()
-
-