final MessageType messageType = JsonUtil.parseFrame(buffer.toString());
switch (messageType.getMessageType()) {
case HELLO:
HelloMessage handshakeMessage = fromJson(buffer.toString(), HelloMessageImpl.class);
if (!writeHandlerMap.containsKey(handshakeMessage.getUAID())) {
handshakeMessage = new HelloMessageImpl(UUIDUtil.newUAID());
}
final HelloResponse helloResponse = simplePushServer.handleHandshake(handshakeMessage);
sock.write(new Buffer(toJson(helloResponse)));
uaid = helloResponse.getUAID();
writeHandlerMap.put(uaid.toString(), sock.writeHandlerID());