Compare commits

..

No commits in common. "5be25735ae773760172609315819001beb85d20d" and "7bbfeea23a6ad8b2fe8a4863020243e2c0d56af2" have entirely different histories.

9 changed files with 9 additions and 18 deletions

View file

@ -2,9 +2,9 @@
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<classpathentry kind="src" path="src"/>
<classpathentry exported="true" kind="lib" path="jose4j-0.9.6.jar"/>
<classpathentry exported="true" kind="lib" path="password4j-1.8.1.jar"/>
<classpathentry exported="true" kind="lib" path="slf4j-api-2.0.12.jar"/>
<classpathentry exported="true" kind="lib" path="PeerAtCodeParser.jar"/>
<classpathentry exported="true" kind="lib" path="jose4j-0.9.3.jar"/>
<classpathentry exported="true" kind="lib" path="password4j-1.6.3.jar"/>
<classpathentry exported="true" kind="lib" path="slf4j-api-2.0.6.jar"/>
<classpathentry exported="true" kind="lib" path="C:/Users/jeffc/eclipse-workspace/peer-at-code-framework/PeerAtCodeParser.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>

BIN
password4j-1.6.3.jar Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
slf4j-api-2.0.6.jar Normal file

Binary file not shown.

View file

@ -29,17 +29,14 @@ public class Client<U extends User> extends Thread{
writer.flush();
writer.close();
}catch(InvalidJwtException e){
this.router.getExceptionLogger().setValue(e);
}catch(Exception e){
this.router.getExceptionLogger().setValue(e);
e.printStackTrace();
if(context != null && context.getResponseCode() == 0){
try{
context.response(500);
writer.flush();
writer.close();
}catch(Exception ex){
this.router.getExceptionLogger().setValue(ex);
}
}catch(Exception ex){}
}
}
if(context != null) router.getLogger().setValue(context);
@ -56,9 +53,7 @@ public class Client<U extends User> extends Thread{
writer.response(401, this.router.getDefaultHeaders(type));
writer.flush();
writer.close();
}catch(Exception ex){
this.router.getExceptionLogger().setValue(ex);
}
}catch(Exception ex){}
throw e;
}
}

View file

@ -8,6 +8,8 @@ import java.util.concurrent.LinkedBlockingQueue;
import java.util.function.Consumer;
import java.util.function.Supplier;
import dev.peerat.framework.Locker.Key;
public class Locker<V>{
private Map<Key, BlockingQueue<V>> map;

View file

@ -30,7 +30,6 @@ public class Router<U extends User>{
}
private Locker<Context> logger;
private Locker<Exception> exceptions;
private RouteMapper<U>[] mappers;
private List<RouteInterceptor> interceptors;
private Response noFileFound;
@ -43,7 +42,6 @@ public class Router<U extends User>{
public Router() throws Exception{
this.logger = new Locker<>();
this.exceptions = new Locker<>();
int types = RequestType.values().length;
this.mappers = new RouteMapper[types];
this.interceptors = new ArrayList<>();
@ -144,10 +142,6 @@ public class Router<U extends User>{
return this.logger;
}
public Locker<Exception> getExceptionLogger(){
return this.exceptions;
}
public void listen(int port, boolean ssl) throws Exception{
if (ssl) { // Not needed with the use of a proxy
try {