use of de.janrufmonitor.framework.event.IEventBroker in project janrufmonitor by tbrandt77.
the class Journal method received.
public void received(IEvent event) {
if (event.getType() == IEventConst.EVENT_TYPE_UPDATE_CALL || event.getType() == IEventConst.EVENT_TYPE_IDENTIFIED_CALL || event.getType() == IEventConst.EVENT_TYPE_IDENTIFIED_OUTGOING_CALL || event.getType() == IEventConst.EVENT_TYPE_CALL_MANAGER_UPDATED) {
Thread t = new Thread() {
public void run() {
DisplayManager.getDefaultDisplay().asyncExec(new Runnable() {
public void run() {
updateViews(true);
}
});
}
};
t.start();
// send application ready event
IEventBroker eventBroker = this.getRuntime().getEventBroker();
eventBroker.send(this, eventBroker.createEvent(IEventConst.EVENT_TYPE_APPLICATION_READY));
}
}
use of de.janrufmonitor.framework.event.IEventBroker in project janrufmonitor by tbrandt77.
the class Last10Calls method open.
public int open() {
IEventBroker eventBroker = this.getRuntime().getEventBroker();
eventBroker.register(this, eventBroker.createEvent(IEventConst.EVENT_TYPE_IDENTIFIED_CALL));
eventBroker.register(this, eventBroker.createEvent(IEventConst.EVENT_TYPE_IDENTIFIED_OUTGOING_CALL));
eventBroker.register(this, eventBroker.createEvent(IEventConst.EVENT_TYPE_UPDATE_CALL));
eventBroker.register(this, eventBroker.createEvent(IEventConst.EVENT_TYPE_CALL_MANAGER_UPDATED));
return super.open();
}
Aggregations