Class GrpcServerLifecycleEvent
java.lang.Object
java.util.EventObject
org.springframework.context.ApplicationEvent
org.springframework.grpc.server.lifecycle.GrpcServerLifecycleEvent
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
GrpcServerShutdownEvent, GrpcServerStartedEvent, GrpcServerTerminatedEvent
public abstract class GrpcServerLifecycleEvent
extends org.springframework.context.ApplicationEvent
The base event for
GrpcServerLifecycle.- Author:
- Michael ([email protected])
- See Also:
-
Field Summary
Fields inherited from class EventObject
source -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedGrpcServerLifecycleEvent(GrpcServerLifecycle lifecyle, io.grpc.Server server) Creates a new GrpcServerLifecycleEvent.protectedGrpcServerLifecycleEvent(GrpcServerLifecycle lifecyle, Clock clock, io.grpc.Server server) Creates a new GrpcServerLifecycleEvent. -
Method Summary
Modifier and TypeMethodDescriptionio.grpc.ServerGets the server related to this event.Gets the lifecycle instance that triggered this event.Methods inherited from class org.springframework.context.ApplicationEvent
getTimestampMethods inherited from class EventObject
toString
-
Constructor Details
-
GrpcServerLifecycleEvent
protected GrpcServerLifecycleEvent(GrpcServerLifecycle lifecyle, Clock clock, io.grpc.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
Creates a new GrpcServerLifecycleEvent.- Parameters:
lifecyle- The lifecycle that caused this event.server- The server related to this event.
-
-
Method Details
-
getServer
public io.grpc.Server getServer()Gets the server related to this event.- Returns:
- The server instance.
-
getSource
Gets the lifecycle instance that triggered this event.- Overrides:
getSourcein classEventObject
-