use of de.janrufmonitor.service.client.request.handler.GetDialExtensions in project janrufmonitor by tbrandt77.
the class ClientDialerCommand method isExecutable.
public boolean isExecutable() {
// introduced since some TAPIs might reset and stop monitoring after calling GetDialExtension
boolean isSecureMonitor = Boolean.parseBoolean(System.getProperty(IJAMConst.SYSTEM_MONITOR_SECURE, "false"));
if (isSecureMonitor)
return false;
if (isConnected()) {
IRequester r = this.getRequester(new GetDialExtensions());
IHttpResponse resp = r.request();
return (resp.getCode() != 404 && resp.getCode() != 500);
}
return false;
}
use of de.janrufmonitor.service.client.request.handler.GetDialExtensions in project janrufmonitor by tbrandt77.
the class ClientClickDialAction method isEnabled.
public boolean isEnabled() {
// introduced since some TAPIs might reset and stop monitoring after calling GetDialExtension
boolean isSecureMonitor = Boolean.parseBoolean(System.getProperty(IJAMConst.SYSTEM_MONITOR_SECURE, "false"));
if (isSecureMonitor)
return false;
if (isConnected()) {
IRequester r = this.getRequester(new GetDialExtensions());
IHttpResponse resp = r.request();
return (resp.getCode() != 404 && resp.getCode() != 500);
}
return false;
}
use of de.janrufmonitor.service.client.request.handler.GetDialExtensions in project janrufmonitor by tbrandt77.
the class ClientDialerDialog method getLines.
private String[] getLines() {
IRequester r = this.getRequester(new GetDialExtensions());
IHttpResponse resp = r.request();
this.m_logger.info("GetExtensionsList returned " + resp.getCode());
if (resp.getCode() == 200) {
try {
String lines = new String(resp.getContent());
if (lines != null & lines.length() > 0) {
this.m_logger.info("GetExtensionsList returned " + lines);
return lines.split(",");
}
} catch (Exception e) {
m_logger.log(Level.SEVERE, e.getMessage(), e);
return null;
}
}
return null;
}
Aggregations