com.ibm.jzos
Class ZLogstreamException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.io.IOException
              extended by com.ibm.jzos.ZLogstreamException
All Implemented Interfaces:
java.io.Serializable

public class ZLogstreamException
extends java.io.IOException

A customized IOException to carry return codes for ZLogstream errors.

See Also:
Serialized Form

Constructor Summary
ZLogstreamException(java.lang.String msg, java.lang.String logstreamName, int returnCode, int reasonCode)
          Construct a ZLogstreamException.
 
Method Summary
 java.lang.String getLogstreamName()
           
 java.lang.String getMessage()
          Get a message string to decribe the exception.
 int getReasonCode()
           
 int getReturnCode()
           
 boolean isStagingFormattingNotFinished()
          Answers true if RC=8/0x0868, which occurs the first time to try to write to a logger.
 boolean isTokenInvalidError()
          Answers true if RC=8/0x082D, which occurs if the thread that connected to the logstream terminates.
 void setLogstreamName(java.lang.String nm)
          Sets the logstreamName
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ZLogstreamException

public ZLogstreamException(java.lang.String msg,
                           java.lang.String logstreamName,
                           int returnCode,
                           int reasonCode)
Construct a ZLogstreamException.

Parameters:
msg - the message from the point where the error occurred
logstreamName - the name of the logstream
returnCode - the return code from the IXGXXX macro service
reasonCode - the reason code from the IXGXXX macro service
Method Detail

getMessage

public java.lang.String getMessage()
Get a message string to decribe the exception. This includes the original source message from the detecting routine, as well as errno, errno2, and last_op if errno is not 0.

Overrides:
getMessage in class java.lang.Throwable

getLogstreamName

public java.lang.String getLogstreamName()
Returns:
String - the name of the logstream

setLogstreamName

public void setLogstreamName(java.lang.String nm)
Sets the logstreamName


getReturnCode

public int getReturnCode()
Returns:
int - the value of the IXGXXX return code

getReasonCode

public int getReasonCode()
Returns:
int - the value of the IXGXXX reason code

isTokenInvalidError

public boolean isTokenInvalidError()
Answers true if RC=8/0x082D, which occurs if the thread that connected to the logstream terminates.


isStagingFormattingNotFinished

public boolean isStagingFormattingNotFinished()
Answers true if RC=8/0x0868, which occurs the first time to try to write to a logger.