* the key
* @return the i connection
*/
public IConnection createConnection(String key) {
if (ConnectionType.NETTY_HTTP.getValue().equalsIgnoreCase(key)) {
return new NettyHttpConnection(ConnectionFactory.channelFactory, ConnectionFactory.timer);
} else if (ConnectionType.NETTY_TCP.getValue().equalsIgnoreCase(key)) {
return new NettyTcpConnection(ConnectionFactory.channelFactory, ConnectionFactory.timer);
} else {
LOGGER.fatal("key : " + key + " not found!");
throw new InvalidParameterException("key : " + key + " not found!");