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

Commit bb63b67

Browse files
committed
Update HttpSessionHandler.java
1 parent 41d72fb commit bb63b67

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/main/java/com/kttdevelopment/simplehttpserver/HttpSessionHandler.java

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
*/
1414
public class HttpSessionHandler {
1515

16-
private Map<String,HttpSession> sessions = new HashMap<>();
16+
private final Map<String,HttpSession> sessions = new HashMap<>();
1717

1818
private final String cookie;
1919

@@ -56,8 +56,12 @@ public synchronized String assignSessionID(final HttpExchange exchange){
5656
}
5757

5858
/**
59-
* Assigns a session to the client
60-
* @param exchange
59+
* Assigns a session to the client. Session will only be saved client side if the exchange headers are sent using {@link HttpExchange#sendResponseHeaders(int, long)}.
60+
*
61+
* @param exchange http exchange
62+
*
63+
* @since 03.03.00
64+
* @author Ktt Development
6165
*/
6266
public synchronized final void assignSession(final HttpExchange exchange){
6367
final String sessionId;
@@ -135,5 +139,4 @@ public final String toString(){
135139
}
136140
}
137141

138-
139142
}

0 commit comments

Comments
 (0)