Package net.devh.boot.grpc.server.event
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
The base event for
GrpcServerLifecycle.- See Also:
-
Field Summary
Fields inherited from class java.util.EventObject
source -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedGrpcServerLifecycleEvent(GrpcServerLifecycle lifecyle, Server server) Creates a new GrpcServerLifecycleEvent.protectedGrpcServerLifecycleEvent(GrpcServerLifecycle lifecyle, Clock clock, Server server) Creates a new GrpcServerLifecycleEvent. -
Method Summary
Modifier and TypeMethodDescriptionGets 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 java.util.EventObject
toString
-
Constructor Details
-
GrpcServerLifecycleEvent
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
Gets the server related to this event.- Returns:
- The server instance.
-
getSource
Gets the lifecycle instance that triggered this event.- Overrides:
getSourcein classEventObject
-