Example usage for org.springframework.http ResponseCookie getName

List of usage examples for org.springframework.http ResponseCookie getName

Introduction

In this page you can find the example usage for org.springframework.http ResponseCookie getName.

Prototype

public String getName() 

Source Link

Document

Return the cookie name.

Usage

From source file:org.springframework.http.server.reactive.AbstractServerHttpResponse.java

@Override
public void addCookie(ResponseCookie cookie) {
    Assert.notNull(cookie, "ResponseCookie must not be null");

    if (this.state.get() == State.COMMITTED) {
        throw new IllegalStateException(
                "Can't add the cookie " + cookie + "because the HTTP response has already been committed");
    } else {//w  w  w .j  a  v  a  2 s . c  o  m
        getCookies().add(cookie.getName(), cookie);
    }
}