NX01: Removed some javadoc warnings.
This commit is contained in:
parent
5fcb5289c8
commit
960740d52c
42 changed files with 54 additions and 13 deletions
|
|
@ -29,6 +29,7 @@ package love.distributedrebirth.nx01.no2all.wire;
|
|||
|
||||
import java.nio.ByteBuffer;
|
||||
|
||||
/// Wire client.
|
||||
/// @author للَّٰهِilLצسُو
|
||||
/// @version ©Δ∞ 仙上主天
|
||||
public interface WireClient {
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@
|
|||
|
||||
package love.distributedrebirth.nx01.no2all.wire;
|
||||
|
||||
/// Wire client end point.
|
||||
/// @author للَّٰهِilLצسُو
|
||||
/// @version ©Δ∞ 仙上主天
|
||||
public interface WireClientEndpoint {
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@ package love.distributedrebirth.nx01.no2all.wire;
|
|||
|
||||
import java.nio.ByteBuffer;
|
||||
|
||||
/// Wire client handler.
|
||||
/// @author للَّٰهِilLצسُو
|
||||
/// @version ©Δ∞ 仙上主天
|
||||
public interface WireClientHandler {
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@ package love.distributedrebirth.nx01.no2all.wire;
|
|||
|
||||
import java.nio.ByteBuffer;
|
||||
|
||||
/// Wire server.
|
||||
/// @author للَّٰهِilLצسُو
|
||||
/// @version ©Δ∞ 仙上主天
|
||||
public interface WireServer {
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@
|
|||
|
||||
package love.distributedrebirth.nx01.no2all.wire;
|
||||
|
||||
/// Wire server end point.
|
||||
/// @author للَّٰهِilLצسُو
|
||||
/// @version ©Δ∞ 仙上主天
|
||||
public interface WireServerEndpoint {
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@ package love.distributedrebirth.nx01.no2all.wire;
|
|||
|
||||
import java.nio.ByteBuffer;
|
||||
|
||||
/// Wire server handler.
|
||||
/// @author للَّٰهِilLצسُو
|
||||
/// @version ©Δ∞ 仙上主天
|
||||
public interface WireServerHandler {
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@ package love.distributedrebirth.nx01.no2all.wire;
|
|||
|
||||
import java.nio.ByteBuffer;
|
||||
|
||||
/// Wire server socket.
|
||||
/// @author للَّٰهِilLצسُو
|
||||
/// @version ©Δ∞ 仙上主天
|
||||
public interface WireServerSocket {
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@
|
|||
|
||||
package love.distributedrebirth.nx01.no2all.wire.fetch;
|
||||
|
||||
/// Wire fetch runnable task interface wrapper.
|
||||
/// @author للَّٰهِilLצسُو
|
||||
/// @version ©Δ∞ 仙上主天
|
||||
public interface WireFetch extends Runnable {
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@
|
|||
|
||||
package love.distributedrebirth.nx01.no2all.wire.fetch;
|
||||
|
||||
/// Wire fetch factory.
|
||||
/// @author للَّٰهِilLצسُو
|
||||
/// @version ©Δ∞ 仙上主天
|
||||
public interface WireFetchFactory {
|
||||
|
|
|
|||
|
|
@ -37,25 +37,26 @@ import java.nio.ByteBuffer;
|
|||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
/// Wire fetch factory default.
|
||||
/// @author للَّٰهِilLצسُو
|
||||
/// @version ©Δ∞ 仙上主天
|
||||
public final class WireFetchFactoryDefault implements WireFetchFactory {
|
||||
|
||||
|
||||
@Override
|
||||
public WireFetch buildFetcher(WireFetchResource resource, WireFetchHandler handler) {
|
||||
return new HttpDownloader(resource, handler);
|
||||
}
|
||||
|
||||
|
||||
static protected final class HttpDownloader implements WireFetch {
|
||||
|
||||
|
||||
private final WireFetchResource resource;
|
||||
private final WireFetchHandler handler;
|
||||
|
||||
|
||||
protected HttpDownloader(WireFetchResource resource, WireFetchHandler handler) {
|
||||
this.resource = resource;
|
||||
this.handler = handler;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
|
|
@ -77,7 +78,7 @@ public final class WireFetchFactoryDefault implements WireFetchFactory {
|
|||
handler.onError(error);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private InputStream openInputStream(URL url, Map<String, String> args, int timeoutMs, int redirectLimit) throws IOException {
|
||||
HttpURLConnection con = (HttpURLConnection) url.openConnection();
|
||||
con.setConnectTimeout(timeoutMs);
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@ package love.distributedrebirth.nx01.no2all.wire.fetch;
|
|||
|
||||
import java.nio.ByteBuffer;
|
||||
|
||||
/// Wire fetch handler.
|
||||
/// @author للَّٰهِilLצسُو
|
||||
/// @version ©Δ∞ 仙上主天
|
||||
public interface WireFetchHandler {
|
||||
|
|
|
|||
|
|
@ -31,36 +31,36 @@ import java.net.URI;
|
|||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/// Wire fetch resource from the connected inter-webs.
|
||||
/// @author للَّٰهِilLצسُو
|
||||
/// @version ©Δ∞ 仙上主天
|
||||
public final class WireFetchResource {
|
||||
|
||||
private final Map<String, String> headers = new HashMap<>();
|
||||
private final URI uri;
|
||||
private int timeoutMs = 10;
|
||||
|
||||
|
||||
public WireFetchResource(URI uri) {
|
||||
this.uri = uri;
|
||||
this.timeoutMs = 10;
|
||||
}
|
||||
|
||||
|
||||
public URI getUrId() {
|
||||
return uri;
|
||||
}
|
||||
|
||||
|
||||
public int getTimeoutMs() {
|
||||
return timeoutMs;
|
||||
}
|
||||
|
||||
|
||||
public Map<String, String> getHeaders() {
|
||||
return headers;
|
||||
}
|
||||
|
||||
|
||||
public WireFetchResource withTimeoutMs(int timeoutMs) {
|
||||
this.timeoutMs = timeoutMs;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
public WireFetchResource withHeader(String key, String value) {
|
||||
headers.put(key, value);
|
||||
return this;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue