esendex.sdk.java.service.resource.base.XmlRequesterResource 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.resource.base;
import esendex.sdk.java.http.HttpQuery;
import esendex.sdk.java.model.transfer.Dto;
import esendex.sdk.java.service.auth.Authenticator;
/**
* An XmlRequesterResource is a resource that sends
* XML data, it does not receive it.
*
* @param the Dto type expected in the request
*
* @author Mike Whittaker
*/
public abstract class XmlRequesterResource extends Resource {
private XmlRequester requester;
/**
* Instantiates a new xml requester resource.
* @param auth the authenticator
* @param account the account
* @param id the id
* @param query the query
*/
public XmlRequesterResource(
Authenticator auth, String account, String id, HttpQuery query) {
super(auth, account, id, query);
}
/**
* Sets the request object.
* @param requestDto the new request object
*/
public void setRequestObject(Q requestDto) {
this.requester = new XmlRequester(requestDto);
}
/**
* {@inheritDoc}
*/
@Override
protected String getRequestData() {
return requester.getRequestData();
}
}