NettyConnectStateListener connect = new NettyConnectStateListener();
connect.setGateway(gateway);
gateway.addMessageListener(connect);
NettyHeartbeatListener heartbeat = new NettyHeartbeatListener();
heartbeat.setHeartbeatContainer(heartbeatContainer);
heartbeat.setGateway(gateway);
gateway.addMessageListener(heartbeat);
NettyTransactionListener transaction = new NettyTransactionListener();
transaction.setGateway(gateway);
gateway.addMessageListener(transaction);