-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move DnsResolver to org.java_websocket.client and fix code style
- Loading branch information
Showing
3 changed files
with
29 additions
and
31 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package org.java_websocket.client; | ||
|
||
import java.net.InetAddress; | ||
import java.net.URI; | ||
import java.net.UnknownHostException; | ||
|
||
/** | ||
* Users may implement this interface to override the default DNS lookup offered | ||
* by the OS. | ||
* | ||
* @since 1.4.1 | ||
*/ | ||
public interface DnsResolver { | ||
|
||
/** | ||
* Resolves the IP address for the given URI. | ||
* | ||
* This method should never return null. If it's not able to resolve the IP | ||
* address then it should throw an UnknownHostException | ||
* | ||
* @param uri The URI to be resolved | ||
* | ||
* @return The resolved IP address | ||
* | ||
* @throws UnknownHostException if no IP address for the <code>uri</code> could be found. | ||
*/ | ||
InetAddress resolve(URI uri) throws UnknownHostException; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters