Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Service Bus
11g Release 1 (11.1.1.7)

E15033-09


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:

Since 11.1.1.4, instances of this class can also specify additional metadata that can be interpreted by the pipeline and/or inbound transport. For more info, see setJavaFault(java.lang.Throwable) and setOpaqueData(java.util.Map<java.lang.String, java.lang.Object>)

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.  
 java.lang.Throwable getJavaFault()
          Get the java fault metadata.
 java.util.Map<java.lang.String,java.lang.Object> getOpaqueData()
          Get the opaque data.
static TransportException newInstance(java.lang.Throwable cause)
          Most transport SDK API signatures declare only TransportException to be thrown.
 TransportException setJavaFault(java.lang.Throwable fault)
          When throwing an exception on the request thread, instruct the pipeline to add a throwable to the $fault variable.
 TransportException setOpaqueData(java.util.Map<java.lang.String,java.lang.Object> data)
          Stores opaque (i.e.

 

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

@Deprecated
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

setJavaFault

public TransportException setJavaFault(java.lang.Throwable fault)
When throwing an exception on the request thread, instruct the pipeline to add a throwable to the $fault variable. This is typically used by Outbound Transport Endpoint of service type BindingTypeInfo.MessageTypeEnum.JAVA. This method is not thread-safe.
Parameters:
fault - throwable
Returns:
current TransportException instance
Since:
11.1.1.4

getJavaFault

public java.lang.Throwable getJavaFault()
Get the java fault metadata. See also setJavaFault(java.lang.Throwable) This method is not thread safe.
Returns:
Java fault's throwable, or null if no Java fault is set.
Since:
11.1.1.4

setOpaqueData

public TransportException setOpaqueData(java.util.Map<java.lang.String,java.lang.Object> data)
Stores opaque (i.e. unspecified/unstructured) data from transport providers. A typical use case is when a TransportException is thrown on the request thread by an outbound transport endpoint of type XYZ, and this endpoint wants to pass along some provider-specific data that can be retrieved by the calling inbound endpoint, which also happens to be of type XYZ and knows how to interpret the data. Note: inbound transport must send the message to the transport manager with the transport options TransportOptions.THROW_ON_ERROR
Parameters:
data - opaque data, a map of object keyed by string.
Returns:
updated transport exception instance
Since:
11.1.1.4

getOpaqueData

public java.util.Map<java.lang.String,java.lang.Object> getOpaqueData()
Get the opaque data. Se also setOpaqueData(java.util.Map<java.lang.String, java.lang.Object>). This method is not thread safe
Returns:
opaque (i.e. unspecified/unstructured) data from transport providers, may be null if none is set.
Since:
11.1.1.4

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Service Bus
11g Release 1 (11.1.1.7)

E15033-09


Copyright © 2008, 2013, Oracle. All rights reserved.