ContextMapper (Apache Geode 2.0.2)
Description: declaration: package: org.apache.geode.modules.util, class: ContextMapper

Package org.apache.geode.modules.util

# Class ContextMapper

java.lang.Object
org.apache.geode.modules.util.ContextMapper

public class ContextMapper extends Object
This basic singleton class maps context paths to manager instances.

This class exists for a particular corner case described here. Consider a client-server environment with empty client regions *and* the need to fire HttpSessionListener destroy events. When a session expires, in this scenario, the Gemfire destroy events originate on the server and, with some Gemfire hackery, the destroyed object ends up as the event's callback argument. At the point that the CacheListener then gets the event, the re-constituted session object has no manager associated and so we need to re-attach a manager to it so that events can be fired correctly.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static void`
  `addContext(String path, org.apache.catalina.session.ManagerBase manager)`
  `static org.apache.catalina.session.ManagerBase`
  `getContext(String path)`
  `static org.apache.catalina.session.ManagerBase`
  `removeContext(String path)`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Method Details

  - ### addContext

    public static void addContext(String path, org.apache.catalina.session.ManagerBase manager)

  - ### getContext

    public static org.apache.catalina.session.ManagerBase getContext(String path)

  - ### removeContext

    public static org.apache.catalina.session.ManagerBase removeContext(String path)