@Override
public RadioTransport get() {
switch (configuration.getTransportType()) {
case AMQP:
return new AMQPProducer(metricRegistry, configuration, serverStatus);
case KAFKA:
return new KafkaProducer(serverStatus, configuration, metricRegistry);
default:
throw new RuntimeException("Cannot map transport type to transport.");
}