Class Recipient

java.lang.Object
com.isode.x400api.Recip
com.isode.x400.highlevel.Recipient

public class Recipient extends Recip
Provides a class that abstracts the recipient of a message.
This is used both when composing message to send, and also for processing received messages.
  • Constructor Details

    • Recipient

      public Recipient()
      Create an empty recipient. The values can be set later on with the set*() methods.
    • Recipient

      public Recipient(int attr, String value)
      Create a recipient, using the given attribute and value.

      For example, to create a Recipient with an O/R address, use the value X400_att.X400_S_OR_ADDRESS for attr, and the String encoded O/R address for the value.

      Another attr value supported is X400_att.X400_S_DIRECTORY_NAME which creates a Recipient using the DN.

      If attr is neither of these values, it will be assumed that the value passed is an string encoded O/R Name, which has the syntax:
      DN $ OR

      That is, a DN followed by the string " $ " and the O/R address.

      Parameters:
      attr - X400_att.X400_S_OR_ADDRESS or X400_att.X400_S_DIRECTORY_NAME
      value -
  • Method Details

    • toString

      public String toString()
      Overwrite the method, so that the O/R address becomes the normal way to represent it
      Overrides:
      toString in class Object
    • getORAddress

      public String getORAddress()
      Returns:
      the O/R address of the recipient
    • setORAddress

      public void setORAddress(String or)
      Sets the O/R address of the recipient
      Parameters:
      or - - The String encoded O/R address
    • getDN

      public String getDN()
      Returns:
      the DN of the recipient
    • setDN

      public void setDN(String d)
      Sets the DN of the recipient
      Parameters:
      d -
    • getNotificationRequest

      public int getNotificationRequest()
      Returns:
      the Notification Request for this recipient
    • setNotificationRequest

      public void setNotificationRequest(int r)
      Sets the notification request for this recipient
      Parameters:
      r -
    • getReplyRequest

      public int getReplyRequest()
      Returns:
      the Reply Request for this recipient
    • setReplyRequest

      public void setReplyRequest(int reply_request)
      Sets the Reply Request for this recipient
    • getFreeFormName

      public String getFreeFormName()
      Returns:
      the Free Form name for this recipient
      For example "John Smith"
    • setFreeFormName

      public void setFreeFormName(String f)
      Sets the Free Form Name for this recipient.
      For example "John Smith"
      Parameters:
      f -
    • getPrecedence

      public int getPrecedence()
      Returns:
      the Precedence value for this recipient
    • setPrecedence

      public void setPrecedence(int r)
      Sets the Precedence value for this recipient
      Parameters:
      r -