public class InstanceShutdownEvent extends Event
InstanceShutdownEvent signal about service instance shutdown or restart.
Unlike InstanceShutdownEvent this one not include configuration information and only contains data to identify
instance in system. This two events work together and configuration info from startup event only duplicates in
shutdown event.
To create instance of InstanceShutdownEvent use {InstanceShutdownEvent.Builder}.
Required properties is instanceId and version. All other are optional and can be null.
By default, event creates with random generated id and current time timestamp value. If necessary create copy of
other event or convert from DTO you must set value of both parameters id and timestamp.
When only one of two parameters initialized builder ignore it.
| Modifier and Type | Class and Description |
|---|---|
static class |
InstanceShutdownEvent.Builder
Builder for constructing
InstanceShutdownEvent objects. |
| Modifier and Type | Method and Description |
|---|---|
static InstanceShutdownEvent.Builder |
builder()
Create new instance of
InstanceShutdownEvent.Builder. |
java.lang.String |
getInstanceId()
Returns id of service instance.
|
java.lang.String |
getNodeId()
Returns node id of service instance.
|
java.net.URI |
getUri()
Returns URI to root path of service instance.
|
java.lang.String |
getVersion()
Returns version of service instance.
|
getId, getTimestamppublic java.lang.String getInstanceId()
public java.lang.String getVersion()
public java.lang.String getNodeId()
null.public java.net.URI getUri()
URI object. If URI not present returns null.public static InstanceShutdownEvent.Builder builder()
InstanceShutdownEvent.Builder.