if (executor != null) {
// asynchronous event
executor.execute(new SentEvent(this, highLevelMessage));
} else {
// synchronous call (in the I/O loop)
handler.messageSent(this, highLevelMessage);
}
}
} catch (RuntimeException e) {
processException(e);
}