use of org.erlide.runtime.events.ErlEvent in project erlide_eclipse by erlang.
the class OtpNodeProxy method receiveEventMessage.
private void receiveEventMessage(final OtpMbox eventBox) throws OtpErlangExit {
OtpErlangObject msg = null;
try {
msg = eventBox.receive(OtpNodeProxy.POLL_INTERVAL);
final ErlEvent busEvent = eventHelper.parse(msg, this);
if (busEvent != null) {
if (OtpNodeProxy.DEBUG) {
ErlLogger.debug("MSG: %s", "[" + busEvent.getSender() + "::" + busEvent.getTopic() + ": " + busEvent.getEvent() + "]");
}
eventBus.post(busEvent);
}
} catch (final OtpErlangExit e) {
ErlLogger.error(e);
throw e;
} catch (final OtpErlangDecodeException e) {
ErlLogger.error(e);
}
}
use of org.erlide.runtime.events.ErlEvent in project erlide_eclipse by erlang.
the class EventParser method parse.
public ErlEvent parse(final OtpErlangObject msg, final IOtpNodeProxy runtime) {
if (msg == null) {
return null;
}
final String topic = getEventTopic(msg);
if (topic == null) {
return null;
}
final OtpErlangObject event = getEventData(msg);
final OtpErlangPid sender = getEventSender(msg);
return new ErlEvent(topic, runtime, event, sender);
}
Aggregations