コード例 #1
0
ファイル: DnsManagerImpl.java プロジェクト: dwaseem/sipxecs
 @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);
 }
コード例 #2
0
ファイル: MongoManagerImpl.java プロジェクト: dwaseem/sipxecs
 @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;
 }