Class P7BindSession


  • public class P7BindSession
    extends P3BindSession
    Abstracts the connection to a P7 Message Store
    • Field Detail

      • summarize_on_bind

        protected boolean summarize_on_bind
    • Constructor Detail

      • P7BindSession

        public P7BindSession​(java.lang.String presentation_address,
                             java.lang.String or_addr,
                             java.lang.String passwd)
        Create a P7BindSession using the connection information provided
        Parameters:
        presentation_address - the P7 Message Store Presentation Address. Typical values are "3001"/Internet=myserver.mycompany.com+3001
        or_addr - the string encoded O/R address of the P7 Message Store user. For example /"cn=John Smith, o=Address Book, o=Isode, c=GB"
        passwd - the password that correspond to the P7 user
      • P7BindSession

        public P7BindSession​(java.lang.String presentation_address,
                             java.lang.String or_addr,
                             java.lang.String passwd,
                             boolean summarize)
        Create a P7BindSession using the connection information provided, and control the issuing of a SUMMARIZE operation after a bind.

        In case the result of this SUMMARIZE is not going to be used, it's better to set it to "false" to improve the performance of the Message Store.

        Parameters:
        presentation_address - the P7 Message Store Presentation Address. Typical values are "3001"/Internet=myserver.mycompany.com+3001
        or_addr - the string encoded O/R address of the P7 Message Store user. For example /"cn=John Smith, o=Address Book, o=Isode, c=GB"
        passwd - the password that correspond to the P7 user
        summarize - issue a SUMMARIZE operation after a bind, to return the number of unread messages set to false by default
    • Method Detail

      • listMailbox

        public java.util.ArrayList<ListResult> listMailbox​(java.lang.String since,
                                                           P7BindSession.Entry_Class entry_class,
                                                           boolean only_new_messages)
                                                    throws X400APIException
        List the messages in the mailbox, returning an ArrayList of ListResult objects, each one of them representing a message in the mailbox, that matched the requested search pattern.

        The information in ListResult contains, each message subject, size, read status, etc.

        Parameters:
        since - Date from which to list messages, in UTC Time format, or null if not used.
        entry_class - Type of entry to list. One of: MS_ENTRY_CLASS_STORED_MESSAGES MS_ENTRY_CLASS_SUBMITTED_MESSAGES
        only_new_messages - Whether to show only new messages
        Throws:
        X400APIException
      • deleteMessage

        public void deleteMessage​(MSMessage msmessage_obj)
                           throws X400APIException
        Delete message object , freeing the memory and resource, and also delete the message from the Message Store mailbox.
        Throws:
        X400APIException
      • deleteMessageObject

        public void deleteMessageObject​(MSMessage msmessage_obj)
                                 throws X400APIException
        Delete message object, freeing the memory and resource, but retains the message in the Message Store mailbox
        Throws:
        X400APIException
      • getRefreshNumberOfMessages

        public int getRefreshNumberOfMessages()
                                       throws X400APIException
        Checks again the number of messages in the Message Store mailbox, as it may have not been set before, or may need refreshing.
        Throws:
        X400APIException