Class SomX400Message

java.lang.Object
com.isode.som.messages.SomMessage
com.isode.som.messages.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
  • Constructor Details

    • 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 Details

    • getStringAttribute

      public 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
    • getPriorityName

      public String getPriorityName() throws SomException
      Get the priority for this message as a string
      Specified by:
      getPriorityName in class SomMessage
      Returns:
      priority value
      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 ArrayList<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