Package org.swisspush.gateleen.core.http
Class LocalHttpServerResponse
- java.lang.Object
-
- org.swisspush.gateleen.core.http.BufferBridge
-
- org.swisspush.gateleen.core.http.LocalHttpServerResponse
-
- All Implemented Interfaces:
io.vertx.core.http.HttpServerResponse,io.vertx.core.streams.StreamBase,io.vertx.core.streams.WriteStream<io.vertx.core.buffer.Buffer>,FastFailHttpServerResponse
public class LocalHttpServerResponse extends BufferBridge implements FastFailHttpServerResponse
Bridges the reponses of a LocalHttpClientRequest.- Author:
- https://github.com/lbovet [Laurent Bovet]
-
-
Field Summary
Fields Modifier and Type Field Description io.vertx.core.http.HttpClientResponseclientResponse-
Fields inherited from interface org.swisspush.gateleen.core.http.FastFailHttpServerResponse
msg
-
-
Constructor Summary
Constructors Constructor Description LocalHttpServerResponse(io.vertx.core.Vertx vertx, GateleenExceptionFactory exceptionFactory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()booleanclosed()io.vertx.core.http.HttpServerResponsecloseHandler(io.vertx.core.Handler<Void> handler)io.vertx.core.Future<Void>end()io.vertx.core.Future<Void>end(io.vertx.core.buffer.Buffer chunk)io.vertx.core.Future<Void>end(String chunk)io.vertx.core.Future<Void>end(String chunk, String enc)booleanended()io.vertx.core.http.HttpServerResponseexceptionHandler(io.vertx.core.Handler<Throwable> handler)intgetStatusCode()StringgetStatusMessage()io.vertx.core.MultiMapheaders()booleanheadWritten()booleanisChunked()io.vertx.core.http.HttpServerResponseputHeader(CharSequence name, CharSequence value)io.vertx.core.http.HttpServerResponseputHeader(CharSequence name, Iterable<CharSequence> values)io.vertx.core.http.HttpServerResponseputHeader(String name, Iterable<String> values)io.vertx.core.http.HttpServerResponseputHeader(String name, String value)io.vertx.core.http.HttpServerResponsesetChunked(boolean chunked)voidsetHttpClientResponseHandler(io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.core.http.HttpClientResponse>> responseHandler)io.vertx.core.http.HttpServerResponsesetStatusCode(int statusCode)io.vertx.core.http.HttpServerResponsesetStatusMessage(String statusMessage)io.vertx.core.http.HttpServerResponsesetWriteQueueMaxSize(int maxSize)io.vertx.core.Future<Void>write(io.vertx.core.buffer.Buffer data)voidwrite(io.vertx.core.buffer.Buffer data, io.vertx.core.Handler<io.vertx.core.AsyncResult<Void>> handler)io.vertx.core.Future<Void>write(String chunk)voidwrite(String chunk, io.vertx.core.Handler<io.vertx.core.AsyncResult<Void>> handler)io.vertx.core.Future<Void>write(String chunk, String enc)voidwrite(String chunk, String enc, io.vertx.core.Handler<io.vertx.core.AsyncResult<Void>> handler)booleanwriteQueueFull()-
Methods inherited from class org.swisspush.gateleen.core.http.BufferBridge
doEnd, doWrite, pump, setBodyHandler, setDataHandler, setEndHandler, setExceptionHandler
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.swisspush.gateleen.core.http.FastFailHttpServerResponse
addCookie, bodyEndHandler, bytesWritten, drainHandler, end, end, end, end, endHandler, headersEndHandler, push, push, push, push, push, push, putTrailer, putTrailer, putTrailer, putTrailer, removeCookie, removeCookie, removeCookies, reset, sendFile, sendFile, streamId, trailers, writeContinue, writeCustomFrame, writeEarlyHints, writeEarlyHints
-
-
-
-
Constructor Detail
-
LocalHttpServerResponse
public LocalHttpServerResponse(io.vertx.core.Vertx vertx, GateleenExceptionFactory exceptionFactory)
-
-
Method Detail
-
getStatusCode
public int getStatusCode()
- Specified by:
getStatusCodein interfaceFastFailHttpServerResponse- Specified by:
getStatusCodein interfaceio.vertx.core.http.HttpServerResponse
-
setStatusCode
public io.vertx.core.http.HttpServerResponse setStatusCode(int statusCode)
- Specified by:
setStatusCodein interfaceFastFailHttpServerResponse- Specified by:
setStatusCodein interfaceio.vertx.core.http.HttpServerResponse
-
getStatusMessage
public String getStatusMessage()
- Specified by:
getStatusMessagein interfaceFastFailHttpServerResponse- Specified by:
getStatusMessagein interfaceio.vertx.core.http.HttpServerResponse
-
setStatusMessage
public io.vertx.core.http.HttpServerResponse setStatusMessage(String statusMessage)
- Specified by:
setStatusMessagein interfaceFastFailHttpServerResponse- Specified by:
setStatusMessagein interfaceio.vertx.core.http.HttpServerResponse
-
setChunked
public io.vertx.core.http.HttpServerResponse setChunked(boolean chunked)
- Specified by:
setChunkedin interfaceFastFailHttpServerResponse- Specified by:
setChunkedin interfaceio.vertx.core.http.HttpServerResponse
-
isChunked
public boolean isChunked()
- Specified by:
isChunkedin interfaceFastFailHttpServerResponse- Specified by:
isChunkedin interfaceio.vertx.core.http.HttpServerResponse
-
headers
public io.vertx.core.MultiMap headers()
- Specified by:
headersin interfaceFastFailHttpServerResponse- Specified by:
headersin interfaceio.vertx.core.http.HttpServerResponse
-
putHeader
public io.vertx.core.http.HttpServerResponse putHeader(String name, String value)
- Specified by:
putHeaderin interfaceFastFailHttpServerResponse- Specified by:
putHeaderin interfaceio.vertx.core.http.HttpServerResponse
-
putHeader
public io.vertx.core.http.HttpServerResponse putHeader(CharSequence name, CharSequence value)
- Specified by:
putHeaderin interfaceFastFailHttpServerResponse- Specified by:
putHeaderin interfaceio.vertx.core.http.HttpServerResponse
-
putHeader
public io.vertx.core.http.HttpServerResponse putHeader(String name, Iterable<String> values)
- Specified by:
putHeaderin interfaceFastFailHttpServerResponse- Specified by:
putHeaderin interfaceio.vertx.core.http.HttpServerResponse
-
putHeader
public io.vertx.core.http.HttpServerResponse putHeader(CharSequence name, Iterable<CharSequence> values)
- Specified by:
putHeaderin interfaceFastFailHttpServerResponse- Specified by:
putHeaderin interfaceio.vertx.core.http.HttpServerResponse
-
closeHandler
public io.vertx.core.http.HttpServerResponse closeHandler(io.vertx.core.Handler<Void> handler)
- Specified by:
closeHandlerin interfaceFastFailHttpServerResponse- Specified by:
closeHandlerin interfaceio.vertx.core.http.HttpServerResponse
-
write
public io.vertx.core.Future<Void> write(String chunk, String enc)
- Specified by:
writein interfaceFastFailHttpServerResponse- Specified by:
writein interfaceio.vertx.core.http.HttpServerResponse
-
write
public io.vertx.core.Future<Void> write(io.vertx.core.buffer.Buffer data)
- Specified by:
writein interfaceFastFailHttpServerResponse- Specified by:
writein interfaceio.vertx.core.streams.WriteStream<io.vertx.core.buffer.Buffer>
-
write
public void write(io.vertx.core.buffer.Buffer data, io.vertx.core.Handler<io.vertx.core.AsyncResult<Void>> handler)- Specified by:
writein interfaceFastFailHttpServerResponse- Specified by:
writein interfaceio.vertx.core.streams.WriteStream<io.vertx.core.buffer.Buffer>
-
write
public void write(String chunk, String enc, io.vertx.core.Handler<io.vertx.core.AsyncResult<Void>> handler)
- Specified by:
writein interfaceFastFailHttpServerResponse- Specified by:
writein interfaceio.vertx.core.http.HttpServerResponse
-
write
public io.vertx.core.Future<Void> write(String chunk)
- Specified by:
writein interfaceFastFailHttpServerResponse- Specified by:
writein interfaceio.vertx.core.http.HttpServerResponse
-
write
public void write(String chunk, io.vertx.core.Handler<io.vertx.core.AsyncResult<Void>> handler)
- Specified by:
writein interfaceFastFailHttpServerResponse- Specified by:
writein interfaceio.vertx.core.http.HttpServerResponse
-
end
public io.vertx.core.Future<Void> end(String chunk)
- Specified by:
endin interfaceio.vertx.core.http.HttpServerResponse
-
end
public io.vertx.core.Future<Void> end(String chunk, String enc)
- Specified by:
endin interfaceFastFailHttpServerResponse- Specified by:
endin interfaceio.vertx.core.http.HttpServerResponse
-
end
public io.vertx.core.Future<Void> end(io.vertx.core.buffer.Buffer chunk)
- Specified by:
endin interfaceio.vertx.core.http.HttpServerResponse- Specified by:
endin interfaceio.vertx.core.streams.WriteStream<io.vertx.core.buffer.Buffer>
-
end
public io.vertx.core.Future<Void> end()
- Specified by:
endin interfaceio.vertx.core.http.HttpServerResponse- Specified by:
endin interfaceio.vertx.core.streams.WriteStream<io.vertx.core.buffer.Buffer>
-
close
public void close()
- Specified by:
closein interfaceFastFailHttpServerResponse- Specified by:
closein interfaceio.vertx.core.http.HttpServerResponse
-
ended
public boolean ended()
- Specified by:
endedin interfaceFastFailHttpServerResponse- Specified by:
endedin interfaceio.vertx.core.http.HttpServerResponse
-
closed
public boolean closed()
- Specified by:
closedin interfaceFastFailHttpServerResponse- Specified by:
closedin interfaceio.vertx.core.http.HttpServerResponse
-
headWritten
public boolean headWritten()
- Specified by:
headWrittenin interfaceFastFailHttpServerResponse- Specified by:
headWrittenin interfaceio.vertx.core.http.HttpServerResponse
-
setWriteQueueMaxSize
public io.vertx.core.http.HttpServerResponse setWriteQueueMaxSize(int maxSize)
- Specified by:
setWriteQueueMaxSizein interfaceFastFailHttpServerResponse- Specified by:
setWriteQueueMaxSizein interfaceio.vertx.core.http.HttpServerResponse- Specified by:
setWriteQueueMaxSizein interfaceio.vertx.core.streams.WriteStream<io.vertx.core.buffer.Buffer>
-
writeQueueFull
public boolean writeQueueFull()
- Specified by:
writeQueueFullin interfaceFastFailHttpServerResponse- Specified by:
writeQueueFullin interfaceio.vertx.core.streams.WriteStream<io.vertx.core.buffer.Buffer>
-
exceptionHandler
public io.vertx.core.http.HttpServerResponse exceptionHandler(io.vertx.core.Handler<Throwable> handler)
- Specified by:
exceptionHandlerin interfaceFastFailHttpServerResponse- Specified by:
exceptionHandlerin interfaceio.vertx.core.http.HttpServerResponse- Specified by:
exceptionHandlerin interfaceio.vertx.core.streams.StreamBase- Specified by:
exceptionHandlerin interfaceio.vertx.core.streams.WriteStream<io.vertx.core.buffer.Buffer>
-
setHttpClientResponseHandler
public void setHttpClientResponseHandler(io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.core.http.HttpClientResponse>> responseHandler)
-
-