Package org.jpos.iso

Class ISOComponent

    • Constructor Summary

      Constructors 
      Constructor Description
      ISOComponent()  
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      abstract void dump​(java.io.PrintStream p, java.lang.String indent)  
      byte[] getBytes()
      get Value as bytes (when possible)
      java.util.Map getChildren()
      dummy behaviour - return empty map
      ISOComponent getComposite()
      In order to interchange Composites and Leafs we use getComposite().
      abstract int getFieldNumber()  
      java.lang.Object getKey()
      valid on Leafs only.
      int getMaxField()
      a Composite must override this function
      java.lang.Object getValue()
      valid on Leafs only.
      abstract byte[] pack()  
      void pack​(java.io.OutputStream out)  
      void set​(ISOComponent c)
      Set a field within this message
      abstract void setFieldNumber​(int fieldNumber)
      changes this Component field number
      Use with care, this method does not change any reference held by a Composite.
      abstract void setValue​(java.lang.Object obj)  
      abstract int unpack​(byte[] b)  
      abstract void unpack​(java.io.InputStream in)  
      void unset​(int fldno)
      Unset a field
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getComposite

        public ISOComponent getComposite()
        In order to interchange Composites and Leafs we use getComposite(). A Composite component returns itself and a Leaf returns null. The base class ISOComponent provides Leaf functionality.
        Returns:
        ISOComponent
      • getKey

        public java.lang.Object getKey()
                                throws ISOException
        valid on Leafs only. The value returned is used by ISOMsg as a key to this field.
        Returns:
        object representing the field number
        Throws:
        ISOException
      • getMaxField

        public int getMaxField()
        a Composite must override this function
        Returns:
        the max field number associated with this message
      • getChildren

        public java.util.Map getChildren()
        dummy behaviour - return empty map
        Returns:
        children (in this case 0 children)
      • setFieldNumber

        public abstract void setFieldNumber​(int fieldNumber)
        changes this Component field number
        Use with care, this method does not change any reference held by a Composite.
        Parameters:
        fieldNumber - new field number
      • dump

        public abstract void dump​(java.io.PrintStream p,
                                  java.lang.String indent)