Package io.dropwizard.lifecycle
Interface ServerLifecycleListener
-
- All Superinterfaces:
EventListener
public interface ServerLifecycleListener extends EventListener
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default int
getAdminPort(org.eclipse.jetty.server.Server server)
Return the local port of the lastServerConnector
in the providedServer
instance.default int
getLocalPort(org.eclipse.jetty.server.Server server)
Return the local port of the firstServerConnector
in the providedServer
instance.default List<PortDescriptor>
getPortDescriptorList(org.eclipse.jetty.server.Server server)
Return the ports mapped to the protocols each theServerConnector
s in the providedServer
instance.void
serverStarted(org.eclipse.jetty.server.Server server)
-
-
-
Method Detail
-
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 firstServerConnector
in the providedServer
instance.- 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 lastServerConnector
in the providedServer
instance. 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
default List<PortDescriptor> getPortDescriptorList(org.eclipse.jetty.server.Server server)
Return the ports mapped to the protocols each theServerConnector
s in the providedServer
instance.- Parameters:
server
- Server instance to use- Returns:
- Map of local ports to protocols for the server instance
- Since:
- 2.0
-
-