Skip to content

Commit

Permalink
Move DnsResolver to org.java_websocket.client and fix code style
Browse files Browse the repository at this point in the history
  • Loading branch information
maiph committed Jun 13, 2019
1 parent b88de91 commit 9909046
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 31 deletions.
30 changes: 0 additions & 30 deletions src/main/java/org/java_websocket/DnsResolver.java

This file was deleted.

29 changes: 29 additions & 0 deletions src/main/java/org/java_websocket/client/DnsResolver.java
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;

}
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@
import javax.net.ssl.SSLSocketFactory;

import org.java_websocket.AbstractWebSocket;
import org.java_websocket.DnsResolver;
import org.java_websocket.WebSocket;
import org.java_websocket.WebSocketImpl;
import org.java_websocket.drafts.Draft;
Expand Down

0 comments on commit 9909046

Please sign in to comment.