Package com.ocient.transport

# Class TransportException

java.lang.Object
java.lang.Throwable
java.lang.Exception
com.ocient.transport.TransportException

All Implemented Interfaces:
  `Serializable`

Direct Known Subclasses:
  `ServerQuiesceException`

public class TransportException extends Exception
Signals that an I/O operation on a transport has failed. This exception is a subclass of `Exception`.

See Also:
  - Serialized Form

## Nested Class Summary

Nested Classes
Modifier and Type
Class
Description
`static enum`
`TransportException.FailMode`
Specifies whether the exception occurred during a send or receive operation.

## Constructor Summary

Constructors
Modifier
Constructor
Description
`protected`
`TransportException(TransportException.FailMode failMode, String message)`
Constructs a new TransportException with the specified error message.
`protected`
`TransportException(TransportException.FailMode failMode, String message, Throwable cause)`
Constructs a new TransportException with the specified fail mode and cause.
`protected`
`TransportException(TransportException.FailMode failMode, Throwable cause)`
Constructs a new TransportException with the specified fail mode and cause.

## Method Summary

Modifier and Type
Method
Description
`TransportException.FailMode`
`failMode()`
Returns the mode of the operation that failed.
`static TransportException`
`recv(Throwable cause)`
Creates a new `TransportException` object with a `FailMode` of `RECV` and the specified cause.
`static TransportException`
`send(Throwable cause)`
Creates a new `TransportException` object with a `FailMode` of `SEND` and the specified cause.

### 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

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

## Constructor Details

### TransportException

protected TransportException(TransportException.FailMode failMode, Throwable cause)
Constructs a new TransportException with the specified fail mode and cause.

Parameters:
  `failMode` - the mode of the operation that failed
  `cause` - the cause of the exception

### TransportException

protected TransportException(TransportException.FailMode failMode, String message)
Constructs a new TransportException with the specified error message.

Parameters:
  `failMode` - the mode of the operation that failed
  `message` - the error message

### TransportException

protected TransportException(TransportException.FailMode failMode, String message, Throwable cause)
Constructs a new TransportException with the specified fail mode and cause.

Parameters:
  `failMode` - the mode of the operation that failed
  `cause` - the cause of the exception

## Method Details

### send

public static TransportException send(Throwable cause)
Creates a new `TransportException` object with a `FailMode` of `SEND` and the specified cause.

Parameters:
  `cause` - the underlying cause of the exception
Returns:
  a new `TransportException` object

### recv

public static TransportException recv(Throwable cause)
Creates a new `TransportException` object with a `FailMode` of `RECV` and the specified cause.

Parameters:
  `cause` - the underlying cause of the exception
Returns:
  a new `TransportException` object

### failMode

public TransportException.FailMode failMode()
Returns the mode of the operation that failed.

Returns:
  the fail mode