com.ibm.jtopenlite
Class DataStreamException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.io.IOException
              extended by com.ibm.jtopenlite.DataStreamException
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
DatabaseException

public class DataStreamException
extends IOException

An IOException that represents an error processing a System i Host Server datastream reply.

See Also:
Serialized Form

Field Summary
static String BAD_LENGTH
          Constant representing a datastream reply type that has an unexpected datastream length (LL).
static String BAD_REPLY
          Constant representing a datastream reply type that has an unexpected reply.
static String BAD_RETURN_CODE
          Constant representing a datastream reply type that has an unsuccessful return code.
static String ERROR_MESSAGE
          Constant representing a datastream reply type that contains an error message.
 
Constructor Summary
protected DataStreamException(String type, String dataStreamName, int value)
           
 
Method Summary
 void addMessage(Message message)
          Associates a message with this exception.
static DataStreamException badLength(String dataStreamName, int value)
          Factory method for constructing a datastream exception with the provided bad length value.
static DataStreamException badReply(String dataStreamName, int codepoint)
          Factory method for constructing a datastream exception with the provided bad reply value.
static DataStreamException badReturnCode(String dataStreamName, int value)
          Factory method for constructing a datastream exception with the provided bad return code value.
static DataStreamException errorMessage(String dataStreamName, Message message)
          Factory method for constructing a datastream exception with the provided error message.
 String getDataStreamName()
          Returns the name of the datastream that caused this exception.
 Message getErrorMessage()
          Returns the primary error message associated with this exception, if any.
 Message[] getErrorMessages()
          Returns the array of error messages associated with this exception, if any.
 String getType()
          Returns the datastream reply type.
 int getValue()
          Returns the value associated with this exception, if any.
 
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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

BAD_RETURN_CODE

public static final String BAD_RETURN_CODE
Constant representing a datastream reply type that has an unsuccessful return code.

See Also:
Constant Field Values

BAD_LENGTH

public static final String BAD_LENGTH
Constant representing a datastream reply type that has an unexpected datastream length (LL).

See Also:
Constant Field Values

BAD_REPLY

public static final String BAD_REPLY
Constant representing a datastream reply type that has an unexpected reply.

See Also:
Constant Field Values

ERROR_MESSAGE

public static final String ERROR_MESSAGE
Constant representing a datastream reply type that contains an error message.

See Also:
Constant Field Values
Constructor Detail

DataStreamException

protected DataStreamException(String type,
                              String dataStreamName,
                              int value)
Method Detail

getType

public String getType()
Returns the datastream reply type.


getDataStreamName

public String getDataStreamName()
Returns the name of the datastream that caused this exception.


getValue

public int getValue()
Returns the value associated with this exception, if any.


getErrorMessage

public Message getErrorMessage()
Returns the primary error message associated with this exception, if any.


addMessage

public void addMessage(Message message)
Associates a message with this exception.


getErrorMessages

public Message[] getErrorMessages()
Returns the array of error messages associated with this exception, if any.


badReturnCode

public static DataStreamException badReturnCode(String dataStreamName,
                                                int value)
Factory method for constructing a datastream exception with the provided bad return code value.


badLength

public static DataStreamException badLength(String dataStreamName,
                                            int value)
Factory method for constructing a datastream exception with the provided bad length value.


badReply

public static DataStreamException badReply(String dataStreamName,
                                           int codepoint)
Factory method for constructing a datastream exception with the provided bad reply value.


errorMessage

public static DataStreamException errorMessage(String dataStreamName,
                                               Message message)
Factory method for constructing a datastream exception with the provided error message.