Class FSDISOMsg

All Implemented Interfaces:
Externalizable, Serializable, Cloneable, Loggeable

public class FSDISOMsg extends ISOMsg implements Cloneable
An ISOMsg backed by a FSDMsg for fixed-schema message processing.
See Also:
  • Constructor Details

    • FSDISOMsg

      public FSDISOMsg()
      Default constructor.
    • FSDISOMsg

      public FSDISOMsg(FSDMsg fsd)
      Creates an FSDISOMsg wrapping the given FSDMsg.
      Parameters:
      fsd - the FSDMsg to wrap
  • Method Details

    • getMTI

      public String getMTI()
      Description copied from class: ISOMsg
      Returns the message type indicator.
      Overrides:
      getMTI in class ISOMsg
      Returns:
      current MTI
    • pack

      public byte[] pack() throws ISOException
      Description copied from class: ISOMsg
      Packs this message using the configured packager.
      Overrides:
      pack in class ISOMsg
      Returns:
      the packed message
      Throws:
      ISOException - on packing error
    • unpack

      public int unpack(byte[] b) throws ISOException
      Description copied from class: ISOMsg
      Unpacks the raw byte array into this message.
      Overrides:
      unpack in class ISOMsg
      Parameters:
      b - - raw message
      Returns:
      consumed bytes
      Throws:
      ISOException - on unpacking error
    • unpack

      public void unpack(InputStream in) throws IOException, ISOException
      Description copied from class: ISOMsg
      Unpacks this component by reading from in.
      Overrides:
      unpack in class ISOMsg
      Parameters:
      in - source stream
      Throws:
      IOException - on I/O failure
      ISOException - on unpacking error
    • getFSDMsg

      public FSDMsg getFSDMsg()
      Returns the underlying FSDMsg instance.
      Returns:
      the underlying FSDMsg
    • getString

      public String getString(int fldno)
      Description copied from class: ISOMsg
      Return the String value associated with the given ISOField number
      Overrides:
      getString in class ISOMsg
      Parameters:
      fldno - the Field Number
      Returns:
      field's String value
    • getString

      public String getString(String fld)
      Description copied from class: ISOMsg
      Return the String value associated with the given field path
      Overrides:
      getString in class ISOMsg
      Parameters:
      fld - field path
      Returns:
      field's String value (may be null)
    • hasField

      public boolean hasField(int fldno)
      Description copied from class: ISOMsg
      Check if a given field is present
      Overrides:
      hasField in class ISOMsg
      Parameters:
      fldno - the Field Number
      Returns:
      boolean indicating the existence of the field
    • hasField

      public boolean hasField(String fld)
      Description copied from class: ISOMsg
      Check if a field indicated by a fpath is present
      Overrides:
      hasField in class ISOMsg
      Parameters:
      fld - dot-separated field path (i.e. 63.2)
      Returns:
      true if field present
    • dump

      public void dump(PrintStream p, String indent)
      Description copied from class: ISOMsg
      dump the message to a PrintStream. The output is sorta XML, intended to be easily parsed.
      Each component is responsible for its own dump function, ISOMsg just calls dump on every valid field.
      Specified by:
      dump in interface Loggeable
      Overrides:
      dump in class ISOMsg
      Parameters:
      p - - print stream
      indent - - optional indent string
    • writeExternal

      public void writeExternal(ObjectOutput out) throws IOException
      Specified by:
      writeExternal in interface Externalizable
      Overrides:
      writeExternal in class ISOMsg
      Throws:
      IOException
    • readExternal

      Specified by:
      readExternal in interface Externalizable
      Overrides:
      readExternal in class ISOMsg
      Throws:
      IOException
      ClassNotFoundException
    • clone

      public Object clone()
      Overrides:
      clone in class ISOMsg
    • clone

      public Object clone(int[] fields)
      Description copied from class: ISOMsg
      Partially clone an ISOMsg
      Overrides:
      clone in class ISOMsg
      Parameters:
      fields - int array of fields to go
      Returns:
      new ISOMsg instance
    • merge

      public void merge(ISOMsg m)
      Description copied from class: ISOMsg
      Merges the content of the specified ISOMsg into this ISOMsg instance, excluding the header. This method is a convenience wrapper around ISOMsg.merge(ISOMsg, boolean) with the mergeHeader parameter set to false for backward compatibility, indicating that the header of the input message will not be merged.
      Overrides:
      merge in class ISOMsg
      Parameters:
      m - the ISOMsg to merge into this message
    • setResponseMTI

      public void setResponseMTI()
      Description copied from class: ISOMsg
      sets an appropriate response MTI. i.e. 0100 becomes 0110
      i.e. 0201 becomes 0210
      i.e. 1201 becomes 1210
      Overrides:
      setResponseMTI in class ISOMsg
    • set

      public void set(String name, String value)
      Description copied from class: ISOMsg
      Creates an ISOField associated with fldno within this ISOMsg.
      Overrides:
      set in class ISOMsg
      Parameters:
      name - dot-separated field path (i.e. 63.2)
      value - field value