Package esendex.sdk.java
Class ServiceFactory
java.lang.Object
esendex.sdk.java.ServiceFactory
- All Implemented Interfaces:
IServiceFactory
- Direct Known Subclasses:
BasicServiceFactoryImpl
,SessionServiceFactoryImpl
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 Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
ServiceFactory
(Authenticator authenticator) Instantiates a new service factory. -
Method Summary
Modifier and TypeMethodDescriptionstatic BasicServiceFactory
createBasicAuthenticatingFactory
(UserPassword userPassword) Create a ServiceFactory whose services will connect using Basic authentication.static SessionServiceFactory
createSessionAuthenticatingFactory
(UserPassword userPassword) Create a ServiceFactory whose services will connect using Session authentication.Obtains a service suitable for create, read, update and delete operations on the users contacts.Obtains a service suitable for querying the Inbox for messages.Obtains a service suitable for sending voice and SMS messages.Obtains a service suitable for operations on the opt-outs resource.Obtains a service suitable for querying sent messages.Obtains a service suitable for sending surveys to new recipients.Obtains a service suitable for downloading reports for a survey.
-
Field Details
-
authenticator
-
-
Constructor Details
-
ServiceFactory
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
Create a ServiceFactory whose services will connect using Basic authentication.- Parameters:
userPassword
- the credentials used to authenticate- Returns:
- a ServiceFactory with Basic authentication
-
getMessagingService
Obtains a service suitable for sending voice and SMS messages.- Specified by:
getMessagingService
in interfaceIServiceFactory
- Returns:
- the service
-
getSentService
Obtains a service suitable for querying sent messages.- Specified by:
getSentService
in interfaceIServiceFactory
- Returns:
- the service
-
getInboxService
Obtains a service suitable for querying the Inbox for messages.- Specified by:
getInboxService
in interfaceIServiceFactory
- Returns:
- the service
-
getContactService
Obtains a service suitable for create, read, update and delete operations on the users contacts.- Specified by:
getContactService
in interfaceIServiceFactory
- Returns:
- the service
-
getSurveySendService
Obtains a service suitable for sending surveys to new recipients.- Specified by:
getSurveySendService
in interfaceIServiceFactory
- Returns:
- the service
-
getSurveysReportService
Obtains a service suitable for downloading reports for a survey.- Specified by:
getSurveysReportService
in interfaceIServiceFactory
- Returns:
- the service
-
getOptOutService
Obtains a service suitable for operations on the opt-outs resource.- Specified by:
getOptOutService
in interfaceIServiceFactory
- Returns:
- the service
-