Interface LifecycleComponent

All Known Implementing Classes:
LifecycleComponentImpl

public interface LifecycleComponent
Defines an internal component that controls lifecycle of services inside of distributeme distributed vms.
Version:
$Id: $Id
Author:
lrosenberg
  • Method Details

    • isOnline

      boolean isOnline()
      Returns true if the service is online. Actually this method always returns true since all services are active for now, however you can call this method from a remote stub to detect whether the service replies at all.
      Returns:
      a boolean.
    • printStatusToSystemOut

      void printStatusToSystemOut()
      Prints a standard message to system out.
    • printStatusToLogInfo

      void printStatusToLogInfo()
      Logs a standard message to info.
    • getPublicServices

      List<String> getPublicServices()
      Returns a list of all publicly accessable services. Publicly accessable in this context means that the service is accessible via the remote interface. It doesn't include support services like event service bridge or lifecycle service itself, which are meant to have another usage.
      Returns:
      a List object.
    • registerPublicService

      void registerPublicService(String serviceId, ServiceAdapter instance)
      Registers a service locally running service instance.
      Parameters:
      serviceId - a String object.
      instance - a ServiceAdapter object.
    • getServiceInfo

      ServiceInfo getServiceInfo(String serviceId)
      Collects and returns the info about the specified service.
      Parameters:
      serviceId - the target service id.
      Returns:
      a ServiceInfo object.
    • shutdown

      void shutdown(String message)
      Shutdowns the current VM and logs the message.
      Parameters:
      message - a String object.
    • getHealthStatus

      HealthStatus getHealthStatus(String serviceId)
      Returns the health status of a given service.
      Parameters:
      serviceId - a String object.
      Returns:
      a HealthStatus object.
    • getHealthStatuses

      Map<String,HealthStatus> getHealthStatuses()
      Returns map with health status objects for all contained public services (usually one!).
      Returns:
      a Map object.