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