Class ConnectorException

  • All Implemented Interfaces:
    Serializable
    Direct Known Subclasses:
    ContainerStoppingException

    public class ConnectorException
    extends RuntimeException
    Throwing a ConnectorException is a shortcut for indicating an OperationResponse for all outstanding inputs to an operation. Throwing this exception is the equivalent of calling OperationResponse.addCombinedResult for all outstanding inputs with the statusCode and statusMessage included in the exception (and a null payload).
    See Also:
    Serialized Form
    • Constructor Detail

      • ConnectorException

        public ConnectorException​(Throwable cause)
      • ConnectorException

        public ConnectorException​(String statusMessage)
      • ConnectorException

        public ConnectorException​(String statusCode,
                                  String statusMessage)
      • ConnectorException

        public ConnectorException​(String statusMessage,
                                  Throwable cause)
      • ConnectorException

        public ConnectorException​(String statusCode,
                                  String statusMessage,
                                  Throwable cause)
    • Method Detail

      • getStatusCode

        public String getStatusCode()
      • getStatusMessage

        public String getStatusMessage()
      • getStatusCode

        public static String getStatusCode​(Throwable t)
        Gets a status code from the given Throwable. If the given Throwable is a ConnectorException, the referenced status codde is returned, otherwise NO_CODE.
        Parameters:
        t - Throwable to inspect, may be null
        Returns:
        a non-null status code
      • getStatusMessage

        public static String getStatusMessage​(Throwable t)
        Gets a status message from the given Throwable. If the given Throwable is a ConnectorException, the referenced status message is returned, otherwise the Throwable is converted to a meaningful error message.
        Parameters:
        t - Throwable to inspect, may be null
        Returns:
        a non-null status message