Standard implementation of ServletContext that represents a web application's execution environment. An instance of this class is associated with each instance of StandardContext .
| 84 | * instance of this class is associated with each instance of <code>StandardContext</code>. |
| 85 | */ |
| 86 | public class ApplicationContext implements ServletContext { |
| 87 | |
| 88 | // ----------------------------------------------------------- Constructors |
| 89 | |
| 90 | /** |
| 91 | * Construct a new instance of this class, associated with the specified Context instance. |
| 92 | * |
| 93 | * @param context The associated Context instance |
| 94 | */ |
| 95 | public ApplicationContext(StandardContext context) { |
| 96 | super(); |
| 97 | this.context = context; |
| 98 | this.service = Container.getService(context); |
| 99 | this.sessionCookieConfig = new ApplicationSessionCookieConfig(context); |
| 100 | |
| 101 | // Populate session tracking modes |
| 102 | populateSessionTrackingModes(); |
| 103 | } |
| 104 | |
| 105 | |
| 106 | // ----------------------------------------------------- Instance Variables |
| 107 | |
| 108 | |
| 109 | /** |
| 110 | * The context attributes for this context. |
| 111 | */ |
| 112 | protected Map<String,Object> attributes = new ConcurrentHashMap<>(); |
| 113 | |
| 114 | |
| 115 | /** |
| 116 | * List of read only attributes for this context. |
| 117 | */ |
| 118 | private final Map<String,String> readOnlyAttributes = new ConcurrentHashMap<>(); |
| 119 | |
| 120 | |
| 121 | /** |
| 122 | * The Context instance with which we are associated. |
| 123 | */ |
| 124 | private final StandardContext context; |
| 125 | |
| 126 | |
| 127 | /** |
| 128 | * The Service instance with which we are associated. |
| 129 | */ |
| 130 | private final Service service; |
| 131 | |
| 132 | |
| 133 | /** |
| 134 | * The facade around this object. |
| 135 | */ |
| 136 | private final ServletContext facade = new ApplicationContextFacade(this); |
| 137 | |
| 138 | |
| 139 | /** |
| 140 | * The merged context initialization parameters for this Context. |
| 141 | */ |
| 142 | private final Map<String,String> parameters = new ConcurrentHashMap<>(); |
| 143 |
nothing calls this directly
no test coverage detected