Package io.quarkiverse.proxywasm.runtime
Class VertxServerAdaptor
java.lang.Object
io.quarkiverse.proxywasm.runtime.VertxServerAdaptor
- All Implemented Interfaces:
io.roastedroot.proxywasm.internal.ServerAdaptor
@Alternative
@Priority(200)
@ApplicationScoped
public class VertxServerAdaptor
extends Object
implements io.roastedroot.proxywasm.internal.ServerAdaptor
Vert.x specific implementation of
ServerAdaptor
.
Provides Vert.x based implementations for scheduling tasks, adapting HTTP requests,
and making outbound HTTP and gRPC calls.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Closes the Vert.x HTTP client.io.roastedroot.proxywasm.internal.HttpRequestAdaptor
httpRequestAdaptor
(Object context) scheduleGrpcCall
(String host, int port, boolean plainText, String serviceName, String methodName, io.roastedroot.proxywasm.internal.ProxyMap headers, byte[] message, int timeoutMillis, io.roastedroot.proxywasm.internal.GrpcCallResponseHandler handler) scheduleHttpCall
(String method, String host, int port, URI uri, io.roastedroot.proxywasm.internal.ProxyMap headers, byte[] body, io.roastedroot.proxywasm.internal.ProxyMap trailers, int timeout, io.roastedroot.proxywasm.internal.HttpCallResponseHandler handler) scheduleTick
(long delay, Runnable task) void
setup()
Initializes the Vert.x HTTP client.
-
Constructor Details
-
VertxServerAdaptor
public VertxServerAdaptor()Default constructor.
-
-
Method Details
-
setup
@PostConstruct public void setup()Initializes the Vert.x HTTP client. This method is called by the CDI container after dependency injection. -
close
@PreDestroy public void close()Closes the Vert.x HTTP client. This method is called by the CDI container before the bean is destroyed. -
scheduleTick
- Specified by:
scheduleTick
in interfaceio.roastedroot.proxywasm.internal.ServerAdaptor
-
httpRequestAdaptor
- Specified by:
httpRequestAdaptor
in interfaceio.roastedroot.proxywasm.internal.ServerAdaptor
-
scheduleHttpCall
public Runnable scheduleHttpCall(String method, String host, int port, URI uri, io.roastedroot.proxywasm.internal.ProxyMap headers, byte[] body, io.roastedroot.proxywasm.internal.ProxyMap trailers, int timeout, io.roastedroot.proxywasm.internal.HttpCallResponseHandler handler) throws InterruptedException - Specified by:
scheduleHttpCall
in interfaceio.roastedroot.proxywasm.internal.ServerAdaptor
- Throws:
InterruptedException
-
scheduleGrpcCall
public Runnable scheduleGrpcCall(String host, int port, boolean plainText, String serviceName, String methodName, io.roastedroot.proxywasm.internal.ProxyMap headers, byte[] message, int timeoutMillis, io.roastedroot.proxywasm.internal.GrpcCallResponseHandler handler) throws InterruptedException - Specified by:
scheduleGrpcCall
in interfaceio.roastedroot.proxywasm.internal.ServerAdaptor
- Throws:
InterruptedException
-