Interface UserServiceGetResponse
-
public interface UserServiceGetResponse
This interface provides methods to generate a response when processing an GET request.- Since:
- 5.8.0
- See Also:
UserServiceGetRequest.processRequest(UserServiceGetContext, UserServiceGetResponse)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description OutputStream
getOutputStream()
Returns aOutputStream
suitable for writing binary data in the response.void
setContentType(String aType)
Sets the MIME type of the response being sent to the client.void
setHeader(String aName, String aValue)
Sets a response header with the given name and value.
-
-
-
Method Detail
-
setContentType
void setContentType(String aType)
Sets the MIME type of the response being sent to the client. This method must be called beforegetOutputStream()
.- Parameters:
aType
- the MIME type.
-
setHeader
void setHeader(String aName, String aValue)
Sets a response header with the given name and value. If the header had already been set, the new value overwrites the previous one. This method must be called beforegetOutputStream()
.- Parameters:
aName
- the name of the headeraValue
- the header value. If it contains octet string, it should be encoded according to RFC 2047.
-
getOutputStream
OutputStream getOutputStream()
Returns aOutputStream
suitable for writing binary data in the response.- Returns:
- the output stream. Never
null
.
-
-