Object object = event.attachment();
if (object instanceof CometdContext){
Verb verb = ((CometdContext)object).getVerb();
if (verb.getType() == Verb.HANDSHAKE){
onHandshake(event);
} else if (verb.getType() == Verb.CONNECT){
onConnect(event);
} else if (verb.getType() == Verb.DISCONNECT){
onDisconnect(event);
} else if (verb.getType() == Verb.RECONNECT){
onReconnect(event);
} else if (verb.getType() == Verb.SUBSCRIBE){
onSubscribe(event);
} else if (verb.getType() == Verb.UNSUBSCRIBE){
onUnsubscribe(event);
} else if (verb.getType() == Verb.DATA){
onData(event);
} else if (verb.getType() == Verb.PING){
onPing(event);
} else if (verb.getType() == Verb.STATUS){
onStatus(event);
}
}