JBoss Modular Service Kernel API 1.0.0.CR2

org.jboss.msc.service.management
Class ServiceStatus

java.lang.Object
  extended by org.jboss.msc.service.management.ServiceStatus
All Implemented Interfaces:
Serializable

public class ServiceStatus
extends Object
implements Serializable

A representation of the current status of some service.

Author:
David M. Lloyd
See Also:
Serialized Form

Constructor Summary
ServiceStatus(String parentName, String serviceName, String[] aliases, String serviceClassName, String modeName, String stateName, String substateName, String[] dependencies, boolean dependencyFailed, String exception, boolean dependencyUnavailable)
          Construct a new instance.
 
Method Summary
 String[] getAliases()
          Get the service aliases, if any, as strings.
 String[] getDependencies()
          The list of dependency names for this service.
 String getException()
          Get the service start exception.
 String getModeName()
          Get the service mode, as a string.
 String getParentName()
          Get the name of the parent service, if any.
 String getServiceClassName()
          Get the service class name, or "<unknown>" if not known.
 String getServiceName()
          Get the service name, as a string.
 String getStateName()
          Get the service state, as a string.
 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.
 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
 

Constructor Detail

ServiceStatus

@ConstructorProperties(value={"parentName","serviceName","serviceClassName","modeName","stateName","substateName","dependencies","dependencyFailed","exception","dependencyUnavailable"})
public ServiceStatus(String parentName,
                                                String serviceName,
                                                String[] aliases,
                                                String serviceClassName,
                                                String modeName,
                                                String stateName,
                                                String substateName,
                                                String[] dependencies,
                                                boolean dependencyFailed,
                                                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 String getServiceName()
Get the service name, as a string.

Returns:
the service name

getAliases

public 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 String getServiceClassName()
Get the service class name, or "<unknown>" if not known.

Returns:
the service class name

getModeName

public String getModeName()
Get the service mode, as a string.

Returns:
the service mode

getStateName

public String getStateName()
Get the service state, as a string.

Returns:
the service state

getSubstateName

public String getSubstateName()
Get the service internal substate, as a string.

Returns:
the service substate

getDependencies

public 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 String getException()
Get the service start exception.

Returns:
the service start exception

toString

public String toString()
Get a string representation of the current status.

Overrides:
toString in class Object
Returns:
a string representation

getParentName

public String getParentName()
Get the name of the parent service, if any.

Returns:
the parent name

JBoss Modular Service Kernel API 1.0.0.CR2

Copyright © 2011 JBoss, a division of Red Hat, Inc.