{@inheritDoc}

@see fr.dudie.nominatim.client.NominatimClient#lookupAddress(fr.dudie.nominatim.client.request.NominatimLookupRequest)
760830
@Override
    public List<Address> lookupAddress(final NominatimLookupRequest lookup) throws IOException {

        final String apiCall = String.format("%s&%s", lookupUrl, lookup.getQueryString());
        LOGGER.debug("lookup url: {}", apiCall);
        final HttpGet req = new HttpGet(apiCall);
        return httpClient.execute(req, defaultLookupHandler);
    }
1232086
public InetSocketAddress remoteLookup(final Identifier id) throws Exception {
    // the lookup is not thread-safe, because concurrent replies may
    // be read by the wrong thread.
    // TODO: better fix uses a map of id's after REEF-198
    synchronized (this) {

      LOG.log(Level.INFO, "Looking up {0} on NameServer {1}", new Object[]{id, serverSocketAddr});

      final List<Identifier> ids = Arrays.asList(id);
      final Link<NamingMessage> link = transport.open(serverSocketAddr, codec,
          new LoggingLinkListener<NamingMessage>());
      link.write(new NamingLookupRequest(ids));

      final NamingLookupResponse resp;
      for (;;) {
        try {
          resp = replyQueue.poll(timeout, TimeUnit.MILLISECONDS);
          break;
        } catch (final InterruptedException e) {
          LOG.log(Level.INFO, "Lookup interrupted", e);
          throw new NamingException(e);
        }
      }

      final List<NameAssignment> list = resp == null ? Collections.<NameAssignment>emptyList()
          : resp.getNameAssignments();
      if (list.isEmpty()) {
        throw new NamingException("Cannot find " + id + " from the name server");
      } else {
        return list.get(0).getAddress();
      }
    }
  }
1283710
public I_CmsPrincipal lookupPrincipal(CmsRequestContext context, CmsUUID principalId) {

        CmsDbContext dbc = m_dbContextFactory.getDbContext(context);
        I_CmsPrincipal result = null;
        try {
            result = m_driverManager.lookupPrincipal(dbc, principalId);
        } finally {
            dbc.clear();
        }
        return result;
    }
499409
public Iterable<DUser> queryByAddress1(java.lang.String address1) {
    return queryByField(null, DUserMapper.Field.ADDRESS1.getFieldName(), address1);
  }
133646
public InetAddress
getAddress() {
	try {
		if (name == null)
			return InetAddress.getByAddress(address);
		else
			return InetAddress.getByAddress(name.toString(),
							address);
	} catch (UnknownHostException e) {
		return null;
	}
}
1170189
@Override
	public void findLocation(final String location) {
		showAlternativesView(false);
		GwtCommand command = new GwtCommand(GetLocationForStringRequest.COMMAND);
		GetLocationForStringRequest request = new GetLocationForStringRequest();
		request.setCrs(mapPresenter.getViewPort().getCrs());
		request.setLocation(location);
		request.setServicePattern(servicePattern);
		command.setCommandRequest(request);
		GeomajasServerExtension.getInstance().getCommandService().execute(command,
				new AbstractCommandCallback<GetLocationForStringResponse>() {
			public void execute(GetLocationForStringResponse response) {
				goToLocation(response, location);
			}
		});
	}
638365
@Override
	public boolean isInAddressBook(String phoneNumber) {
		AndroidContact c = AndroidContact.lookupByNumber(phoneNumber);
		return c != null;
	}
428770
public ResourceInjection byLookup(final String lookup) {

        final ResourceLiteral resource = new ResourceLiteral();
        resource.setLookup(lookup);
        matchingResources.add(resource);
        return this;
    }
510094
public static com.liferay.commerce.model.CommerceAddress updateCommerceAddress(
		com.liferay.commerce.model.CommerceAddress commerceAddress) {
		return getService().updateCommerceAddress(commerceAddress);
	}
1082780
public ResourceAddress newResourceAddress(String location,
                                              ResourceOptions options,
                                              Object qualifier) {
        Objects.requireNonNull(options, "options cannot be null");
        ResourceAddressFactorySpi<?> resourceAddressFactory = findResourceAddressFactory(getScheme(location));
        return resourceAddressFactory.newResourceAddress(location, options, qualifier);
    }
1000873
public static PathAddress pathAddress(final ModelNode node) {
        if (node.isDefined()) {

//            final List<Property> props = node.asPropertyList();
            // Following bit is crap TODO; uncomment above and delete below
            // when bug is fixed
            final List<Property> props = new ArrayList<Property>();
            String key = null;
            for (ModelNode element : node.asList()) {
                Property prop = null;
                if (element.getType() == ModelType.PROPERTY || element.getType() == ModelType.OBJECT) {
                    prop = element.asProperty();
                } else if (key == null) {
                    key = element.asString();
                } else {
                    prop = new Property(key, element);
                }
                if (prop != null) {
                    props.add(prop);
                    key = null;
                }

            }
            if (props.size() == 0) {
                return EMPTY_ADDRESS;
            } else {
                final Set<String> seen = new HashSet<String>();
                final List<PathElement> values = new ArrayList<PathElement>();
                int index = 0;
                for (final Property prop : props) {
                    final String name = prop.getName();
                    if (seen.add(name)) {
                        values.add(new PathElement(name, prop.getValue().asString()));
                    } else {
                        throw duplicateElement(name);
                    }
                    if (index == 1 && name.equals(SERVER) && seen.contains(HOST)) {
                        seen.clear();
                    }
                    index++;
                }
                return new PathAddress(Collections.unmodifiableList(values));
            }
        } else {
            return EMPTY_ADDRESS;
        }
    }
308905
@Override
  public int addressRemote(byte []buffer, int offset, int length)
  {
    return _socket.getRemoteAddress(buffer, offset, length);
  }
279512
private static void insertAddressUsingCallable(AddressClient client, String newAddressName)
      throws InterruptedException, ExecutionException {
    // Begin samplegen code for insertAddress().
    ProjectRegionName region = ProjectRegionName.of(PROJECT_NAME, REGION);
    Address address = Address.newBuilder().build();
    InsertAddressHttpRequest request =
        InsertAddressHttpRequest.newBuilder()
            .setRegion(region.toString())
            .setAddressResource(address)
            .build();
    ApiFuture<Operation> future = client.insertAddressCallable().futureCall(request);
    // Do something
    Operation response = future.get();

    // End samplegen code for insertAddress().
    System.out.format("Result of insert: %s\n", response.toString());
  }
267086
protected void beforeSend(RpcInternalContext context, SofaRequest request) {
        currentRequests.incrementAndGet();
        context.setLocalAddress(localAddress());
    }
896101
@Override
	public List<String> getAlternateAddresses(Exchange exchange) {
		return locatorCache.getFailoverEndpoints(getServiceName(exchange));
	}
1065733
public static List<String> getRemoteAddresses(HttpServletRequest request) {
        List<String> addresses = new ArrayList<String>();
        addresses.add(request.getRemoteHost());
        if (!request.getRemoteAddr().equals(request.getRemoteHost())) {
            // Store both remote host and remote address 
            addresses.add(request.getRemoteAddr());
        }
        final String forwardedFor = request.getHeader("X-Forwarded-For");
        if (forwardedFor != null) {
            // Also store address this request was forwarded for.
            final String[] parts = forwardedFor.split(",");
            for (String part : parts) {
                addresses.add(part);
            }
        }
        final String httpVia = request.getHeader("Via");
        if (httpVia != null) {
            // Also store address this request was forwarded for.
            final String[] parts = httpVia.split(",");
            for (String part : parts) {
                addresses.add(part);
            }
        }
        return Collections.unmodifiableList(addresses);
    }
1349454
public I_CmsPrincipal lookupPrincipal(CmsRequestContext context, String principalName) {

        CmsDbContext dbc = m_dbContextFactory.getDbContext(context);
        I_CmsPrincipal result = null;
        try {
            result = m_driverManager.lookupPrincipal(dbc, CmsOrganizationalUnit.removeLeadingSeparator(principalName));
        } finally {
            dbc.clear();
        }
        return result;
    }