mirror of
https://github.com/zyphlar/LanternPowerMonitor.git
synced 2024-03-08 14:07:47 +00:00
Turns out we don't actually need 30MB of bloated jars to make a single HTTP post to get a Google SSO auth token. Don't need them for Firebase either. And not for Apple SSO. Shoot while we're at it, might as well get rid of pi4j too since making a JNI wrapper for PiGPio is easy enough.
This commit is contained in:
@@ -39,7 +39,7 @@
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>3.2</version>
|
||||
<version>3.10.1</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.lanternsoftware.util.http;
|
||||
|
||||
public class HttpFactory {
|
||||
private static final int CONNECTIONS = 10;
|
||||
private static HttpPool pool;
|
||||
public static synchronized HttpPool pool() {
|
||||
if (pool == null)
|
||||
pool = new HttpPool(CONNECTIONS, CONNECTIONS);
|
||||
return pool;
|
||||
}
|
||||
|
||||
public static synchronized void shutdown() {
|
||||
if (pool != null) {
|
||||
pool.shutdown();
|
||||
pool = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user