use of org.wildfly.swarm.topology.TopologyArchive in project wildfly-swarm by wildfly-swarm.
the class AdvertisingMetadataProcessor method advertise.
private void advertise(Archive<?> archive, AnnotationInstance anno) {
String serviceName = anno.value().asString();
List<String> tags = Optional.ofNullable(anno.value(Advertise.TAGS_ATTRIBUTE_NAME)).map(AnnotationValue::asStringArray).map(Arrays::asList).orElse(Collections.emptyList());
TopologyArchive topologyArchive = archive.as(TopologyArchive.class);
topologyArchive.advertise(serviceName, tags);
}
Aggregations