com.ibm.wsspi.zos.connect

Class ServiceException

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • com.ibm.wsspi.zos.connect.ServiceException
  • All Implemented Interfaces:
    java.io.Serializable


    public class ServiceException
    extends java.lang.Exception
    A ServiceException is thrown to indicate that the OSGI service implementing the Service SPI encountered an error.
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor and Description
      ServiceException()
      Constructs a new instance with null as its detail message and cause.
      ServiceException(int httpServletResponseCode)
      Constructs a new instance with a HTTP response code and a null detail message and cause.
      ServiceException(java.lang.String message)
      Constructs a new instance with the specified detail message.
      ServiceException(java.lang.String message, int httpServletResponseCode)
      Constructs a new instance with the specified detail message and HTTP servlet response code.
      ServiceException(java.lang.String message, java.lang.Throwable throwable)
      Constructs a new instance with the specified detail message and cause.
      ServiceException(java.lang.String message, java.lang.Throwable throwable, int httpServletResponseCode)
      Constructs a new instance with the specified detailed message, cause, and HTTP servlet response code.
      ServiceException(java.lang.Throwable throwable)
      Constructs a new instance with the specified cause.
      ServiceException(java.lang.Throwable throwable, int httpServletResponseCode)
      Constructs a new instance with the specified cause and HTTP servlet response code.
    • Method Summary

      Methods 
      Modifier and Type Method and Description
      int getHttpServletResponseCode()
      Returns the HTTP servlet response code of this Throwable.
      ServiceStatus getServiceStatus()
      Retrieves the ServiceStatus instance.
      void setServiceStatus(ServiceStatus serviceStatus)
      Sets a serviceStatus object containing service status information.
      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • ServiceException

        public ServiceException()
        Constructs a new instance with null as its detail message and cause.
      • ServiceException

        public ServiceException(int httpServletResponseCode)
        Constructs a new instance with a HTTP response code and a null detail message and cause.
        Parameters:
        httpServletResponseCode - The HTTP servlet response code to return to the caller.
      • ServiceException

        public ServiceException(java.lang.String message)
        Constructs a new instance with the specified detail message.
        Parameters:
        message - The detail message.
      • ServiceException

        public ServiceException(java.lang.String message,
                        int httpServletResponseCode)
        Constructs a new instance with the specified detail message and HTTP servlet response code.
        Parameters:
        message - The detail message.
        httpServletResponseCode - The HTTP servlet response code.
      • ServiceException

        public ServiceException(java.lang.Throwable throwable)
        Constructs a new instance with the specified cause.
        Parameters:
        throwable - The cause of type Throwable.
      • ServiceException

        public ServiceException(java.lang.Throwable throwable,
                        int httpServletResponseCode)
        Constructs a new instance with the specified cause and HTTP servlet response code.
        Parameters:
        throwable - The cause of type Throwable.
        httpServletResponseCode - The HTTP servlet response code.
      • ServiceException

        public ServiceException(java.lang.String message,
                        java.lang.Throwable throwable)
        Constructs a new instance with the specified detail message and cause.
        Parameters:
        message - The detail message.
        throwable - The cause of type Throwable.
      • ServiceException

        public ServiceException(java.lang.String message,
                        java.lang.Throwable throwable,
                        int httpServletResponseCode)
        Constructs a new instance with the specified detailed message, cause, and HTTP servlet response code.
        Parameters:
        message - The detail message.
        throwable - The cause of type Throwable.
        httpServletResponseCode - The HTTP servlet response code.
    • Method Detail

      • setServiceStatus

        public void setServiceStatus(ServiceStatus serviceStatus)
        Sets a serviceStatus object containing service status information.
        Parameters:
        serviceStatus - The status.
      • getServiceStatus

        public ServiceStatus getServiceStatus()
        Retrieves the ServiceStatus instance.
        Returns:
        The ServiceStatus object if previously set. Null otherwise.
      • getHttpServletResponseCode

        public int getHttpServletResponseCode()
        Returns the HTTP servlet response code of this Throwable.
        Returns:
        The HTTP response code. If it was not set, HttpServletResponse.SC_INTERNAL_SERVER_ERROR is returned.