com.ibm.etill.framework.payapi
Class ReturnCodeStructure

java.lang.Object
  |
  +--com.ibm.etill.framework.payapi.ReturnCodeStructure

public final class ReturnCodeStructure
extends Object

This class is a structure to use when returning information to a caller in the form of a primary return code and a secondary return code.


Field Summary
 byte[] message
          The caller may want to include a message with the return code in the form of a byte array.
 
Constructor Summary
ReturnCodeStructure()
          Default Constructor.
ReturnCodeStructure(RCItem pRC, RCItem sRC)
          This constructor initializes the ReturnCodeStructure with a primary and secondary return code.
ReturnCodeStructure(short pRC, short sRC)
          This constructor initializes the ReturnCodeStructure with a primary and secondary return code.
 
Method Summary
 String getCassetteName()
          Returns the cassette name
 RCItem getPrimaryRC()
          Returns the Primary return code
 RCItem getSecondaryRC()
          Returns the Secondary return code
 void setCassetteName(String name)
          Sets the cassette name
 void setPrimaryRC(RCItem pRC)
          Sets the primary return code
 void setPrimaryRC(short pRC)
          Sets the primary return code
 void setSecondaryRC(RCItem sRC)
          Sets the secondary return code
 void setSecondaryRC(short sRC)
          Sets the secondary return code
 void write(DataOutputStream dos)
          Writes the ReturnCodeStructure to a DataOutputStream object.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

message

public byte[] message
The caller may want to include a message with the return code in the form of a byte array. This is accessed directly, no methods exist to set and get this data member.
Constructor Detail

ReturnCodeStructure

public ReturnCodeStructure()
Default Constructor. Has no functionality. This is called when the caller sets the primary and secondary return codes manually.

ReturnCodeStructure

public ReturnCodeStructure(short pRC,
                           short sRC)
This constructor initializes the ReturnCodeStructure with a primary and secondary return code.
Parameters:
pRC - short representing the primary return code
sRC - short representing the seconday return code

ReturnCodeStructure

public ReturnCodeStructure(RCItem pRC,
                           RCItem sRC)
This constructor initializes the ReturnCodeStructure with a primary and secondary return code.
Parameters:
pRC - RCItem representing the primary return code
sRC - RCItem representing the seconday return code
Method Detail

getPrimaryRC

public RCItem getPrimaryRC()
Returns the Primary return code
Returns:
RCItem - primary return code

setPrimaryRC

public final void setPrimaryRC(short pRC)
Sets the primary return code
Parameters:
pRC - primary return code

setPrimaryRC

public final void setPrimaryRC(RCItem pRC)
Sets the primary return code
Parameters:
pRC - primary return code

getSecondaryRC

public RCItem getSecondaryRC()
Returns the Secondary return code
Returns:
RCItem - secondary return code

getCassetteName

public String getCassetteName()
Returns the cassette name
Returns:
String - payment type

setSecondaryRC

public final void setSecondaryRC(short sRC)
Sets the secondary return code
Parameters:
sRC - secondary return code

setSecondaryRC

public final void setSecondaryRC(RCItem sRC)
Sets the secondary return code
Parameters:
sRC - secondary return code

setCassetteName

public final void setCassetteName(String name)
Sets the cassette name
Parameters:
name - the payment type

write

public void write(DataOutputStream dos)
           throws IOException
Writes the ReturnCodeStructure to a DataOutputStream object. The primary/secondary return codes and the message (if there is one) is formatted and written to the given DataOutputStream.
Throws:
IOException - Thrown if an error occurs with access to the DataOutputStream