use of org.platformlayer.ops.instances.ThrowingProvider in project platformlayer by platformlayer.
the class PrivateNetworkHelpers method findTunnelAddress.
public ThrowingProvider<String> findTunnelAddress(final PlatformLayerKey machineKey) {
final NetworkPoint src = NetworkPoint.forPublicInternet();
return new ThrowingProvider<String>() {
@Override
public String build() throws OpsException {
ItemBase dest = platformLayer.getItem(machineKey);
Machine machine = instanceHelpers.getMachine(dest, true);
String address = machine.getNetworkPoint().getBestAddress(src);
return address;
}
};
}
Aggregations