Class HttpProxy
java.lang.Object
io.vertx.rxjava3.httpproxy.HttpProxy
- All Implemented Interfaces:
Handler<HttpServerRequest>, io.vertx.lang.rx.RxDelegate
public class HttpProxy
extends Object
implements io.vertx.lang.rx.RxDelegate, Handler<HttpServerRequest>
Handles the HTTP reverse proxy logic between the user agent and the origin.
NOTE: This class has been automatically generated from the original non RX-ified interface using Vert.x codegen.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddInterceptor(ProxyInterceptor interceptor) Add an interceptor to the interceptor chain.addInterceptor(ProxyInterceptor interceptor, boolean supportsWebSocketUpgrade) Add an interceptor to the interceptor chain.booleanvoidhandle(HttpServerRequest request) Handle the outboundHttpServerRequest.inthashCode()static HttpProxynewInstance(HttpProxy arg) Set the host name and port number of the origin.origin(SocketAddress address) Set theSocketAddressof the origin.origin(OriginRequestProvider provider) Set a provider that creates the request to the origin server based onProxyContext.static HttpProxyreverseProxy(ProxyOptions options, HttpClient client) Create a newHttpProxyinstance.static HttpProxyreverseProxy(HttpClient client) Create a newHttpProxyinstance.toString()
-
Field Details
-
__TYPE_ARG
-
-
Constructor Details
-
HttpProxy
-
HttpProxy
-
-
Method Details
-
toString
-
equals
-
hashCode
-
getDelegate
- Specified by:
getDelegatein interfaceio.vertx.lang.rx.RxDelegate
-
reverseProxy
Create a newHttpProxyinstance.- Parameters:
client- theHttpClientthat forwards outbound requests to the origin.- Returns:
- a reference to this, so the API can be used fluently.
-
reverseProxy
Create a newHttpProxyinstance.- Parameters:
options-client- theHttpClientthat forwards outbound requests to the origin.- Returns:
- a reference to this, so the API can be used fluently.
-
origin
Set theSocketAddressof the origin.- Parameters:
address- theSocketAddressof the origin- Returns:
- a reference to this, so the API can be used fluently
-
origin
-
origin
Set a provider that creates the request to the origin server based onProxyContext.- Parameters:
provider- the provider- Returns:
- a reference to this, so the API can be used fluently
-
addInterceptor
Add an interceptor to the interceptor chain.Interceptors are invoked in order of configuration. When added with this method, it is considered the interceptor doesn't support WebSocket upgrades.
- Parameters:
interceptor- theProxyInterceptorto add- Returns:
- a reference to this, so the API can be used fluently
-
addInterceptor
Add an interceptor to the interceptor chain.Interceptors are invoked in order of configuration.
- Parameters:
interceptor- theProxyInterceptorto addsupportsWebSocketUpgrade- whether the interceptor supports WebSocket upgrades- Returns:
- a reference to this, so the API can be used fluently
-
handle
Handle the outboundHttpServerRequest.- Specified by:
handlein interfaceHandler<HttpServerRequest>- Parameters:
request- the outboundHttpServerRequest
-
newInstance
-