public class SearchEndpoint extends AbstractMethod<SearchRequest,SearchResult[]>
| Constructor and Description |
|---|
SearchEndpoint(HttpWrapper httpWrapper)
Create a new SearchEndpoint.
|
| Modifier and Type | Method and Description |
|---|---|
protected java.lang.Class[] |
getAcceptableAuthMethods() |
org.apache.http.client.methods.RequestBuilder |
makeRequest(SearchRequest request)
Construct and return a RequestBuilder instance from the provided request.
|
protected static SearchResult.VerifyCheck |
parseCheckXmlNode(org.w3c.dom.Element root) |
SearchResult[] |
parseResponse(org.apache.http.HttpResponse response)
Construct a ResultT representing the contents of the HTTP response returned from the Nexmo Voice API.
|
protected SearchResult[] |
parseSearchResponse(java.lang.String response) |
protected static SearchResult |
parseVerifyRequestXmlNode(org.w3c.dom.Element root) |
SearchResult[] |
search(java.lang.String... requestIds) |
SearchResult |
search(java.lang.String requestId) |
applyAuth, execute, getAuthMethod, setHttpClientpublic SearchEndpoint(HttpWrapper httpWrapper)
This client is used for calling the verify API's search endpoint.
protected java.lang.Class[] getAcceptableAuthMethods()
getAcceptableAuthMethods in class AbstractMethod<SearchRequest,SearchResult[]>public org.apache.http.client.methods.RequestBuilder makeRequest(SearchRequest request) throws NexmoClientException, java.io.UnsupportedEncodingException
AbstractMethodmakeRequest in class AbstractMethod<SearchRequest,SearchResult[]>request - A RequestT representing input to the REST call to be madeNexmoClientException - if a problem is encountered constructing the request or response.java.io.UnsupportedEncodingException - if UTF-8 encoding is not supported by the JVMpublic SearchResult[] parseResponse(org.apache.http.HttpResponse response) throws java.io.IOException
AbstractMethodparseResponse in class AbstractMethod<SearchRequest,SearchResult[]>response - An HttpResponse returned from the Nexmo Voice APIjava.io.IOException - if a problem occurs parsing the responsepublic SearchResult search(java.lang.String requestId) throws java.io.IOException, NexmoClientException
java.io.IOExceptionNexmoClientExceptionpublic SearchResult[] search(java.lang.String... requestIds) throws java.io.IOException, NexmoClientException
java.io.IOExceptionNexmoClientExceptionprotected SearchResult[] parseSearchResponse(java.lang.String response) throws NexmoResponseParseException
NexmoResponseParseExceptionprotected static SearchResult parseVerifyRequestXmlNode(org.w3c.dom.Element root) throws NexmoResponseParseException
NexmoResponseParseExceptionprotected static SearchResult.VerifyCheck parseCheckXmlNode(org.w3c.dom.Element root) throws NexmoResponseParseException
NexmoResponseParseException