@PublicApi public interface

RequestHeaders

com.atlassian.jira.plugin.searchrequestview.RequestHeaders
Known Indirect Subclasses

@PublicApi

This interface is designed for plugins to consume (call its methods).

Clients of @PublicApi can expect that programs compiled against a given version will remain binary compatible with later versions of the @PublicApi as per each product's API policy as long as the client does not implement/extend @PublicApi interfaces or classes (refer to each product's API policy for the exact guarantee---usually binary compatibility is guaranteed at least across minor versions).

Note: since @PublicApi interfaces and classes are not designed to be implemented or extended by clients, we may perform certain types of binary-incompatible changes to these classes and interfaces, but these will not affect well-behaved clients that do not extend/implement these types (in general, only classes and interfaces annotated with @PublicSpi are safe to extend/implement).

Class Overview

This is a subset of the HttpServletResponse that just deals with setting headers.

See Also
  • javax.servlet.http.HttpServletResponse

Summary

Public Methods
void addDateHeader(String name, long date)
Adds a response header with the given name and date-value.
void addHeader(String name, String value)
Adds a response header with the given name and value.
void addIntHeader(String name, int value)
Adds a response header with the given name and integer value.
void setDateHeader(String name, long date)
Sets a response header with the given name and date-value.
void setHeader(String name, String value)
Sets a response header with the given name and value.
void setIntHeader(String name, int value)
Sets a response header with the given name and integer value.

Public Methods

public void addDateHeader (String name, long date)

Adds a response header with the given name and date-value. The date is specified in terms of milliseconds since the epoch. This method allows response headers to have multiple values.

Parameters
name the name of the header to set
date the additional date value

public void addHeader (String name, String value)

Adds a response header with the given name and value.

This method allows response headers to have multiple values.

Parameters
name the name of the header
value the additional header value

public void addIntHeader (String name, int value)

Adds a response header with the given name and integer value. This method allows response headers to have multiple values.

Parameters
name the name of the header
value the assigned integer value

public void setDateHeader (String name, long date)

Sets a response header with the given name and date-value. The date is specified in terms of milliseconds since the epoch. If the header had already been set, the new value overwrites the previous one.

Parameters
name the name of the header to set
date the assigned date value

public void setHeader (String name, String value)

Sets a response header with the given name and value.

If the header had already been set, the new value overwrites the previous one.

Parameters
name the name of the header
value the header value

public void setIntHeader (String name, int value)

Sets a response header with the given name and integer value. If the header had already been set, the new value overwrites the previous one. The containsHeader method can be used to test for the presence of a header before setting its value.

Parameters
name the name of the header
value the assigned integer value