Class XmlRequesterResponderResource<Q extends Dto,S>
java.lang.Object
esendex.sdk.java.service.resource.base.Resource
esendex.sdk.java.service.resource.base.XmlRequesterResponderResource<Q,S>
- Type Parameters:
Q
- the Dto type expected in the requestS
- the Dto type expected in the response
- Direct Known Subclasses:
CreateContactResource
,CreateOptOutResource
,MessageDispatcherResource
,UpdateContactResource
An XmlRequesterResponderResource is a resource that receives and sends
XML data
- Author:
- Mike Whittaker
-
Constructor Summary
ConstructorsConstructorDescriptionXmlRequesterResponderResource
(Authenticator auth, String account, String id, HttpQuery query) XmlRequesterResponderResource
(Authenticator auth, String account, String id, HttpQuery query, String version) Instantiates a new xml requester responder resource. -
Method Summary
Modifier and TypeMethodDescriptionvoid
execute()
Makes and completes the connection to the resource.protected String
Retrieves the request data if any in raw String form.Gets the response object.void
setRequestObject
(Q requestDto) Sets the request object.Methods inherited from class esendex.sdk.java.service.resource.base.Resource
getAccount, getEndpoint, getEndpointChild, getId, getRequestMethod, getResponse, isHttpOkay
-
Constructor Details
-
XmlRequesterResponderResource
public XmlRequesterResponderResource(Authenticator auth, String account, String id, HttpQuery query, String version) Instantiates a new xml requester responder resource.- Parameters:
auth
- the authenticatoraccount
- the accountid
- the idquery
- the query
-
XmlRequesterResponderResource
public XmlRequesterResponderResource(Authenticator auth, String account, String id, HttpQuery query)
-
-
Method Details
-
setRequestObject
Sets the request object.- Parameters:
requestDto
- the new request object
-
getRequestData
Retrieves the request data if any in raw String form. By default returns null- Overrides:
getRequestData
in classResource
- Returns:
- the request data in raw form
-
execute
Makes and completes the connection to the resource.- Overrides:
execute
in classResource
- Throws:
EsendexException
- If there is a problem during the connection or the HTTP response is outside the 200-299 range.
-
getResponseObject
Gets the response object.- Returns:
- the response object
-