public class GrpcServerStartedEvent extends GrpcServerLifecycleEvent
Server.start()
,
Serialized Formsource
Constructor and Description |
---|
GrpcServerStartedEvent(GrpcServerLifecycle lifecyle,
Clock clock,
Server server,
String address,
int port)
Creates a new GrpcServerStartedEvent.
|
GrpcServerStartedEvent(GrpcServerLifecycle lifecyle,
Server server,
String address,
int port)
Creates a new GrpcServerStartedEvent.
|
Modifier and Type | Method and Description |
---|---|
String |
getAddress()
Gets the address the server server was started with.
|
int |
getPort()
Gets the main port the server uses.
|
getServer, getSource
getTimestamp
toString
public GrpcServerStartedEvent(GrpcServerLifecycle lifecyle, Clock clock, Server server, String address, int port)
lifecyle
- The lifecycle that caused this event.clock
- The clock used to determine the timestamp.server
- The server related to this event.address
- The address the server is bound to.port
- The port the server is bound to or -1
if it isn't bound to a particular port.public GrpcServerStartedEvent(GrpcServerLifecycle lifecyle, Server server, String address, int port)
lifecyle
- The lifecycle that caused this event.server
- The server related to this event.address
- The address the server is bound to.port
- The port the server is bound to or -1
if it isn't bound to a particular port.public String getAddress()
public int getPort()
-1
indicates that the server isn't bound to a particular port.