use of de.janrufmonitor.service.IService in project janrufmonitor by tbrandt77.
the class OldImportAction method getHandler.
private CommentCallerHandler getHandler() {
IService service = PIMRuntime.getInstance().getServiceFactory().getService("CommentService");
if (service != null) {
if (service instanceof CommentService) {
CommentService commentService = (CommentService) service;
CommentCallerHandler cch = commentService.getHandler();
return cch;
}
}
return null;
}
use of de.janrufmonitor.service.IService in project janrufmonitor by tbrandt77.
the class RuleServicePage method getEventServices.
private String[] getEventServices(String[] serviceIDs) {
List l = new ArrayList();
IService s = null;
for (int i = 0; i < serviceIDs.length; i++) {
s = getRuntime().getServiceFactory().getService(serviceIDs[i]);
if (s != null && s instanceof IEventReceiver) {
l.add(serviceIDs[i]);
} else {
this.m_logger.info("Service without EventReceiver: " + serviceIDs[i]);
}
}
String[] list = new String[l.size()];
for (int i = 0; i < list.length; i++) {
list[i] = (String) l.get(i);
}
return list;
}
use of de.janrufmonitor.service.IService in project janrufmonitor by tbrandt77.
the class DialogPropagator method propagate.
public void propagate(final Message m) {
final Throwable t = m.getThrowable();
Thread td = new Thread(new Runnable() {
public void run() {
DisplayManager.getDefaultDisplay().asyncExec(new Runnable() {
public void run() {
openDialog(m.getLevel(), m.getNamespace(), m.getMessage(), m.getVariables(), (t != null ? t.toString() : ""));
if (m.getLevel().equalsIgnoreCase(Message.ERROR)) {
m_logger.log(Level.SEVERE, m.getMessage(), t);
}
if (m.isSetErrorIcon()) {
IService tray = getRuntime().getServiceFactory().getService("TrayIcon");
if (tray != null && tray instanceof TrayIcon) {
((TrayIcon) tray).setIconStateError();
}
}
}
});
}
});
td.start();
try {
td.join();
} catch (InterruptedException e) {
this.m_logger.log(Level.SEVERE, e.getMessage(), e);
}
}
Aggregations