{
Model model = broker.getModel();
ConfiguredObjectTypeRegistry typeRegistry = model.getTypeRegistry();
Map<String, ConfiguredObjectAttribute<?, ?>> attributeTypes =
typeRegistry.getAttributeTypes(Port.class);
ConfiguredObjectAttribute protocolsAttribute = attributeTypes.get(Port.PROTOCOLS);
Set<Protocol> protocols = (Set<Protocol>) protocolsAttribute.convert(portAttributes.get(Port.PROTOCOLS),broker);
ProtocolType protocolType = null;
if(protocols == null || protocols.isEmpty())
{
// defaulting to AMQP if protocol is not specified