com.rapplogic.xbee.api
Class ErrorResponse

java.lang.Object
  extended by com.rapplogic.xbee.api.XBeeResponse
      extended by com.rapplogic.xbee.api.ErrorResponse
All Implemented Interfaces:
java.io.Serializable

public class ErrorResponse
extends XBeeResponse

Represents a Java error during packet parsing. This is the only class that extends XBeeResponse and does not map to a XBee API ID

Author:
andrew
See Also:
Serialized Form

Constructor Summary
ErrorResponse()
           
 
Method Summary
 java.lang.String getErrorMsg()
          A bit redundant in that it is the same as getException.getMessage()
 java.lang.Exception getException()
           
 void parse(IPacketParser parser)
          All subclasses must implement to parse the packet from the input stream.
 void setErrorMsg(java.lang.String errorMsg)
           
 void setException(java.lang.Exception exception)
           
 java.lang.String toString()
           
 
Methods inherited from class com.rapplogic.xbee.api.XBeeResponse
equals, finish, getApiId, getChecksum, getLength, getPacketBytes, getProcessedPacketBytes, getRawPacketBytes, hashCode, isError, setApiId, setChecksum, setError, setLength, setRawPacketBytes
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ErrorResponse

public ErrorResponse()
Method Detail

getErrorMsg

public java.lang.String getErrorMsg()
A bit redundant in that it is the same as getException.getMessage()

Returns:

setErrorMsg

public void setErrorMsg(java.lang.String errorMsg)

getException

public java.lang.Exception getException()

setException

public void setException(java.lang.Exception exception)

parse

public void parse(IPacketParser parser)
Description copied from class: XBeeResponse
All subclasses must implement to parse the packet from the input stream. The subclass must parse all bytes in the packet starting after the API_ID, and up to but not including the checksum. Reading either more or less bytes that expected will result in an error.

Specified by:
parse in class XBeeResponse

toString

public java.lang.String toString()
Overrides:
toString in class XBeeResponse