|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjuzu.Response
juzu.Response.Content<S>
public static class Response.Content<S extends Stream>
Nested Class Summary |
---|
Nested classes/interfaces inherited from class juzu.Response |
---|
Response.Content<S extends Stream>, Response.Redirect, Response.Render, Response.View |
Method Summary | ||
---|---|---|
Class<S> |
getKind()
|
|
String |
getMimeType()
|
|
Integer |
getStatus()
|
|
Streamable<S> |
getStreamable()
|
|
void |
send(S stream)
Send the response on the stream argument, Juzu invokes it when it needs to render the content object. |
|
Response.Content<S> |
with(PropertyType<Boolean> propertyType)
Set a boolean property to true. |
|
|
with(PropertyType<T> propertyType,
T propertyValue)
Set a property, if the value is null, the property is removed. |
|
Response.Content<S> |
withHeader(String name,
String... value)
|
|
Response.Content<S> |
withMimeType(String mimeType)
|
|
Response.Content<S> |
withNo(PropertyType<Boolean> propertyType)
Set a boolean property to false. |
|
|
without(PropertyType<T> propertyType)
Removes a property. |
Methods inherited from class juzu.Response |
---|
content, content, content, getProperties, notFound, ok, ok, redirect, render, render |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public Class<S> getKind()
public Streamable<S> getStreamable()
public String getMimeType()
public Response.Content<S> withMimeType(String mimeType)
public Response.Content<S> withHeader(String name, String... value)
withHeader
in class Response
public <T> Response.Content<S> with(PropertyType<T> propertyType, T propertyValue) throws NullPointerException
Response
with
in class Response
propertyType
- the property typepropertyValue
- the property value
NullPointerException
- if the property type is nullpublic <T> Response.Content<S> without(PropertyType<T> propertyType) throws NullPointerException
Response
without
in class Response
propertyType
- the property type
NullPointerException
- if the property type is nullpublic Response.Content<S> with(PropertyType<Boolean> propertyType) throws NullPointerException
Response
with
in class Response
propertyType
- the property type
NullPointerException
- if the property type is nullpublic Response.Content<S> withNo(PropertyType<Boolean> propertyType) throws NullPointerException
Response
withNo
in class Response
propertyType
- the property type
NullPointerException
- if the property type is nullpublic Integer getStatus()
public void send(S stream) throws IOException
stream
- the stream for sending the response
IOException
- any io exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |