com.bea.wli.sb.transports
Class TransportException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by com.bea.wli.sb.transports.TransportException
All Implemented Interfaces:
java.io.Serializable

public class TransportException
extends java.lang.Exception

Represents an exception within the OSB Transport subsystem (either in a specific transport provider or in the transport framework itself). A transport exception can be optionally initialized with a combination of error message, code and cause.

If set, the error code is usually one of:

  • TransportManager.TRANSPORT_ERROR_GENERIC
  • TransportManager.TRANSPORT_ERROR_CONNECTION
  • TransportManager.TRANSPORT_ERROR_APPLICATION
  • The usage of the source errorPayload is deprecated. In case of error in the outbound transport call, a transport provider may throw a TransportException and propagate the error back to the pipeline instead of scheduling the callback TransportSendListener.onError(OutboundTransportMessageContext, String, String) If the inbound transport endpoint at the other end of the pipeline is soap service, and unless an error handler customizes the response, the error code and error message will appear in the soap fault

    See Also:
    Serialized Form

    Constructor Summary
    TransportException()
              Constructs a TransportException.
    TransportException(weblogic.logging.Loggable loggable)
               
    TransportException(weblogic.logging.Loggable loggable, java.lang.Throwable cause)
               
    TransportException(java.lang.String msg)
              Constructs a TransportException with the specified message text.
    TransportException(java.lang.String message, Source errorPayload)
              Deprecated.  
    TransportException(java.lang.String msg, java.lang.String errorCode)
              Constructs a TransportException with the specified message text and specified error code
    TransportException(java.lang.String message, java.lang.Throwable cause)
              Constructs a TransportException with the specified detail message and cause.
    TransportException(java.lang.String message, java.lang.Throwable cause, java.lang.String errorCode)
              Constructs a TransportException with the specified detail message and cause and error code.
    TransportException(java.lang.Throwable cause)
              Constructs a TransportException with the specified cause and a detail message of (cause==null ? null : cause.toString()) (which typically contains the class and detail message of cause).
    TransportException(java.lang.Throwable cause, java.lang.String errorCode)
              Constructs a TransportException with the specified cause and error code.
     
    Method Summary
     java.lang.String getErrorCode()
               
     Source getErrorPayload()
              Deprecated.  
    static TransportException newInstance(java.lang.Throwable cause)
              Most transport SDK API signatures declare only TransportException to be thrown.
     
    Methods inherited from class java.lang.Throwable
    fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
     
    Methods inherited from class java.lang.Object
    equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
     

    Constructor Detail

    TransportException

    public TransportException()
    Constructs a TransportException.


    TransportException

    public TransportException(java.lang.String msg)
    Constructs a TransportException with the specified message text.

    Parameters:
    msg - Message text.

    TransportException

    public TransportException(java.lang.String msg,
                              java.lang.String errorCode)
    Constructs a TransportException with the specified message text and specified error code

    Parameters:
    msg - Message text.
    errorCode - error code

    TransportException

    public TransportException(java.lang.String message,
                              java.lang.Throwable cause)
    Constructs a TransportException with the specified detail message and cause.

    Parameters:
    message - the detail message (which is saved for later retrieval by the Throwable.getMessage() method).
    cause - the cause (which is saved for later retrieval by the Throwable.getCause() method). (A null value is permitted, and indicates that the cause is nonexistent or unknown.)

    TransportException

    public TransportException(java.lang.String message,
                              java.lang.Throwable cause,
                              java.lang.String errorCode)
    Constructs a TransportException with the specified detail message and cause and error code.

    Parameters:
    message - the detail message (which is saved for later retrieval by the Throwable.getMessage() method).
    cause - the cause (which is saved for later retrieval by the Throwable.getCause() method). (A null value is permitted, and indicates that the cause is nonexistent or unknown.)
    errorCode - error code

    TransportException

    public TransportException(java.lang.Throwable cause)
    Constructs a TransportException with the specified cause and a detail message of (cause==null ? null : cause.toString()) (which typically contains the class and detail message of cause). This constructor is useful for exceptions that are little more than wrappers for other throwables (for example, PrivilegedActionException).

    Parameters:
    cause - the cause (which is saved for later retrieval by the Throwable.getCause() method). (A null value is permitted, and indicates that the cause is nonexistent or unknown.)

    TransportException

    public TransportException(java.lang.Throwable cause,
                              java.lang.String errorCode)
    Constructs a TransportException with the specified cause and error code.

    Parameters:
    cause - the cause (which is saved for later retrieval by the Throwable.getCause() method). (A null value is permitted, and indicates that the cause is nonexistent or unknown.)
    errorCode - error code

    TransportException

    public TransportException(java.lang.String message,
                              Source errorPayload)
    Deprecated. 

    Parameters:
    message - error message
    errorPayload - error payload source

    TransportException

    public TransportException(weblogic.logging.Loggable loggable)

    TransportException

    public TransportException(weblogic.logging.Loggable loggable,
                              java.lang.Throwable cause)
    Method Detail

    getErrorPayload

    public Source getErrorPayload()
    Deprecated. 

    Returns:
    error payload for transport exception

    getErrorCode

    public java.lang.String getErrorCode()

    newInstance

    public static TransportException newInstance(java.lang.Throwable cause)
    Most transport SDK API signatures declare only TransportException to be thrown. This utility method will wrap any Transport or non-Transport exception appropriately in a TransportException. Typical usage is
      void someAPI()
         throws TransportException
      {
         try
         {
            ....
         }
         catch (Exception e)
         {
            throw TransportException.newInstance(e);
         }
      }
     

    Parameters:
    cause - original cause of the exception
    Returns:
    new TransportException that wraps the original cause