PageRenderTime 41ms CodeModel.GetById 14ms RepoModel.GetById 0ms app.codeStats 0ms

/jboss-as-7.1.1.Final/web/src/main/java/org/jboss/as/web/session/SessionManager.java

#
Java | 78 lines | 14 code | 10 blank | 54 comment | 0 complexity | 5d94005f100491798184012965f31ac9 MD5 | raw file
Possible License(s): LGPL-2.1, Apache-2.0
  1. /*
  2. * JBoss, Home of Professional Open Source.
  3. * Copyright 2008, Red Hat Middleware LLC, and individual contributors
  4. * as indicated by the @author tags. See the copyright.txt file in the
  5. * distribution for a full listing of individual contributors.
  6. *
  7. * This is free software; you can redistribute it and/or modify it
  8. * under the terms of the GNU Lesser General Public License as
  9. * published by the Free Software Foundation; either version 2.1 of
  10. * the License, or (at your option) any later version.
  11. *
  12. * This software is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  15. * Lesser General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU Lesser General Public
  18. * License along with this software; if not, write to the Free
  19. * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
  20. * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
  21. */
  22. package org.jboss.as.web.session;
  23. import java.util.Map;
  24. import javax.servlet.http.HttpServletResponse;
  25. import org.apache.catalina.Manager;
  26. import org.apache.catalina.Session;
  27. /**
  28. * Common interface for the http session replication managers.
  29. *
  30. * @author Scott.Stark@jboss.org
  31. * @version $Revision: 108925 $
  32. */
  33. public interface SessionManager extends Manager {
  34. /**
  35. * Retrieve the JvmRoute for the enclosing Engine.
  36. *
  37. * @return the JvmRoute or null.
  38. */
  39. String getJvmRoute();
  40. /**
  41. * Locate the most appropriate jvm route for the specified sessionId
  42. *
  43. * @param sessionId a session identifier
  44. * @return a jvm route
  45. */
  46. String locate(String sessionId);
  47. /**
  48. * Sets a new cookie for the given session id and response
  49. *
  50. * @param sessionId The session id
  51. */
  52. void setNewSessionCookie(String sessionId, HttpServletResponse response);
  53. /**
  54. * Remove the active session locally from the manager without replicating to the cluster. This can be useful when the
  55. * session is expired, for example, where there is not need to propagate the expiration.
  56. *
  57. * @param session
  58. */
  59. void removeLocal(Session session);
  60. /**
  61. * Store the modified session.
  62. *
  63. * @param session
  64. */
  65. boolean storeSession(Session session);
  66. Map.Entry<String, String> parse(String sessionId);
  67. String createSessionId(String realId, String jvmRoute);
  68. }