Beispiel #1
0
 @Override
 public Collection<Address> getAvailableAddresses(
     AddressManager manager, AddressType type, Location requester) {
   if (!type.equals(DNS_ADDRESS)) {
     return null;
   }
   List<Location> locations = manager.getFeatureManager().getLocationsForEnabledFeature(FEATURE);
   return Location.toAddresses(DNS_ADDRESS, locations);
 }
Beispiel #2
0
 @Override
 public Collection<Address> getAvailableAddresses(
     AddressManager manager, AddressType type, Location requester) {
   if (!type.equalsAnyOf(ADDRESS_ID)) {
     return null;
   }
   Collection<Location> locations =
       manager.getFeatureManager().getLocationsForEnabledFeature(FEATURE_ID);
   Collection<Address> addresses = new ArrayList<Address>(locations.size());
   for (Location location : locations) {
     addresses.add(new Address(ADDRESS_ID, location.getAddress(), MongoSettings.SERVER_PORT));
   }
   return addresses;
 }