Search in sources :

Example 1 with TopologyArchive

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);
}
Also used : AnnotationValue(org.jboss.jandex.AnnotationValue) TopologyArchive(org.wildfly.swarm.topology.TopologyArchive)

Aggregations

AnnotationValue (org.jboss.jandex.AnnotationValue)1 TopologyArchive (org.wildfly.swarm.topology.TopologyArchive)1