jSyncManager

org.jSyncManager.API.Transport
Class TransportException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--org.jSyncManager.API.Transport.TransportException
All Implemented Interfaces:
java.io.Serializable

public class TransportException
extends java.lang.Exception

An exception class for dealing with errors while initializing the transport class.

Version:
$Revision: 1.4 $
Author:
Brad BARCLAY <bbarclay@jsyncmanager.org>, Last modified by: $Author: yaztromo $ on $Date: 2003/04/23 00:22:54 $.
See Also:
Serialized Form

Field Summary
static byte TRANSPORT_EXCEPTION_OCCURRED
          A constant to denote that this exception was generated when an exception occurred.
static byte TRANSPORT_EXCEPTION_UNDEFINED
          A constant used to denote that this exception was generated for an undefined reason.
static byte TRANSPORT_NOT_ENOUGH_INFO
          A constant to denote that this exception was generated when the initializer failed due to insufficient transport configuration.
static byte TRANSPORT_NOT_INITIALIZED
          A constant to denote that this exception was generated because an I/O operation on the transport was requested before it was initialized.
 
Constructor Summary
TransportException(byte reasonCode)
          Constructor to construct a TransportInitException that was caused due to insufficient config information.
TransportException(java.lang.Throwable e)
          Constructor to construct a TransportInitException that was caused due to an exception.
TransportException(java.lang.Throwable e, byte reasonCode)
          Constructor to construct a TransportInitException that was caused due to an exception, with a developer-specified reason code.
 
Method Summary
 java.lang.Throwable getException()
          Returns the exception that caused this exception to be generated.
 byte getReasonCode()
          Returns the reason code for why this exception was generated.
 java.lang.String toString()
          Converts this transport exception to a human-readable String.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

TRANSPORT_EXCEPTION_UNDEFINED

public static final byte TRANSPORT_EXCEPTION_UNDEFINED
A constant used to denote that this exception was generated for an undefined reason. Use of this type should be carefully considered, and avoided whenever possible. As this reason code doesn't allow you to attach any other information, it's generally preferable that you create a new instance of Exception, and imbed that into a new TransportException.

TRANSPORT_EXCEPTION_OCCURRED

public static final byte TRANSPORT_EXCEPTION_OCCURRED
A constant to denote that this exception was generated when an exception occurred.

TRANSPORT_NOT_ENOUGH_INFO

public static final byte TRANSPORT_NOT_ENOUGH_INFO
A constant to denote that this exception was generated when the initializer failed due to insufficient transport configuration.

TRANSPORT_NOT_INITIALIZED

public static final byte TRANSPORT_NOT_INITIALIZED
A constant to denote that this exception was generated because an I/O operation on the transport was requested before it was initialized.
Constructor Detail

TransportException

public TransportException(byte reasonCode)
Constructor to construct a TransportInitException that was caused due to insufficient config information.
Parameters:
reasonCode - the reason code representing why this exception was thrown.

TransportException

public TransportException(java.lang.Throwable e)
Constructor to construct a TransportInitException that was caused due to an exception. This constructor will assume the reason code is TRANSPORT_EXCEPTION_OCCURRED.
Parameters:
e - the Exception that caused this exception to be thrown.

TransportException

public TransportException(java.lang.Throwable e,
                          byte reasonCode)
Constructor to construct a TransportInitException that was caused due to an exception, with a developer-specified reason code.
Parameters:
e - the Exception that caused this exception to be thrown.
reasonCode - the reason code representing why this exception was thrown.
Method Detail

getReasonCode

public byte getReasonCode()
Returns the reason code for why this exception was generated.
Returns:
the reason code for why this exception was generated.

getException

public java.lang.Throwable getException()
Returns the exception that caused this exception to be generated. This method returns null if this exception was generated for a reason other than an exception being thrown in the transport initializer.
Returns:
the Throwable that caused this to be thrown, or null if no exception caused this one.

toString

public java.lang.String toString()
Converts this transport exception to a human-readable String.
Overrides:
toString in class java.lang.Throwable
Returns:
a human-readable String describing this TransportException.

jSyncManager

Copyright (c) 1999 - 2003 Brad BARCLAY and others. All Rights Reserved.