public enum LifecycleComponentImpl extends Enum<LifecycleComponentImpl> implements LifecycleComponent
Enum Constant and Description |
---|
INSTANCE
The singleton instance.
|
Modifier and Type | Method and Description |
---|---|
HealthStatus |
getHealthStatus(String serviceId)
Returns the health status of a given service.
|
Map<String,HealthStatus> |
getHealthStatuses()
Returns map with health status objects for all contained public services (usually one!).
|
List<String> |
getPublicServices()
Returns a list of all publicly accessable services.
|
ServiceInfo |
getServiceInfo(String serviceId)
Collects and returns the info about the specified service.
|
boolean |
isOnline()
Returns true if the service is online.
|
void |
printStatusToLogInfo()
Logs a standard message to info.
|
void |
printStatusToSystemOut()
Prints a standard message to system out.
|
void |
registerPublicService(String descriptor,
ServiceAdapter instance)
Registers a service locally running service instance.
|
void |
shutdown(String message)
Shutdowns the current VM and logs the message.
|
static LifecycleComponentImpl |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static LifecycleComponentImpl[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final LifecycleComponentImpl INSTANCE
public static LifecycleComponentImpl[] values()
for (LifecycleComponentImpl c : LifecycleComponentImpl.values()) System.out.println(c);
public static LifecycleComponentImpl valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant
with the specified nameNullPointerException
- if the argument is nullpublic boolean isOnline()
LifecycleComponent
isOnline
in interface LifecycleComponent
public void printStatusToSystemOut()
LifecycleComponent
printStatusToSystemOut
in interface LifecycleComponent
public void printStatusToLogInfo()
LifecycleComponent
printStatusToLogInfo
in interface LifecycleComponent
public List<String> getPublicServices()
LifecycleComponent
getPublicServices
in interface LifecycleComponent
public void registerPublicService(String descriptor, ServiceAdapter instance)
LifecycleComponent
registerPublicService
in interface LifecycleComponent
public ServiceInfo getServiceInfo(String serviceId)
LifecycleComponent
getServiceInfo
in interface LifecycleComponent
serviceId
- the target service id.public void shutdown(String message)
LifecycleComponent
shutdown
in interface LifecycleComponent
public HealthStatus getHealthStatus(String serviceId)
LifecycleComponent
getHealthStatus
in interface LifecycleComponent
public Map<String,HealthStatus> getHealthStatuses()
LifecycleComponent
getHealthStatuses
in interface LifecycleComponent
Copyright © 2010-2014 anotheria.net. All Rights Reserved.