Created
May 17, 2013 19:31
-
-
Save jfuerth/5601406 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| public static class SessionsContainer implements Serializable { | |
| private final Map<String, Object> sharedAttributes = new HashMap<String, Object>(); | |
| private final Map<String, QueueSession> queueSessions = new HashMap<String, QueueSession>(); | |
| public QueueSession createSession(final String httpSessionId, final String remoteQueueId) { | |
| final QueueSession qs = new HttpSessionWrapper(this, httpSessionId, remoteQueueId); | |
| queueSessions.put(remoteQueueId, qs); | |
| return qs; | |
| } | |
| public QueueSession getSession(final String remoteQueueId) { | |
| return queueSessions.get(remoteQueueId); | |
| } | |
| public void removeSession(final String remoteQueueId) { | |
| queueSessions.remove(remoteQueueId); | |
| } | |
| private void writeObject(ObjectOutputStream out) throws IOException { | |
| System.out.println("SessionsContainer is about to get serialized. Contents:"); | |
| System.out.println("sharedAttributes: " + sharedAttributes); | |
| System.out.println("queueSessions: " + queueSessions); | |
| out.defaultWriteObject(); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment