Class IsoMessage

java.lang.Object
cl.netswitch.iso.iso8583.IsoMessage
All Implemented Interfaces:
Serializable

public abstract class IsoMessage extends Object implements Serializable
Methods common (shared) by all ISO messages.
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructs a new IsoMessage instance.
  • Method Summary

    Modifier and Type
    Method
    Description
    final void
    copyFrom(Object source)
    Calls all setters in this message with values obtain from matching getters in a source object.
    final void
    copyTo(Object destin)
    Calls all setters in a destination object with values obtain from matching getters in this message.
    final long
    Returns the first bitmap of this message (DE-1,Format=b-8).
    final long
    Returns the second bitmap of this message (DE-65,Format=b-8).
    final Short
    Returns the Message Type Identification (DE-0,Format=n-4).
    final void
    Changes the Message Type Identification (DE-0,Format=n-4).
    protected final void
    updateBitmap(int index, Object value)
    Updates the bitmaps of this message adding or removing a field index.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • IsoMessage

      public IsoMessage()
      Constructs a new IsoMessage instance.
  • Method Details

    • getMti

      public final Short getMti()
      Returns the Message Type Identification (DE-0,Format=n-4).
      Returns:
      the Message Type Identification (DE-0,Format=n-4).
    • setMti

      public final void setMti(Short mti)
      Changes the Message Type Identification (DE-0,Format=n-4).
      Parameters:
      mti - the new value of the field (can be null).
    • getBitmap1

      public final long getBitmap1()
      Returns the first bitmap of this message (DE-1,Format=b-8).
      Returns:
      the first bitmap of this message (DE-1,Format=b-8).
    • getBitmap2

      public final long getBitmap2()
      Returns the second bitmap of this message (DE-65,Format=b-8).
      Returns:
      the second bitmap of this message (DE-65,Format=b-8).
    • updateBitmap

      protected final void updateBitmap(int index, Object value)
      Updates the bitmaps of this message adding or removing a field index.
      Parameters:
      index - the index of the field to add or remove in bitmaps.
      value - add index if this value is not null, else remove index.
      Throws:
      IndexOutOfBoundsException - if index is out-of-bounds.
    • copyFrom

      public final void copyFrom(Object source)
      Calls all setters in this message with values obtain from matching getters in a source object.

      In other words, this method executes the following statement for all matching getters and setters.

       this.setProperty(source.getProperty());
      A getter and setter match if the name and type of their respective properties are exactly the same.
      Parameters:
      source - the object whose getter methods are invoked.
      Throws:
      NullPointerException - if source if null.
      IllegalArgumentException - if another error occurs.
      See Also:
      • Beans.copy(Object, Object)
    • copyTo

      public final void copyTo(Object destin)
      Calls all setters in a destination object with values obtain from matching getters in this message.

      In other words, this method executes the following statement for all matching getters and setters.

       destin.setProperty(this.getProperty());
      A getter and setter match if the name and type of their respective properties are exactly the same.
      Parameters:
      destin - the object whose setter methods are invoked.
      Throws:
      NullPointerException - if target if null.
      IllegalArgumentException - if another error occurs.
      See Also:
      • Beans.copy(Object, Object)