Agent System POND 1.2 (28.2.2002)

FIM.payment
Class DataWrapper

java.lang.Object
  |
  +--FIM.payment.DataWrapper
All Implemented Interfaces:
Serializable

public class DataWrapper
extends Object
implements Serializable

A wrapper for the data in DataPayment. The data can be either a string, an array of bytes or a serializable object. The type is decided in the constructor. Also contains a characteristic (description of the data) and its value. For easier usage, a flag is contained to mark it whether it has been sued for payment or not.

Version:
1.0
Author:
Michael Sonntag
See Also:
DataPayment, Serialized Form

Field Summary
 byte[] byteData
          The actual data: Type array of bytes.
 String characteristic
          The characteristic (=description) of the data.
 Serializable serialData
          The actual data: Type serializable object.
 String stringData
          The actual data: Type string.
 boolean used
          Flag to mark whether this data has already been used for payment or not.
 Price value
          The value of the data.
 
Constructor Summary
DataWrapper(String characteristic, byte[] byteData, Price value)
          Create a new data wrapper with the type array of bytes.
DataWrapper(String characteristic, Serializable serialData, Price value)
          Create a new data wrapper with the type serializable object.
DataWrapper(String characteristic, String stringData, Price value)
          Create a new data wrapper with the type string.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

value

public Price value
The value of the data.

characteristic

public String characteristic
The characteristic (=description) of the data.

stringData

public String stringData
The actual data: Type string.

byteData

public byte[] byteData
The actual data: Type array of bytes.

serialData

public Serializable serialData
The actual data: Type serializable object.

used

public boolean used
Flag to mark whether this data has already been used for payment or not.
Constructor Detail

DataWrapper

public DataWrapper(String characteristic,
                   String stringData,
                   Price value)
Create a new data wrapper with the type string.
Parameters:
characteristic - the description of the content
value - the value of the data
stringData - the string data

DataWrapper

public DataWrapper(String characteristic,
                   byte[] byteData,
                   Price value)
Create a new data wrapper with the type array of bytes.
Parameters:
characteristic - the description of the content
value - the value of the data
byteData - the byte data

DataWrapper

public DataWrapper(String characteristic,
                   Serializable serialData,
                   Price value)
Create a new data wrapper with the type serializable object.
Parameters:
characteristic - the description of the content
value - the value of the data
serialData - the object data

Agent System POND 1.2 (28.2.2002)

Submit a bug

Copyright 2001,2002 Michael Sonntag & Institute for Information Processing and Microprocessor Technology (FIM), Johannes-Kepler-University Linz, Altenbergerstr. 69, A-4040 Linz, Austria.