throw NSForwardException._runtimeExceptionForThrowable(e);
}
}
protected void writeNotification(NSNotification notification) throws ChannelNotConnectedException, ChannelClosedException, IOException {
RefByteArrayOutputStream baos = new RefByteArrayOutputStream();
ObjectOutputStream dos = new ObjectOutputStream(baos);
dos.writeObject(notification.name());
dos.writeObject(notification.object());
dos.writeObject(notification.userInfo());
dos.flush();
dos.close();
if (log.isDebugEnabled()) {
log.debug("Sending notification: " + notification);
} else if (log.isInfoEnabled()) {
log.info("Sending " + notification.name() + " notification.");
}
Message message = new Message(null, null, baos.buffer(), 0, baos.size());
_channel.send(message);
}