-
- All Implemented Interfaces:
public interface ResponsePort
-
-
Method Summary
Modifier and Type Method Description abstract OutputStreamoutputStream()Provides a OutputStream instance for the response. abstract Integerstatus()Provides the status code of the response. abstract Unitstatus(Integer value)Sets the status code of the response. abstract Objectbody()Provides the body of the response. abstract Unitbody(Object value)Sets the body of the response. abstract StringcontentType()Provides the content type of the response. abstract UnitcontentType(String value)Sets the content type of the response. abstract UnitaddCookie(Cookie cookie)Sends a response by adding the given cookie. abstract UnitremoveCookie(String name)Sends a response by removing the cookie with specified name. abstract Unitredirect(String url)Sends a redirect response to the client using the specified redirect URL. -
-
Method Detail
-
outputStream
abstract OutputStream outputStream()
Provides a OutputStream instance for the response.
-
status
abstract Unit status(Integer value)
Sets the status code of the response.
- Parameters:
value- Status code.
-
body
abstract Unit body(Object value)
Sets the body of the response.
- Parameters:
value- Body content.
-
contentType
abstract String contentType()
Provides the content type of the response.
-
contentType
abstract Unit contentType(String value)
Sets the content type of the response.
- Parameters:
value- Content type info.
-
addCookie
abstract Unit addCookie(Cookie cookie)
Sends a response by adding the given cookie.
- Parameters:
cookie- Cookie to be added.
-
removeCookie
abstract Unit removeCookie(String name)
Sends a response by removing the cookie with specified name.
- Parameters:
name- Cookie to be deleted.
-
-
-
-