All Downloads are FREE. Search and download functionalities are using the official Maven repository.

kikaha.urouting.api.MutableResponse Maven / Gradle / Ivy

There is a newer version: 2.1.10.Final
Show newest version
package kikaha.urouting.api;

import io.undertow.util.*;
import lombok.NonNull;

/**
 *
 */
public interface MutableResponse extends Response {

	/**
	 * Define the entity that will be serialized.
	 *
	 * @param entity
	 * @return
	 */
	MutableResponse entity( Object entity );

	/**
	 * Override all headers.
	 *
	 * @param headers
	 * @return
	 */
	MutableResponse headers( Iterable
headers ); /** * Define the content encoding. * * @param encoding * @return */ MutableResponse encoding( String encoding ); /** * Define the Content-Type defined with this {@link Response}. * * @param value * @return */ default MutableResponse contentType( String value ) { return header( Headers.CONTENT_TYPE, value ); } /** * Defines a new header value. * * @param name * @param value * @return */ default MutableResponse header(final String name, @NonNull final String value ) { return header( new HttpString(name), value ); } /** * Defines a new header value. * * @param name * @param value * @return */ MutableResponse header(final HttpString name, final String value ); }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy