An object to assist sending response to the client.

By: Matej Lazar

no type hierarchy

no supertypes hierarchy

no subtypes hierarchy

Attributes
responseStatusSource Codeshared formal variable Integer responseStatus

The HTTP status code of the response.

Inherited Attributes
Attributes inherited from: Object
Methods
addHeaderSource Codeshared formal void addHeader(Header header)

Add a header to response. Multiple headers can have the same name. Throws Exception if headers have been already sent to client.

closeSource Codeshared formal void close()
flushSource Codeshared formal void flush()
transferFileSource Codeshared formal void transferFile(OpenFile openFile)
transferFileAsynchronousSource Codeshared formal void transferFileAsynchronous(OpenFile openFile, void onCompletion(), void onError(ServerException e))
writeByteBufferSource Codeshared formal void writeByteBuffer(ByteBuffer buffer)

Writes ByteBuffer to the response.

writeByteBufferAsynchronousSource Codeshared formal void writeByteBufferAsynchronous(ByteBuffer byteBuffer, void onCompletion() = ..., void onError(ServerException e) = ...)
Parameters:
  • onCompletion = noop()
  • onError = noop(e)
writeBytesSource Codeshared formal void writeBytes(Array<Byte> bytes)

Writes bytes to the response.

writeBytesAsynchronousSource Codeshared formal void writeBytesAsynchronous(Array<Byte> bytes, void onCompletion() = ..., void onError(ServerException e) = ...)
Parameters:
  • onCompletion = noop()
  • onError = noop(e)
writeStringSource Codeshared formal void writeString(String string)

Writes string to the response.

writeStringAsynchronousSource Codeshared formal void writeStringAsynchronous(String string, void onCompletion() = ..., void onError(ServerException e) = ...)
Parameters:
  • onCompletion = noop()
  • onError = noop(e)
Inherited Methods
Methods inherited from: Object