public static class Response.Status extends Response
Response.Body, Response.Content, Response.Error, Response.Redirect, Response.Status, Response.View
Constructor and Description |
---|
Response.Status(int code) |
Response.Status(int code,
PropertyMap properties) |
Modifier and Type | Method and Description |
---|---|
Response.Body |
body(byte[] s) |
Response.Body |
body(CharSequence s) |
Response.Body |
body(ChunkBuffer s) |
Response.Body |
body(InputStream s) |
Response.Body |
body(Streamable s) |
Response.Content |
content(byte[] s) |
Response.Content |
content(CharSequence s) |
Response.Content |
content(InputStream s) |
Response.Content |
content(Streamable s) |
int |
getCode() |
Streamable |
streamable() |
Response.Status |
with(PropertyType<Boolean> propertyType)
Set a boolean property to true.
|
<T> Response.Status |
with(PropertyType<T> propertyType,
T propertyValue)
Set a property, if the value is null, the property is removed.
|
Response.Status |
withHeader(String name,
String... value) |
Response.Status |
withNo(PropertyType<Boolean> propertyType)
Set a boolean property to false.
|
<T> Response.Status |
without(PropertyType<T> propertyType)
Removes a property.
|
public Response.Status(int code)
public Response.Status(int code, PropertyMap properties)
public final int getCode()
public Response.Body body(Streamable s)
public Response.Body body(ChunkBuffer s)
public Response.Body body(CharSequence s)
public Response.Body body(byte[] s)
public Response.Body body(InputStream s)
public Response.Content content(Streamable s)
public Response.Content content(CharSequence s)
public Response.Content content(byte[] s)
public Response.Content content(InputStream s)
public Response.Status withHeader(String name, String... value)
withHeader
in class Response
public Response.Status withNo(PropertyType<Boolean> propertyType) throws NullPointerException
Response
withNo
in class Response
propertyType
- the property typeNullPointerException
- if the property type is nullpublic Response.Status with(PropertyType<Boolean> propertyType) throws NullPointerException
Response
with
in class Response
propertyType
- the property typeNullPointerException
- if the property type is nullpublic <T> Response.Status without(PropertyType<T> propertyType) throws NullPointerException
Response
without
in class Response
propertyType
- the property typeNullPointerException
- if the property type is nullpublic <T> Response.Status with(PropertyType<T> propertyType, T propertyValue) throws NullPointerException
Response
with
in class Response
propertyType
- the property typepropertyValue
- the property valueNullPointerException
- if the property type is nullpublic Streamable streamable()
Copyright © 2015 eXo Platform SAS. All rights reserved.