Class SomX400Message


  • public class SomX400Message
    extends SomMessage
    Class for handling X.400 messages returned by SOM commands. Uses the low-level Java X.400 API to provide access to various components of the message.
    Author:
    tc
    • Field Summary

    • Constructor Summary

      Constructors 
      Constructor Description
      SomX400Message​(byte[] buf)
      Create a new SOMX400Message using a byte array containing the encoding of the message
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      com.isode.x400api.BodyPart getBodypart​(int num)
      Get a bodypart object from a message
      byte[] getByteArrayAttribute​(int type)
      Get a byte array attribute type
      int getIntegerAttribute​(int type)
      Get an integer attribute value from a message
      com.isode.x400api.Message getMessage()
      Return underlying X400Message object
      java.util.ArrayList<java.lang.String> getPrintableStringAttribute​(int type)
      Get a printable string attribute type
      java.lang.String getPriorityName()
      Get the priority for this message as a string
      com.isode.x400api.Recip getRecipient​(int type, int num)
      Get a recipient object from a message
      java.lang.String getStringAttribute​(int type)
      Get a string attribute value from a message
      • Methods inherited from class java.lang.Object

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

      • SomX400Message

        public SomX400Message​(byte[] buf)
        Create a new SOMX400Message using a byte array containing the encoding of the message
        Parameters:
        buf - containing the encoding of the message
    • Method Detail

      • getStringAttribute

        public java.lang.String getStringAttribute​(int type)
                                            throws SomException
        Get a string attribute value from a message
        Specified by:
        getStringAttribute in class SomMessage
        Parameters:
        type - the attribute type to get
        Returns:
        attribute value
        Throws:
        SomException - on error
      • getIntegerAttribute

        public int getIntegerAttribute​(int type)
                                throws SomException
        Get an integer attribute value from a message
        Specified by:
        getIntegerAttribute in class SomMessage
        Parameters:
        type - the attribute type to get
        Returns:
        attribute value
        Throws:
        SomException - on error
      • getRecipient

        public com.isode.x400api.Recip getRecipient​(int type,
                                                    int num)
                                             throws SomException
        Get a recipient object from a message
        Specified by:
        getRecipient in class SomMessage
        Parameters:
        type - the recipient type to get
        num - the index of this recipient
        Returns:
        recipient object
        Throws:
        SomException - on error
      • getBodypart

        public com.isode.x400api.BodyPart getBodypart​(int num)
                                               throws SomException
        Get a bodypart object from a message
        Specified by:
        getBodypart in class SomMessage
        Parameters:
        num - the index of this bodypart
        Returns:
        bodypart object
        Throws:
        SomException - on error
      • getMessage

        public com.isode.x400api.Message getMessage()
        Return underlying X400Message object
        Returns:
        message object
      • getByteArrayAttribute

        public byte[] getByteArrayAttribute​(int type)
                                     throws SomException
        Get a byte array attribute type
        Specified by:
        getByteArrayAttribute in class SomMessage
        Parameters:
        type - attribute type to get
        Returns:
        attribute value
        Throws:
        SomException - on error
      • getPrintableStringAttribute

        public java.util.ArrayList<java.lang.String> getPrintableStringAttribute​(int type)
                                                                          throws SomException
        Get a printable string attribute type
        Parameters:
        type - attribute type to get
        Returns:
        attribute values
        Throws:
        SomException - on error