RawClientMinaHandler handler = new RawClientMinaHandler();
handler.setHeartbeatContainer(heartbeatContainer);
handler.setGateway(gateway);
gateway.addMessageListener(new IDontNeedSecurity());
gateway.addMessageListener(new ClientMessageValidationListener());
MinaConnectedMessageListener cml = new MinaConnectedMessageListener();
cml.setHeartbeatContainer(heartbeatContainer);