Class ServiceStatus

  • All Implemented Interfaces:
    java.io.Serializable

    public class ServiceStatus
    extends java.lang.Object
    implements java.io.Serializable
    A representation of the current status of some service.
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      ServiceStatus​(java.lang.String parentName, java.lang.String serviceName, java.lang.String[] aliases, java.lang.String serviceClassName, java.lang.String modeName, java.lang.String stateName, java.lang.String substateName, java.lang.String[] dependencies, boolean dependencyFailed, java.lang.String exception, boolean dependencyUnavailable)
      Construct a new instance.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String[] getAliases()
      Get the service aliases, if any, as strings.
      java.lang.String[] getDependencies()
      The list of dependency names for this service.
      java.lang.String getException()
      Get the service start exception.
      java.lang.String getModeName()
      Get the service mode, as a string.
      java.lang.String getParentName()
      Get the name of the parent service, if any.
      java.lang.String getServiceClassName()
      Get the service class name, or "<unknown>" if not known.
      java.lang.String getServiceName()
      Get the service name, as a string.
      java.lang.String getStateName()
      Get the service state, as a string.
      java.lang.String getSubstateName()
      Get the service internal substate, as a string.
      boolean isDependencyFailed()
      Determine if some dependency was failed at the time of the query.
      boolean isDependencyUnavailable()
      Determine if some dependency was not available at the time of the query.
      java.lang.String toString()
      Get a string representation of the current status.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • serviceName

        private final java.lang.String serviceName
      • aliases

        private final java.lang.String[] aliases
      • serviceClassName

        private final java.lang.String serviceClassName
      • modeName

        private final java.lang.String modeName
      • stateName

        private final java.lang.String stateName
      • substateName

        private final java.lang.String substateName
      • dependencies

        private final java.lang.String[] dependencies
      • dependencyFailed

        private final boolean dependencyFailed
      • dependencyUnavailable

        private final boolean dependencyUnavailable
      • parentName

        private final java.lang.String parentName
      • exception

        private final java.lang.String exception
    • Constructor Detail

      • ServiceStatus

        @ConstructorProperties({"parentName","serviceName","serviceClassName","modeName","stateName","substateName","dependencies","dependencyFailed","exception","dependencyUnavailable"})
        public ServiceStatus​(java.lang.String parentName,
                             java.lang.String serviceName,
                             java.lang.String[] aliases,
                             java.lang.String serviceClassName,
                             java.lang.String modeName,
                             java.lang.String stateName,
                             java.lang.String substateName,
                             java.lang.String[] dependencies,
                             boolean dependencyFailed,
                             java.lang.String exception,
                             boolean dependencyUnavailable)
        Construct a new instance.
        Parameters:
        parentName - the name of the parent
        serviceName - the service name
        aliases - the aliases of this service
        serviceClassName - the name of the service class
        modeName - the service mode name
        stateName - the service state name
        substateName - the internal service substate name
        dependencies - the list of dependencies for this service
        dependencyFailed - true if some dependency is failed
        exception - the service start exception
        dependencyUnavailable - true if some dependency is unavailable
    • Method Detail

      • getServiceName

        public java.lang.String getServiceName()
        Get the service name, as a string.
        Returns:
        the service name
      • getAliases

        public java.lang.String[] getAliases()
        Get the service aliases, if any, as strings. If there are no aliases, an empty array is returned.
        Returns:
        the service aliases
      • getServiceClassName

        public java.lang.String getServiceClassName()
        Get the service class name, or "<unknown>" if not known.
        Returns:
        the service class name
      • getModeName

        public java.lang.String getModeName()
        Get the service mode, as a string.
        Returns:
        the service mode
      • getStateName

        public java.lang.String getStateName()
        Get the service state, as a string.
        Returns:
        the service state
      • getSubstateName

        public java.lang.String getSubstateName()
        Get the service internal substate, as a string.
        Returns:
        the service substate
      • getDependencies

        public java.lang.String[] getDependencies()
        The list of dependency names for this service.
        Returns:
        the dependency names
      • isDependencyFailed

        public boolean isDependencyFailed()
        Determine if some dependency was failed at the time of the query.
        Returns:
        true if some dependency was failed
      • isDependencyUnavailable

        public boolean isDependencyUnavailable()
        Determine if some dependency was not available at the time of the query.
        Returns:
        true if some dependency was unavailable
      • getException

        public java.lang.String getException()
        Get the service start exception.
        Returns:
        the service start exception
      • toString

        public java.lang.String toString()
        Get a string representation of the current status.
        Overrides:
        toString in class java.lang.Object
        Returns:
        a string representation
      • getParentName

        public java.lang.String getParentName()
        Get the name of the parent service, if any.
        Returns:
        the parent name