-
Notifications
You must be signed in to change notification settings - Fork 309
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[톰캣 구현하기 3, 4단계] 채채(신채원) 미션 제출합니다 #485
Merged
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
fb5d66c
feat: 스레드풀 적용하기
chaewon121 ee59aff
refactor: 세션메니저 인터페이스 적용
chaewon121 13190d3
refactor: httpResponse 구조 수정
chaewon121 7bb1b41
refactor: 클래스 이름 수정
chaewon121 8cee023
refactor: responseHeader 구조 수정
chaewon121 f34b147
refactor: controller 인터페이스 생성 및 적용 리팩터링
chaewon121 f600455
refactor: session 생성자 수정
chaewon121 c8588ee
refactor: session 추가 과정 수정
chaewon121 159200d
refactor: index 페이지 수정
chaewon121 0ed222c
refactor: test 출력 오류 수정
chaewon121 93e171b
refactor: 동시성 컬렉션 적용
chaewon121 ac53939
fix: session 오류 수정
chaewon121 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
12 changes: 7 additions & 5 deletions
12
...apache/coyote/http11/session/Session.java → .../apache/catalina/session/HttpSession.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
32 changes: 32 additions & 0 deletions
32
tomcat/src/main/java/org/apache/catalina/session/SessionManager.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 |
---|---|---|
@@ -0,0 +1,32 @@ | ||
package org.apache.catalina.session; | ||
|
||
import org.apache.catalina.Manager; | ||
|
||
import java.util.Map; | ||
import java.util.concurrent.ConcurrentHashMap; | ||
|
||
public class SessionManager implements Manager { | ||
|
||
// static! | ||
private static final Map<String, HttpSession> sessions = new ConcurrentHashMap<>(); | ||
|
||
@Override | ||
public void add(HttpSession httpSession) { | ||
sessions.put(httpSession.getId(), httpSession); | ||
} | ||
|
||
@Override | ||
public HttpSession findSession(final String id) { | ||
return sessions.get(id); | ||
} | ||
|
||
@Override | ||
public void remove(HttpSession httpSession) { | ||
sessions.remove(httpSession.getId()); | ||
} | ||
|
||
public static boolean isExist(final String id) { | ||
return sessions.containsKey(id); | ||
} | ||
|
||
} |
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 |
---|---|---|
|
@@ -36,4 +36,5 @@ private boolean isSameExtension(String extension) { | |
public String getContentType() { | ||
return contentType; | ||
} | ||
|
||
} |
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
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
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
10 changes: 10 additions & 0 deletions
10
tomcat/src/main/java/org/apache/coyote/http11/response/Controller.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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package org.apache.coyote.http11.response; | ||
|
||
import org.apache.coyote.http11.request.HttpRequest; | ||
|
||
import java.io.IOException; | ||
|
||
public interface Controller { | ||
void service(final HttpRequest request, | ||
final HttpResponse response) throws IOException; | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍