Class GrpcServerLifecycleEvent

java.lang.Object
java.util.EventObject
org.springframework.context.ApplicationEvent
net.devh.boot.grpc.server.event.GrpcServerLifecycleEvent
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
GrpcServerShutdownEvent, GrpcServerStartedEvent, GrpcServerTerminatedEvent

public abstract class GrpcServerLifecycleEvent extends ApplicationEvent
The base event for GrpcServerLifecycle.
See Also:
  • Constructor Details

    • GrpcServerLifecycleEvent

      protected GrpcServerLifecycleEvent(GrpcServerLifecycle lifecyle, Clock clock, Server server)
      Creates a new GrpcServerLifecycleEvent.
      Parameters:
      lifecyle - The lifecycle that caused this event.
      clock - The clock used to determine the timestamp.
      server - The server related to this event.
    • GrpcServerLifecycleEvent

      protected GrpcServerLifecycleEvent(GrpcServerLifecycle lifecyle, Server server)
      Creates a new GrpcServerLifecycleEvent.
      Parameters:
      lifecyle - The lifecycle that caused this event.
      server - The server related to this event.
  • Method Details

    • getServer

      public Server getServer()
      Gets the server related to this event.
      Returns:
      The server instance.
    • getSource

      public GrpcServerLifecycle getSource()
      Gets the lifecycle instance that triggered this event.
      Overrides:
      getSource in class EventObject