use of org.platformlayer.ops.uses.SimpleLinkConsumer in project platformlayer by platformlayer.
the class SimpleApp method getConfigurationProperties.
protected Map<String, String> getConfigurationProperties() throws OpsException {
Map<String, String> config = Maps.newHashMap();
if (context.links != null) {
NetworkPoint networkPoint = NetworkPoint.forTargetInContext();
InetAddressChooser inetAddressChooser = NearestAddressChooser.build(networkPoint);
SimpleLinkConsumer consumer = new SimpleLinkConsumer(consumerKey, inetAddressChooser);
config.putAll(consumeHelper.buildLinkTargetProperties(consumer, context.links.getLinks()));
}
return config;
}
use of org.platformlayer.ops.uses.SimpleLinkConsumer in project platformlayer by platformlayer.
the class StandardTemplateData method getConfigurationProperties.
protected Map<String, String> getConfigurationProperties() throws OpsException {
Map<String, String> properties = Maps.newHashMap();
List<Link> modelLinks = getLinks();
if (modelLinks != null && !modelLinks.isEmpty()) {
NetworkPoint networkPoint = NetworkPoint.forTargetInContext();
InetAddressChooser inetAddressChooser = NearestAddressChooser.build(networkPoint);
SimpleLinkConsumer consumer = new SimpleLinkConsumer(getModel().getKey(), inetAddressChooser);
properties.putAll(links.buildLinkTargetProperties(consumer, modelLinks));
}
return properties;
}
Aggregations