Package com.isode.x400.highlevel
Class P7BindSession
- java.lang.Object
-
- com.isode.x400api.Session
-
- com.isode.x400.highlevel.P3BindSession
-
- com.isode.x400.highlevel.P7BindSession
-
public class P7BindSession extends P3BindSession
Abstracts the connection to a P7 Message Store
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
P7BindSession.Entry_Class
-
Field Summary
Fields Modifier and Type Field Description protected boolean
summarize_on_bind
-
Fields inherited from class com.isode.x400.highlevel.P3BindSession
available, bound, credentials, disable_config_requests, pa, sec_init, user_dn, user_oraddr
-
-
Constructor Summary
Constructors Constructor Description P7BindSession(java.lang.String presentation_address, java.lang.String or_addr, java.lang.String passwd)
Create a P7BindSession using the connection information providedP7BindSession(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.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
bind()
Bind to the Message Store with the information that has already been setvoid
deleteMessage(MSMessage msmessage_obj)
Delete message object , freeing the memory and resource, and also delete the message from the Message Store mailbox.void
deleteMessageObject(MSMessage msmessage_obj)
Delete message object, freeing the memory and resource, but retains the message in the Message Store mailboxint
getRefreshNumberOfMessages()
Checks again the number of messages in the Message Store mailbox, as it may have not been set before, or may need refreshing.java.util.ArrayList<ListResult>
listMailbox(java.lang.String since, P7BindSession.Entry_Class entry_class, boolean only_new_messages)
List the messages in the mailbox, returning an ArrayList ofListResult
objects, each one of them representing a message in the mailbox, that matched the requested search pattern.-
Methods inherited from class com.isode.x400.highlevel.P3BindSession
acquireSemaphore, getSession, isBound, receiveNextAvailableMessage, releaseSemaphore, setDisableConfigRequest, setSecurityEnv, setSecurityEnvPKCS12, setUserDN, unbind, unbind, waitForNewMessages
-
Methods inherited from class com.isode.x400api.Session
cancelWait, enableWait, GetNumMsgs, GetSummarizeOnBind, SetSummarizeOnBind
-
-
-
-
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+3001or_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+3001or_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 usersummarize
- issue a SUMMARIZE operation after a bind, to return the number of unread messages set to false by default
-
-
Method Detail
-
bind
public void bind() throws X400APIException
Bind to the Message Store with the information that has already been set- Overrides:
bind
in classP3BindSession
- Throws:
X400APIException
-
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 ofListResult
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_MESSAGESonly_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
-
-