-
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5418601
commit a1fe51e
Showing
2 changed files
with
30 additions
and
26 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
32 changes: 30 additions & 2 deletions
32
src/main/java/org/watermedia/core/network/NetworkRequest.java
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 |
---|---|---|
@@ -1,7 +1,35 @@ | ||
package org.watermedia.core.network; | ||
|
||
import java.net.http.HttpClient; | ||
import org.apache.logging.log4j.Marker; | ||
import org.apache.logging.log4j.MarkerManager; | ||
import org.watermedia.tools.ThreadTool; | ||
|
||
import java.text.DateFormat; | ||
import java.text.SimpleDateFormat; | ||
import java.util.concurrent.ExecutorService; | ||
import java.util.concurrent.Executors; | ||
|
||
public class NetworkRequest implements Runnable { | ||
private static final Marker IT = MarkerManager.getMarker("ImageAPI"); | ||
private static final DateFormat FORMAT = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss z"); | ||
private static final ExecutorService EXECUTOR = Executors.newScheduledThreadPool(ThreadTool.minThreads(), ThreadTool.factory("ImageFetch-Worker", Thread.NORM_PRIORITY + 1)); | ||
|
||
|
||
public NetworkRequest() { | ||
|
||
} | ||
|
||
|
||
public void start() { | ||
EXECUTOR.execute(this); | ||
} | ||
|
||
@Override | ||
public void run() { | ||
|
||
} | ||
|
||
|
||
|
||
public class NetworkRequest { | ||
|
||
} |