1/*
2* Conditions Of Use
3*
4* This software was developed by employees of the National Institute of
5* Standards and Technology (NIST), an agency of the Federal Government.
6* Pursuant to title 15 Untied States Code Section 105, works of NIST
7* employees are not subject to copyright protection in the United States
8* and are considered to be in the public domain.  As a result, a formal
9* license is not needed to use the software.
10*
11* This software is provided by NIST as a service and is expressly
12* provided "AS IS."  NIST MAKES NO WARRANTY OF ANY KIND, EXPRESS, IMPLIED
13* OR STATUTORY, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTY OF
14* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT
15* AND DATA ACCURACY.  NIST does not warrant or make any representations
16* regarding the use of the software or the results thereof, including but
17* not limited to the correctness, accuracy, reliability or usefulness of
18* the software.
19*
20* Permission to use this software is contingent upon your acceptance
21* of the terms of this agreement
22*
23* .
24*
25*/
26package gov.nist.core.net;
27
28import java.net.InetAddress;
29import java.net.UnknownHostException;
30
31import javax.sip.address.Hop;
32
33/**
34 * An interface that allows you to customize address lookup.
35 * The user can implement this interface to do DNS lookups or other lookup
36 * schemes and register it with the stack.
37 * The default implementation of the address resolver does nothing more than just return back
38 * the Hop that it was passed (fixing up the port if necessary).
39 * However, this behavior can be overriden. To override
40 * implement this interface and register it with the stack using
41 * {@link gov.nist.javax.sip.SipStackExt#setAddressResolver(AddressResolver)}.
42 * This interface will be incorporated into version 2.0 of the JAIN-SIP Specification.
43 *
44 * @since 2.0
45 *
46 *
47 * @author M. Ranganathan
48 *
49 */
50public interface AddressResolver {
51
52    /**
53     * Do a name lookup and resolve the given IP address.
54     * The default implementation is just an identity mapping
55     * (returns the argument).
56     *
57     * @param hop - an incoming Hop containing a potenitally unresolved address.
58     * @return a new hop ( if the address is recomputed ) or the original hop
59     * if this is just an identity mapping ( the default behavior ).
60     */
61    public Hop resolveAddress( Hop hop);
62
63
64
65
66
67}
68