use of de.janrufmonitor.service.client.request.handler.CallerGetHandler in project janrufmonitor by tbrandt77.
the class HttpCallerManager method getCaller.
public ICaller getCaller(IPhonenumber number) throws CallerNotFoundException {
if (!this.isConnected()) {
this.m_logger.warning("Client is not yet connected with the server.");
throw new CallerNotFoundException("No caller found. Client is not yet connected with the server.");
}
IRequester r = this.getRequester(new CallerGetHandler(number, this.getCallerManager()));
IHttpResponse resp = r.request();
String xml = this.getXmlContent(resp);
this.handleRequester(resp, r);
ICaller c = XMLSerializer.toCaller(xml);
if (c != null) {
return c;
}
throw new CallerNotFoundException("no caller found.");
}
Aggregations