Package io.dropwizard.lifecycle
Interface ServerLifecycleListener
- All Superinterfaces:
EventListener
-
Method Summary
Modifier and TypeMethodDescriptiondefault intgetAdminPort(org.eclipse.jetty.server.Server server) Return the local port of the lastServerConnectorin the providedServerinstance.default intgetLocalPort(org.eclipse.jetty.server.Server server) Return the local port of the firstServerConnectorin the providedServerinstance.default List<PortDescriptor>getPortDescriptorList(org.eclipse.jetty.server.Server server) Return the ports mapped to the protocols each theServerConnectors in the providedServerinstance.voidserverStarted(org.eclipse.jetty.server.Server server)
-
Method Details
-
serverStarted
void serverStarted(org.eclipse.jetty.server.Server server) -
getLocalPort
default int getLocalPort(org.eclipse.jetty.server.Server server) Return the local port of the firstServerConnectorin the providedServerinstance.- Parameters:
server- Server instance to use- Returns:
- First local port of the server instance
-
getAdminPort
default int getAdminPort(org.eclipse.jetty.server.Server server) Return the local port of the lastServerConnectorin the providedServerinstance. This may be the same value as returned bygetLocalPort(Server)if using the "simple" server configuration.- Parameters:
server- Server instance to use- Returns:
- Last local port or the server instance
-
getPortDescriptorList
Return the ports mapped to the protocols each theServerConnectors in the providedServerinstance.- Parameters:
server- Server instance to use- Returns:
- Map of local ports to protocols for the server instance
- Since:
- 2.0
-