Package io.vertx.mutiny.httpproxy
Class HttpProxy
java.lang.Object
io.vertx.mutiny.httpproxy.HttpProxy
- All Implemented Interfaces:
MutinyDelegate,io.vertx.core.Handler<HttpServerRequest>,Consumer<HttpServerRequest>
public class HttpProxy
extends Object
implements io.vertx.core.Handler<HttpServerRequest>, Consumer<HttpServerRequest>, MutinyDelegate
Handles the HTTP reverse proxy logic between the user agent and the origin.
NOTE: This class has been automatically generated from the original non Mutiny-ified interface.
- Author:
- Julien Viet
- See Also:
-
HttpProxy
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaccept(HttpServerRequest item) Handle an item.addInterceptor(ProxyInterceptor interceptor) Add an interceptor to the interceptor chain.addInterceptor(ProxyInterceptor interceptor, boolean supportsWebSocketUpgrade) Add an interceptor to the interceptor chain.booleanio.vertx.httpproxy.HttpProxyGet the delegate instance.voidhandle(HttpServerRequest request) Handle the outboundHttpServerRequest.inthashCode()static HttpProxynewInstance(io.vertx.httpproxy.HttpProxy delegate) Creates a new instance of theHttpProxy.Set the host name and port number of the origin.origin(io.vertx.core.net.SocketAddress address) Set theSocketAddressof the origin.origin(OriginRequestProvider provider) Set a provider that creates the request to the origin server based onProxyContext.static HttpProxyreverseProxy(io.vertx.httpproxy.ProxyOptions options, HttpClient client) Create a newHttpProxyinstance.static HttpProxyreverseProxy(HttpClient client) Create a newHttpProxyinstance.toString()
-
Field Details
-
__TYPE_ARG
-
-
Constructor Details
-
HttpProxy
public HttpProxy(io.vertx.httpproxy.HttpProxy delegate) Create a new instance ofHttpProxydelegating to the given (non-null) instance ofHttpProxy. -
HttpProxy
-
-
Method Details
-
accept
Handle an item. This method is generated from theoriginalmethod."- Specified by:
acceptin interfaceConsumer<HttpServerRequest>
-
getDelegate
public io.vertx.httpproxy.HttpProxy getDelegate()Get the delegate instance.This method returns the instance on which this shim is delegating the calls. And so, give you access to the bare API.
- Specified by:
getDelegatein interfaceMutinyDelegate- Returns:
- the delegate instance
-
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:
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
Set the host name and port number of the origin.- Parameters:
port- the port number of the origin serverhost- the host name of the origin server- Returns:
- a reference to this, so the API can be used fluently
-
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 interfaceio.vertx.core.Handler<HttpServerRequest>- Parameters:
request- the outboundHttpServerRequest
-
newInstance
Creates a new instance of theHttpProxy. -
hashCode
public int hashCode() -
equals
-
toString
-