Package com.isode.som.messages
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
-
-
Field Summary
-
Fields inherited from class com.isode.som.messages.SomMessage
data
-
-
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 messagebyte[]
getByteArrayAttribute(int type)
Get a byte array attribute typeint
getIntegerAttribute(int type)
Get an integer attribute value from a messagecom.isode.x400api.Message
getMessage()
Return underlying X400Message objectjava.util.ArrayList<java.lang.String>
getPrintableStringAttribute(int type)
Get a printable string attribute typejava.lang.String
getPriorityName()
Get the priority for this message as a stringcom.isode.x400api.Recip
getRecipient(int type, int num)
Get a recipient object from a messagejava.lang.String
getStringAttribute(int type)
Get a string attribute value from a message-
Methods inherited from class com.isode.som.messages.SomMessage
getData
-
-
-
-
Method Detail
-
getStringAttribute
public java.lang.String getStringAttribute(int type) throws SomException
Get a string attribute value from a message- Specified by:
getStringAttribute
in classSomMessage
- 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 classSomMessage
- 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 classSomMessage
- Parameters:
type
- the recipient type to getnum
- 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 classSomMessage
- Parameters:
num
- the index of this bodypart- Returns:
- bodypart object
- Throws:
SomException
- on error
-
getPriorityName
public java.lang.String getPriorityName() throws SomException
Get the priority for this message as a string- Specified by:
getPriorityName
in classSomMessage
- 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 classSomMessage
- 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
-
-