public abstract class ServiceMetadata extends Object
Modifier and Type | Class and Description |
---|---|
static class |
ServiceMetadata.Builder |
Constructor and Description |
---|
ServiceMetadata() |
Modifier and Type | Method and Description |
---|---|
static ServiceMetadata.Builder |
builder()
Creates a new builder for
ServiceMetadata . |
static ServiceMetadata.Builder |
builder(ServiceMetadata serviceMetadata)
Creates a new builder initialized with the values from the provided serviceMetadata.
|
static ServiceMetadata |
create(BuildInfo buildInfo)
Creates an instance of
ServiceMetadata with the given build info, using the current
time for startup time and determining the host name automatically. |
abstract BuildInfo |
getBuildInfo()
Returns the build details of the assembly.
|
abstract Optional<String> |
getHostName()
Returns the host that the service is running on, e.g.
|
abstract Instant |
getStartupTime()
Returns approximately when the service was started.
|
public static ServiceMetadata.Builder builder()
ServiceMetadata
.public static ServiceMetadata.Builder builder(ServiceMetadata serviceMetadata)
public static ServiceMetadata create(BuildInfo buildInfo)
ServiceMetadata
with the given build info, using the current
time for startup time and determining the host name automatically.public abstract BuildInfo getBuildInfo()
public abstract Optional<String> getHostName()
The returned host may be an IP address if hostname could not be determined, or
Optional.empty()
if the IP address could not be determined.
public abstract Instant getStartupTime()
Copyright © 2018 Cerner Innovation, Inc.. All rights reserved.