Class HttpTrailer

    • Constructor Detail

      • HttpTrailer

        protected HttpTrailer​(HttpHeader httpHeader)
    • Method Detail

      • isTrailer

        public static boolean isTrailer​(HttpContent httpContent)
        Returns:
        true if passed HttpContent is a HttpTrailder.
      • isLast

        public final boolean isLast()
        Always true true for the trailer message.
        Overrides:
        isLast in class HttpContent
        Returns:
        Always true true for the trailer message.
      • getHeader

        public String getHeader​(String name)
        Get the value, of the specific HTTP mime header.
        Specified by:
        getHeader in interface MimeHeadersPacket
        Parameters:
        name - the mime header name
        Returns:
        the value, of the specific HTTP mime header
      • getHeader

        public String getHeader​(Header header)
        Get the value, of the specific HTTP mime header.
        Specified by:
        getHeader in interface MimeHeadersPacket
        Parameters:
        header - the mime Header
        Returns:
        the value, of the specific HTTP mime header
      • setHeader

        public void setHeader​(String name,
                              String value)
        Set the value, of the specific HTTP mime header.
        Specified by:
        setHeader in interface MimeHeadersPacket
        Parameters:
        name - the mime header name
        value - the mime header value
      • setHeader

        public void setHeader​(String name,
                              HeaderValue value)
        Set the value, of the specific HTTP mime header.
        Specified by:
        setHeader in interface MimeHeadersPacket
        Parameters:
        name - the mime header name
        value - the mime header value
      • setHeader

        public void setHeader​(Header header,
                              String value)
        Set the value, of the specific HTTP mime header.
        Specified by:
        setHeader in interface MimeHeadersPacket
        Parameters:
        header - the mime Header
        value - the mime header value
      • setHeader

        public void setHeader​(Header header,
                              HeaderValue value)
        Set the value, of the specific HTTP mime header.
        Specified by:
        setHeader in interface MimeHeadersPacket
        Parameters:
        header - the mime Header
        value - the mime header value
      • addHeader

        public void addHeader​(String name,
                              String value)
        Add the HTTP mime header.
        Specified by:
        addHeader in interface MimeHeadersPacket
        Parameters:
        name - the mime header name
        value - the mime header value
      • addHeader

        public void addHeader​(String name,
                              HeaderValue value)
        Add the HTTP mime header.
        Specified by:
        addHeader in interface MimeHeadersPacket
        Parameters:
        name - the mime header name
        value - the mime header value
      • containsHeader

        public boolean containsHeader​(String name)
        Returns true, if the mime header with the specific name is present among the HttpHeader mime headers, or false otherwise.
        Specified by:
        containsHeader in interface MimeHeadersPacket
        Parameters:
        name - the mime header name
        Returns:
        true, if the mime header with the specific name is present among the HttpHeader mime headers, or false otherwise
      • containsHeader

        public boolean containsHeader​(Header header)
        Returns true, if the mime Header is present among the HttpHeader mime headers, otherwise returns false.
        Specified by:
        containsHeader in interface MimeHeadersPacket
        Parameters:
        header - the mime Header
        Returns:
        true, if the mime Header is present among the HttpHeader mime headers, otherwise returns false
      • setTrailers

        protected void setTrailers​(MimeHeaders trailers)
        Set the mime trailers.
        Parameters:
        trailers - MimeHeaders.
      • reset

        protected void reset()
        Reset the internal state.
        Overrides:
        reset in class HttpContent
      • recycle

        public void recycle()
        Specified by:
        recycle in interface org.glassfish.grizzly.Cacheable
        Overrides:
        recycle in class HttpContent