Skip to content
This repository was archived by the owner on Jul 31, 2022. It is now read-only.

Commit c77eb4f

Browse files
committed
Pushed throttled connection to later version
1 parent 1ae5031 commit c77eb4f

4 files changed

Lines changed: 19 additions & 17 deletions

File tree

src/ktt/lib/httpserver/server/HttpSession.java

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ synchronized static HttpSession create(){
4949
*/
5050
public abstract String getSessionID();
5151

52+
//
53+
5254
/**
5355
* Returns when the session was created.
5456
*
@@ -77,17 +79,4 @@ synchronized static HttpSession create(){
7779
*/
7880
public abstract void updateLastAccessTime();
7981

80-
//
81-
82-
@Override
83-
public String toString(){
84-
final StringBuilder OUT = new StringBuilder();
85-
OUT.append("HttpSession") .append("{");
86-
OUT.append("sessionID") .append("= ") .append(getSessionID()) .append(", ");
87-
OUT.append("creationTime") .append("= ") .append(getCreationTime()) .append(", ");
88-
OUT.append("lastAccessTime").append("= ") .append(getLastAccessTime());
89-
OUT.append("}");
90-
return OUT.toString();
91-
}
92-
9382
}

src/ktt/lib/httpserver/server/HttpSessionImpl.java

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ public final String getSessionID(){
4040
return sessionID;
4141
}
4242

43+
//
44+
4345
@Override
4446
public final long getCreationTime(){
4547
return creationTime;
@@ -55,6 +57,19 @@ public synchronized final void updateLastAccessTime(){
5557
lastAccessTime = System.currentTimeMillis();
5658
}
5759

60+
//
61+
62+
@Override
63+
public final String toString(){
64+
final StringBuilder OUT = new StringBuilder();
65+
OUT.append("HttpSession") .append("{");
66+
OUT.append("sessionID") .append("= ") .append(sessionID) .append(", ");
67+
OUT.append("creationTime") .append("= ") .append(creationTime) .append(", ");
68+
OUT.append("lastAccessTime").append("= ") .append(lastAccessTime);
69+
OUT.append("}");
70+
return OUT.toString();
71+
}
72+
5873
};
5974
}
6075

src/ktt/lib/httpserver/server/SimpleHttpHandler.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,10 @@ public abstract class SimpleHttpHandler implements HttpHandler, SimpleHttpExchan
2828
@Override
2929
public final void handle(final HttpExchange exchange) throws IOException{
3030
final SimpleHttpExchange sxe = SimpleHttpExchange.create(exchange);
31-
if(authenticate(sxe)){
31+
if(authenticate(sxe))
3232
handle(sxe);
33-
}else{
33+
else
3434
sxe.close();
35-
}
3635
}
3736

3837
/**

src/ktt/lib/httpserver/server/SimpleHttpServerImpl.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,6 @@ public synchronized final HttpContext createTemporaryContext(final String contex
190190
return httpContext;
191191
}
192192

193-
194193
//
195194

196195
@Override

0 commit comments

Comments
 (0)