use of de.janrufmonitor.service.client.request.handler.CallerListGetHandler in project janrufmonitor by tbrandt77.
the class HttpCallerManager method getCallers.
public ICallerList getCallers(IFilter filter) {
if (!this.isConnected()) {
this.m_logger.warning("Client is not yet connected with the server.");
return this.getRuntime().getCallerFactory().createCallerList();
}
if (filter != null) {
return this.getCallers(new IFilter[] { filter });
}
this.m_logger.info("No filter is applied.");
IRequester r = this.getRequester(new CallerListGetHandler(this.getCallerManager()));
IHttpResponse resp = r.request();
String xml = this.getXmlContent(resp);
this.handleRequester(resp, r);
ICallerList l = XMLSerializer.toCallerList(xml);
if (l != null) {
this.addCallerManagerAttribute(l);
return l;
}
this.m_logger.warning("Callerlist from remote host was empty.");
return this.getRuntime().getCallerFactory().createCallerList();
}
use of de.janrufmonitor.service.client.request.handler.CallerListGetHandler in project janrufmonitor by tbrandt77.
the class HttpCallerManager method getCallers.
public ICallerList getCallers(IFilter[] filters, ISearchTerm[] searchTerms) {
if (!this.isConnected()) {
this.m_logger.warning("Client is not yet connected with the server.");
return this.getRuntime().getCallerFactory().createCallerList();
}
IRequester r = this.getRequester(new CallerListGetHandler(this.getCallerManager(), filters, searchTerms));
IHttpResponse resp = r.request();
String xml = this.getXmlContent(resp);
this.handleRequester(resp, r);
ICallerList l = XMLSerializer.toCallerList(xml);
if (l != null) {
this.addCallerManagerAttribute(l);
return l;
}
this.m_logger.warning("Callerlist from remote host was empty.");
return this.getRuntime().getCallerFactory().createCallerList();
}
Aggregations