Class ServiceFactory

java.lang.Object
esendex.sdk.java.ServiceFactory
All Implemented Interfaces:
IServiceFactory
Direct Known Subclasses:
BasicServiceFactoryImpl, SessionServiceFactoryImpl

public abstract class ServiceFactory extends Object implements IServiceFactory
A factory for services. A service is the fundamental developer interface to the Esendex resources. A new ServiceFactory should be created for every Authentication identity.
Author:
Mike Whittaker
  • Field Details

  • Constructor Details

    • ServiceFactory

      protected ServiceFactory(Authenticator authenticator)
      Instantiates a new service factory.
      Parameters:
      authenticator - the authenticator
  • Method Details

    • createSessionAuthenticatingFactory

      public static SessionServiceFactory createSessionAuthenticatingFactory(UserPassword userPassword) throws EsendexException
      Create a ServiceFactory whose services will connect using Session authentication.
      Parameters:
      userPassword - the credentials used to authenticate
      Returns:
      a ServiceFactory with session authentication
      Throws:
      EsendexException - if there is any problem creating the session
    • createBasicAuthenticatingFactory

      public static BasicServiceFactory createBasicAuthenticatingFactory(UserPassword userPassword)
      Create a ServiceFactory whose services will connect using Basic authentication.
      Parameters:
      userPassword - the credentials used to authenticate
      Returns:
      a ServiceFactory with Basic authentication
    • getMessagingService

      public MessagingService getMessagingService()
      Obtains a service suitable for sending voice and SMS messages.
      Specified by:
      getMessagingService in interface IServiceFactory
      Returns:
      the service
    • getSentService

      public SentService getSentService()
      Obtains a service suitable for querying sent messages.
      Specified by:
      getSentService in interface IServiceFactory
      Returns:
      the service
    • getInboxService

      public InboxService getInboxService()
      Obtains a service suitable for querying the Inbox for messages.
      Specified by:
      getInboxService in interface IServiceFactory
      Returns:
      the service
    • getContactService

      public ContactService getContactService()
      Obtains a service suitable for create, read, update and delete operations on the users contacts.
      Specified by:
      getContactService in interface IServiceFactory
      Returns:
      the service
    • getSurveySendService

      public SurveySendService getSurveySendService()
      Obtains a service suitable for sending surveys to new recipients.
      Specified by:
      getSurveySendService in interface IServiceFactory
      Returns:
      the service
    • getSurveysReportService

      public SurveyReportService getSurveysReportService()
      Obtains a service suitable for downloading reports for a survey.
      Specified by:
      getSurveysReportService in interface IServiceFactory
      Returns:
      the service
    • getOptOutService

      public OptOutService getOptOutService()
      Obtains a service suitable for operations on the opt-outs resource.
      Specified by:
      getOptOutService in interface IServiceFactory
      Returns:
      the service