Class ReplicatedContext.ReplApplContext

    • Field Detail

      • tomcatAttributes

        protected final java.util.Map<java.lang.String,​java.lang.Object> tomcatAttributes
        Map for Tomcat-specific attributes that should not be replicated.
    • Constructor Detail

      • ReplApplContext

        public ReplApplContext​(ReplicatedContext context)
        Create a new instance.
        Parameters:
        context - the replicated context
    • Method Detail

      • getParent

        protected ReplicatedContext getParent()
        Return the parent replicated context.
        Returns:
        the parent context
      • getAttributeMap

        public java.util.Map<java.lang.String,​java.lang.Object> getAttributeMap()
        Return the attribute map.
        Returns:
        the attribute map
      • setAttributeMap

        public void setAttributeMap​(java.util.Map<java.lang.String,​java.lang.Object> map)
        Set the attribute map.
        Parameters:
        map - the new attribute map
      • setAttribute

        public void setAttribute​(java.lang.String name,
                                 java.lang.Object value)
        Description copied from interface: jakarta.servlet.ServletContext
        Binds an object to a given attribute name in this servlet context. If the name specified is already used for an attribute, this method will replace the attribute with the new to the new attribute.

        If listeners are configured on the ServletContext the container notifies them accordingly.

        If a null value is passed, the effect is the same as calling removeAttribute().

        Attribute names should follow the same convention as package names. The Jakarta EE platform reserves names matching jakarta.*.

        Specified by:
        setAttribute in interface ServletContext
        Overrides:
        setAttribute in class ApplicationContext
        Parameters:
        name - a String specifying the name of the attribute
        value - an Object representing the attribute to be bound
      • getAttribute

        public java.lang.Object getAttribute​(java.lang.String name)
        Description copied from interface: jakarta.servlet.ServletContext
        Returns the servlet container attribute with the given name, or null if there is no attribute by that name. An attribute allows a servlet container to give the servlet additional information not already provided by this interface. See your server documentation for information about its attributes. A list of supported attributes can be retrieved using getAttributeNames.

        The attribute is returned as a java.lang.Object or some subclass. Attribute names should follow the same convention as package names. The Jakarta EE platform reserves names matching jakarta.*.

        Specified by:
        getAttribute in interface ServletContext
        Overrides:
        getAttribute in class ApplicationContext
        Parameters:
        name - a String specifying the name of the attribute
        Returns:
        an Object containing the value of the attribute, or null if no attribute exists matching the given name
        See Also:
        ServletContext.getAttributeNames()