Search in sources :

Example 1 with CallListCountGetHandler

use of de.janrufmonitor.service.client.request.handler.CallListCountGetHandler in project janrufmonitor by tbrandt77.

the class HttpCallManager method getCallCount.

public int getCallCount(IFilter[] filters, ISearchTerm[] searchTerms) {
    if (!this.isConnected()) {
        this.m_logger.warning("Client is not yet connected with the server.");
        return 0;
    }
    IRequester r = this.getRequester(new CallListCountGetHandler(this.getCallManager(), filters, searchTerms));
    IHttpResponse resp = r.request();
    String xml = this.getXmlContent(resp);
    this.handleRequester(resp, r);
    if (xml.length() > 0) {
        return Integer.parseInt(xml);
    }
    return super.getCallCount(filters);
}
Also used : CallListCountGetHandler(de.janrufmonitor.service.client.request.handler.CallListCountGetHandler) IRequester(de.janrufmonitor.service.commons.http.IRequester) IHttpResponse(de.janrufmonitor.service.commons.http.IHttpResponse)

Aggregations

CallListCountGetHandler (de.janrufmonitor.service.client.request.handler.CallListCountGetHandler)1 IHttpResponse (de.janrufmonitor.service.commons.http.IHttpResponse)1 IRequester (de.janrufmonitor.service.commons.http.IRequester)1