Class AbstractBayeuxContext

    • Method Detail

      • getURL

        public String getURL()
        Specified by:
        getURL in interface BayeuxContext
        Returns:
        the full request URI complete with query string if present.
      • getHeader

        public String getHeader​(String name)
        Description copied from interface: BayeuxContext
        Get a transport header.

        Get a header for any current transport mechanism (eg HTTP request). For transports like websocket, the header may be from the initial handshake.

        Specified by:
        getHeader in interface BayeuxContext
        Parameters:
        name - The name of the header
        Returns:
        The header value or null if no current transport mechanism or no such header.
      • getHeaderValues

        public List<String> getHeaderValues​(String name)
        Description copied from interface: BayeuxContext
        Get a multi valued transport header.

        Get a header for any current transport mechanism (eg HTTP request). For transports like websocket, the header may be from the initial handshake.

        Specified by:
        getHeaderValues in interface BayeuxContext
        Parameters:
        name - The name of the header
        Returns:
        The header value or null if no current transport mechanism or no such header.
      • getParameter

        public String getParameter​(String name)
        Description copied from interface: BayeuxContext
        Get a transport parameter.

        Get a parameter for any current transport mechanism (eg HTTP request). For transports like websocket, the parameter may be from the initial handshake.

        Specified by:
        getParameter in interface BayeuxContext
        Parameters:
        name - The name of the parameter
        Returns:
        The parameter value or null if no current transport mechanism or no such parameter.
      • getParameterValues

        public List<String> getParameterValues​(String name)
        Description copied from interface: BayeuxContext
        Get a multi valued transport parameter.

        Get a parameter for any current transport mechanism (eg HTTP request). For transports like websocket, the parameter may be from the initial handshake.

        Specified by:
        getParameterValues in interface BayeuxContext
        Parameters:
        name - The name of the parameter
        Returns:
        The parameter value or null if no current transport mechanism or no such parameter.
      • isUserInRole

        public boolean isUserInRole​(String role)
        Specified by:
        isUserInRole in interface BayeuxContext
        Parameters:
        role - the role to check whether the user belongs to
        Returns:
        true if there is a known user and they are in the given role.
      • getLocales

        public List<Locale> getLocales()
        Specified by:
        getLocales in interface BayeuxContext
        Returns:
        the request Locales, in order of preference, or the default server Locale if the request Locales are missing.
      • getCookie

        public String getCookie​(String name)
        Description copied from interface: BayeuxContext
        Get a transport cookie.

        Get a cookie for any current transport mechanism (eg HTTP request). For transports like websocket, the cookie may be from the initial handshake.

        Specified by:
        getCookie in interface BayeuxContext
        Parameters:
        name - The name of the cookie
        Returns:
        The cookie value or null if no current transport mechanism or no such cookie.
      • getRequestAttribute

        public Object getRequestAttribute​(String name)
        Description copied from interface: BayeuxContext
        Access the Request (if any) attributes.
        Specified by:
        getRequestAttribute in interface BayeuxContext
        Parameters:
        name - the attribute name
        Returns:
        The attribute value
      • getContextAttribute

        public Object getContextAttribute​(String name)
        Description copied from interface: BayeuxContext
        Access the ServletContext (if any) attributes.
        Specified by:
        getContextAttribute in interface BayeuxContext
        Parameters:
        name - the attribute name
        Returns:
        The attribute value
      • getContextInitParameter

        public String getContextInitParameter​(String name)
        Description copied from interface: BayeuxContext
        Access the ServletContext (if any) init parameter.
        Specified by:
        getContextInitParameter in interface BayeuxContext
        Parameters:
        name - the init parameter name
        Returns:
        The attribute value
      • getProtocol

        public String getProtocol()
        Specified by:
        getProtocol in interface BayeuxContext
        Returns:
        a string containing the protocol name and version number
      • isSecure

        public boolean isSecure()
        Specified by:
        isSecure in interface BayeuxContext
        Returns:
        whether the request was made over a secure channel