Class GrpcServerStartedEvent

All Implemented Interfaces:
Serializable

public class GrpcServerStartedEvent extends GrpcServerLifecycleEvent
This event will be fired after the server has been started.
See Also:
  • Constructor Details

    • GrpcServerStartedEvent

      public GrpcServerStartedEvent(GrpcServerLifecycle lifecyle, Clock clock, Server server, String address, int port)
      Creates a new GrpcServerStartedEvent.
      Parameters:
      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.
    • GrpcServerStartedEvent

      public GrpcServerStartedEvent(GrpcServerLifecycle lifecyle, Server server, String address, int port)
      Creates a new GrpcServerStartedEvent.
      Parameters:
      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.
  • Method Details

    • getAddress

      public String getAddress()
      Gets the address the server server was started with.
      Returns:
      The address to use.
    • getPort

      public int getPort()
      Gets the main port the server uses.
      Returns:
      The main port of the server. -1 indicates that the server isn't bound to a particular port.