@Override
public void addClientApplicationEvent(Event event) throws Exception {
if (event != null) {
if (event.getDescriptor().getDef().getEventType() != EventType.APPLICATION) {
throw new InvalidEventTypeException(
String.format("%s is not an Application event. "
+ "Only Application events are allowed to be fired from server.",
event.getDescriptor()), null);
}
clientEvents.add(event);