All Downloads are FREE. Search and download functionalities are using the official Maven repository.

esendex.sdk.java.service.resource.access.SessionResource Maven / Gradle / Ivy

Go to download

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.resource.access;

import esendex.sdk.java.http.HttpRequestMethod;
import esendex.sdk.java.model.transfer.session.SessionDto;
import esendex.sdk.java.service.auth.BasicAuthenticator;
import esendex.sdk.java.service.resource.base.XmlResponderResource;

/**
 * The Session Constructor resource is used to generate a unique Esendex API 
 * session GUID. A successful HTTP POST request to the Constructor URI requires 
 * a valid Basic Authentication header of Base64 encoded username and password 
 * to be supplied.
 * 
 * @author Mike Whittaker
 */
public class SessionResource extends XmlResponderResource {
	
	/**
	 * The session resource must be authenticated with Basic
	 * Authentication. Thereafter other resources may be authenticated with a
	 * SessionAuthenticator.
	 * @param auth the authenticator
	 */
	public SessionResource(BasicAuthenticator auth) {
		super(auth, null, null, null);
	}

	/**
	 * {@inheritDoc}
	 */
	@Override
	protected String getEndpointChild() {
		return "session/constructor";
	}

	/**
	 * {@inheritDoc}
	 */
	@Override
	protected HttpRequestMethod getRequestMethod() {
		return HttpRequestMethod.POST;
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy