com.aspose.email

Interfaces

Classes

Enums

Exceptions

com.aspose.email

Class EWSClient

  • All Implemented Interfaces:
    IExchangeClientBase, com.aspose.ms.System.IDisposable


    public abstract class EWSClient
    extends ExchangeClientBase

    Provides access to MS Exchange Server by using Exchange Web Services (EWS).

    • Field Detail

      • Factory

        protected static final com.microsoft.schemas.exchange.services._2006.types.ObjectFactory Factory
        Constant Factory
      • Factory2

        protected static final com.microsoft.schemas.exchange.services._2006.messages.ObjectFactory Factory2
        Constant Factory2
      • cookieContainer

        protected com.aspose.email.ExchangeCookieContainer cookieContainer

        protected property

      • saajUrl

        protected URL saajUrl

        protected property

      • auto_NotificationTimeout

        protected int auto_NotificationTimeout

        protected property

      • auto_NotificationsCheckInterval

        protected int auto_NotificationsCheckInterval

        protected property

      • RootFolderServerNotificationsDelegate

        protected com.aspose.ms.System.EventHandler<ServerNotificationEventArgs> RootFolderServerNotificationsDelegate

        Occurs when arises specified event type for Root folder.

      • RootFolderServerNotifications

        public final com.aspose.ms.lang.Event<com.aspose.ms.System.EventHandler<ServerNotificationEventArgs>> RootFolderServerNotifications

        Occurs when arises specified event type for Root folder.

      • CalendarFolderServerNotificationsDelegate

        protected com.aspose.ms.System.EventHandler<ServerNotificationEventArgs> CalendarFolderServerNotificationsDelegate

        Occurs when arises specified event type for Calendar folder.

      • CalendarFolderServerNotifications

        public final com.aspose.ms.lang.Event<com.aspose.ms.System.EventHandler<ServerNotificationEventArgs>> CalendarFolderServerNotifications

        Occurs when arises specified event type for Calendar folder.

      • ContactsFolderServerNotificationsDelegate

        protected com.aspose.ms.System.EventHandler<ServerNotificationEventArgs> ContactsFolderServerNotificationsDelegate

        Occurs when arises specified event type for Contacts folder.

      • ContactsFolderServerNotifications

        public final com.aspose.ms.lang.Event<com.aspose.ms.System.EventHandler<ServerNotificationEventArgs>> ContactsFolderServerNotifications

        Occurs when arises specified event type for Contacts folder.

      • DeletedItemsFolderServerNotificationsDelegate

        protected com.aspose.ms.System.EventHandler<ServerNotificationEventArgs> DeletedItemsFolderServerNotificationsDelegate

        Occurs when arises specified event type for DeletedItems folder.

      • DeletedItemsFolderServerNotifications

        public final com.aspose.ms.lang.Event<com.aspose.ms.System.EventHandler<ServerNotificationEventArgs>> DeletedItemsFolderServerNotifications

        Occurs when arises specified event type for DeletedItems folder.

      • DraftsFolderServerNotificationsDelegate

        protected com.aspose.ms.System.EventHandler<ServerNotificationEventArgs> DraftsFolderServerNotificationsDelegate

        Occurs when arises specified event type for Drafts folder.

      • DraftsFolderServerNotifications

        public final com.aspose.ms.lang.Event<com.aspose.ms.System.EventHandler<ServerNotificationEventArgs>> DraftsFolderServerNotifications

        Occurs when arises specified event type for Drafts folder.

      • InboxFolderServerNotificationsDelegate

        protected com.aspose.ms.System.EventHandler<ServerNotificationEventArgs> InboxFolderServerNotificationsDelegate

        Occurs when arises specified event type for Inbox folder.

      • InboxFolderServerNotifications

        public final com.aspose.ms.lang.Event<com.aspose.ms.System.EventHandler<ServerNotificationEventArgs>> InboxFolderServerNotifications

        Occurs when arises specified event type for Inbox folder.

      • JournalFolderServerNotificationsDelegate

        protected com.aspose.ms.System.EventHandler<ServerNotificationEventArgs> JournalFolderServerNotificationsDelegate

        Occurs when arises specified event type for Journal folder.

      • JournalFolderServerNotifications

        public final com.aspose.ms.lang.Event<com.aspose.ms.System.EventHandler<ServerNotificationEventArgs>> JournalFolderServerNotifications

        Occurs when arises specified event type for Journal folder.

      • NotesFolderServerNotificationsDelegate

        protected com.aspose.ms.System.EventHandler<ServerNotificationEventArgs> NotesFolderServerNotificationsDelegate

        Occurs when arises specified event type for Notes folder.

      • NotesFolderServerNotifications

        public final com.aspose.ms.lang.Event<com.aspose.ms.System.EventHandler<ServerNotificationEventArgs>> NotesFolderServerNotifications

        Occurs when arises specified event type for Notes folder.

      • OutboxFolderServerNotificationsDelegate

        protected com.aspose.ms.System.EventHandler<ServerNotificationEventArgs> OutboxFolderServerNotificationsDelegate

        Occurs when arises specified event type for Outbox folder.

      • OutboxFolderServerNotifications

        public final com.aspose.ms.lang.Event<com.aspose.ms.System.EventHandler<ServerNotificationEventArgs>> OutboxFolderServerNotifications

        Occurs when arises specified event type for Outbox folder.

      • SentItemsFolderServerNotificationsDelegate

        protected com.aspose.ms.System.EventHandler<ServerNotificationEventArgs> SentItemsFolderServerNotificationsDelegate

        Occurs when arises specified event type for SentItems folder.

      • SentItemsFolderServerNotifications

        public final com.aspose.ms.lang.Event<com.aspose.ms.System.EventHandler<ServerNotificationEventArgs>> SentItemsFolderServerNotifications

        Occurs when arises specified event type for SentItems folder.

      • TasksFolderServerNotificationsDelegate

        protected com.aspose.ms.System.EventHandler<ServerNotificationEventArgs> TasksFolderServerNotificationsDelegate

        Occurs when arises specified event type for Tasks folder.

      • TasksFolderServerNotifications

        public final com.aspose.ms.lang.Event<com.aspose.ms.System.EventHandler<ServerNotificationEventArgs>> TasksFolderServerNotifications

        Occurs when arises specified event type for Tasks folder.

      • auto_RootFolderEventFilter

        protected int auto_RootFolderEventFilter

        protected property

      • auto_CalendarFolderEventFilter

        protected int auto_CalendarFolderEventFilter

        protected property

      • auto_ContactsFolderEventFilter

        protected int auto_ContactsFolderEventFilter

        protected property

      • auto_DeletedItemsFolderEventFilter

        protected int auto_DeletedItemsFolderEventFilter

        protected property

      • auto_DraftsFolderEventFilter

        protected int auto_DraftsFolderEventFilter

        protected property

      • auto_InboxFolderEventFilter

        protected int auto_InboxFolderEventFilter

        protected property

      • auto_JournalFolderEventFilter

        protected int auto_JournalFolderEventFilter

        protected property

      • auto_NotesFolderEventFilter

        protected int auto_NotesFolderEventFilter

        protected property

      • auto_OutboxFolderEventFilter

        protected int auto_OutboxFolderEventFilter

        protected property

      • auto_SentItemsFolderEventFilter

        protected int auto_SentItemsFolderEventFilter

        protected property

      • auto_TasksFolderEventFilter

        protected int auto_TasksFolderEventFilter

        protected property

      • serviceBinding

        protected com.aspose.email.ExchangeServiceBinding serviceBinding
    • Method Detail

      • useSAAJAPI

        public static void useSAAJAPI(boolean value)

        Sets value indicating whether SAAJ is used.

        Parameters:
        value - True if SAAJ API should be used.
      • disableSAAJCertificateValidation

        public static void disableSAAJCertificateValidation()

        Disable SAAJ certificate validation

      • getEWSClient

        public static IEWSClient getEWSClient(URL mailboxUrl)

        Initializes a new instance of the EWSClient based class

        Parameters:
        mailboxUrl - The URL of mailbox
        Returns:
        Instance of the class based on the EWSClient class.
      • getEWSClient

        public static IEWSClient getEWSClient(URL mailboxUrl,
                              int serverVersion)

        Initializes a new instance of the EWSClient based class

        Parameters:
        mailboxUrl - The URL of mailbox
        serverVersion - Exchange server versions
        Returns:
        Instance of the class based on the EWSClient class.
      • getEWSClient

        public static IEWSClient getEWSClient(String mailboxUri,
                              com.aspose.ms.System.Net.ICredentials credentials)

        Initializes a new instance of the EWSClient based class

        Parameters:
        mailboxUri - The URI of mailbox
        credentials - Contains the credentials for authentication.
        Returns:
        Instance of the class based on the EWSClient class.
      • getEWSClient

        public static IEWSClient getEWSClient(String mailboxUri,
                              String username,
                              String password)

        Initializes a new instance of the EWSClient based class

        Parameters:
        mailboxUri - The URI of mailbox
        username - The username
        password - The password
        Returns:
        Instance of the class based on the EWSClient class.
      • getEWSClient

        public static IEWSClient getEWSClient(String mailboxUri,
                              String username,
                              String password,
                              com.aspose.ms.System.Net.WebProxy proxy)

        Initializes a new instance of the EWSClient based class

        Parameters:
        mailboxUri - The URI of mailbox
        username - The username
        password - The password
        proxy - Contains HTTP proxy settings
        Returns:
        Instance of the class based on the EWSClient class.
      • getEWSClient

        public static IEWSClient getEWSClient(String mailboxUri,
                              String username,
                              String password,
                              String domain)

        Initializes a new instance of the EWSClient based class

        Parameters:
        mailboxUri - The URI of mailbox
        username - The username
        password - The password
        domain - The domain name
        Returns:
        Instance of the class based on the EWSClient class.
      • getEWSClient

        public static IEWSClient getEWSClient(String mailboxUri,
                              String username,
                              String password,
                              String domain,
                              com.aspose.ms.System.Net.WebProxy proxy)

        Initializes a new instance of the EWSClient based class

        Parameters:
        mailboxUri - The URI of mailbox
        username - The username
        password - The password
        domain - The domain name
        proxy - Contains HTTP proxy settings
        Returns:
        Instance of the class based on the EWSClient class.
      • getEWSClient

        public static IEWSClient getEWSClient(int serverVersion,
                              String mailboxUri,
                              com.aspose.ms.System.Net.ICredentials credentials,
                              com.aspose.ms.System.Net.WebProxy proxy)

        Initializes a new instance of the EWSClient based class

        Parameters:
        serverVersion - Exchange server versions
        mailboxUri - The URI of mailbox
        credentials - Contains the credentials for authentication.
        proxy - Contains HTTP proxy settings
        Returns:
        Instance of the class based on the EWSClient class.
      • getEWSClient

        public static IEWSClient getEWSClient(int serverVersion,
                              boolean formbasedAuthenticationRequired,
                              String formbasedAuthenticationLocation,
                              String mailboxUri,
                              com.aspose.ms.System.Net.ICredentials credentials,
                              com.aspose.ms.System.Net.WebProxy proxy)

        Initializes a new instance of the EWSClient based class

        Parameters:
        serverVersion - Exchange server versions
        formbasedAuthenticationRequired - Set true if form-based authentication is required, otherwise set false.
        formbasedAuthenticationLocation - url for form-based authentication
        mailboxUri - The URI of mailbox
        credentials - Contains the credentials for authentication.
        proxy - Contains HTTP proxy settings
        Returns:
        Instance of the class based on the EWSClient class.
      • getEWSClient

        public static IEWSClient getEWSClient(String mailboxUri,
                              com.aspose.ms.System.Net.ICredentials credentials,
                              com.aspose.ms.System.Net.WebProxy proxy)

        Initializes a new instance of the EWSClient based class

        Parameters:
        mailboxUri - The URI of mailbox
        credentials - Contains the credentials for authentication.
        proxy - Contains HTTP proxy settings
        Returns:
        Instance of the class based on the EWSClient class.
      • getEWSClient

        public static IEWSClient getEWSClient(String mailboxUri,
                              com.aspose.ms.System.Net.ICredentials credentials,
                              com.aspose.ms.System.Net.WebProxy proxy,
                              int timeout)

        Initializes a new instance of the EWSClient based class

        Parameters:
        mailboxUri - The URI of mailbox
        credentials - Contains the credentials for authentication.
        proxy - Contains HTTP proxy settings
        timeout - Sets the number of milliseconds to wait before the operation times out.
        Returns:
        Instance of the class based on the EWSClient class.
      • getNotificationTimeout

        public int getNotificationTimeout()

        getNotificationTimeout.

        Returns:
        a int.
      • setNotificationTimeout

        public void setNotificationTimeout(int value)

        setNotificationTimeout.

        Parameters:
        value - a int.
      • getNotificationsCheckInterval

        public int getNotificationsCheckInterval()

        getNotificationsCheckInterval.

        Returns:
        a int.
      • setNotificationsCheckInterval

        public void setNotificationsCheckInterval(int value)

        setNotificationsCheckInterval.

        Parameters:
        value - a int.
      • getRootFolderEventFilter

        public int getRootFolderEventFilter()

        getRootFolderEventFilter.

        Returns:
        a int.
      • setRootFolderEventFilter

        public void setRootFolderEventFilter(int value)

        setRootFolderEventFilter.

        Parameters:
        value - a int.
      • getCalendarFolderEventFilter

        public int getCalendarFolderEventFilter()

        getCalendarFolderEventFilter.

        Returns:
        a int.
      • setCalendarFolderEventFilter

        public void setCalendarFolderEventFilter(int value)

        setCalendarFolderEventFilter.

        Parameters:
        value - a int.
      • getContactsFolderEventFilter

        public int getContactsFolderEventFilter()

        getContactsFolderEventFilter.

        Returns:
        a int.
      • setContactsFolderEventFilter

        public void setContactsFolderEventFilter(int value)

        setContactsFolderEventFilter.

        Parameters:
        value - a int.
      • getDeletedItemsFolderEventFilter

        public int getDeletedItemsFolderEventFilter()

        getDeletedItemsFolderEventFilter.

        Returns:
        a int.
      • setDeletedItemsFolderEventFilter

        public void setDeletedItemsFolderEventFilter(int value)

        setDeletedItemsFolderEventFilter.

        Parameters:
        value - a int.
      • getDraftsFolderEventFilter

        public int getDraftsFolderEventFilter()

        getDraftsFolderEventFilter.

        Returns:
        a int.
      • setDraftsFolderEventFilter

        public void setDraftsFolderEventFilter(int value)

        setDraftsFolderEventFilter.

        Parameters:
        value - a int.
      • getInboxFolderEventFilter

        public int getInboxFolderEventFilter()

        getInboxFolderEventFilter.

        Returns:
        a int.
      • setInboxFolderEventFilter

        public void setInboxFolderEventFilter(int value)

        setInboxFolderEventFilter.

        Parameters:
        value - a int.
      • getJournalFolderEventFilter

        public int getJournalFolderEventFilter()

        getJournalFolderEventFilter.

        Returns:
        a int.
      • setJournalFolderEventFilter

        public void setJournalFolderEventFilter(int value)

        setJournalFolderEventFilter.

        Parameters:
        value - a int.
      • getNotesFolderEventFilter

        public int getNotesFolderEventFilter()

        getNotesFolderEventFilter.

        Returns:
        a int.
      • setNotesFolderEventFilter

        public void setNotesFolderEventFilter(int value)

        setNotesFolderEventFilter.

        Parameters:
        value - a int.
      • getOutboxFolderEventFilter

        public int getOutboxFolderEventFilter()

        getOutboxFolderEventFilter.

        Returns:
        a int.
      • setOutboxFolderEventFilter

        public void setOutboxFolderEventFilter(int value)

        setOutboxFolderEventFilter.

        Parameters:
        value - a int.
      • getSentItemsFolderEventFilter

        public int getSentItemsFolderEventFilter()

        getSentItemsFolderEventFilter.

        Returns:
        a int.
      • setSentItemsFolderEventFilter

        public void setSentItemsFolderEventFilter(int value)

        setSentItemsFolderEventFilter.

        Parameters:
        value - a int.
      • getTasksFolderEventFilter

        public int getTasksFolderEventFilter()

        getTasksFolderEventFilter.

        Returns:
        a int.
      • setTasksFolderEventFilter

        public void setTasksFolderEventFilter(int value)

        setTasksFolderEventFilter.

        Parameters:
        value - a int.
      • folderClassToFolderType

        protected static int folderClassToFolderType(String folderClass)

      • folderTypeToFolderClass

        protected static String folderTypeToFolderClass(int folderType)

      • folderTypeToFolderClass

        protected static String folderTypeToFolderClass(int folderType,
                                     String customFolderClass)

      • dispose

        public void dispose()
        Description copied from class: ExchangeClientBase

        Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

        Specified by:
        dispose in interface com.aspose.ms.System.IDisposable
        Overrides:
        dispose in class ExchangeClientBase