esendex.sdk.java.service.impl.SessionServiceImpl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of org.everit.osgi.bundles.com.esendex.javasdk Show documentation
Show all versions of org.everit.osgi.bundles.com.esendex.javasdk Show documentation
The Esendex Java SDK is an easy to use client for our REST API that you can use to integrate SMS and Voice messaging into your Java application.
The newest version!
package esendex.sdk.java.service.impl;
import esendex.sdk.java.EsendexException;
import esendex.sdk.java.model.domain.impl.SessionResponseAssembler;
import esendex.sdk.java.model.domain.response.SessionResponse;
import esendex.sdk.java.service.SessionService;
import esendex.sdk.java.service.auth.BasicAuthenticator;
import esendex.sdk.java.service.resource.access.SessionResource;
/**
* A concrete SessionService.
*/
public class SessionServiceImpl extends AbstractService implements SessionService {
/**
* Instantiates a new session service.
* @param authenticator the authenticator
*/
public SessionServiceImpl(BasicAuthenticator authenticator) {
super(authenticator);
}
/**
* {@inheritDoc}
*/
public SessionResponse getSession() throws EsendexException {
SessionResource resource = new SessionResource((BasicAuthenticator)authenticator);
resource.execute();
return new SessionResponseAssembler().createResponse(
resource.getResponseObject());
}
}