Skip to content

Commit

Permalink
Merge branch 'eclipse-vertx:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
hu-chia authored Jun 21, 2024
2 parents a70e463 + 9cca85b commit 39a27c5
Show file tree
Hide file tree
Showing 18 changed files with 31 additions and 38 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
import io.vertx.core.http.HttpMethod;
import io.vertx.core.http.HttpVersion;
import io.vertx.core.http.RequestOptions;
import io.vertx.core.impl.ContextInternal;
import io.vertx.core.impl.VertxInternal;
import io.vertx.core.internal.ContextInternal;
import io.vertx.core.internal.VertxInternal;
import io.vertx.core.net.Address;
import io.vertx.grpc.client.GrpcClient;
import io.vertx.grpc.client.GrpcClientOptions;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
import java.util.concurrent.TimeUnit;

import io.vertx.core.http.HttpConnection;
import io.vertx.core.impl.ContextInternal;
import io.vertx.core.impl.future.PromiseInternal;
import io.vertx.core.internal.ContextInternal;
import io.vertx.core.internal.PromiseInternal;
import io.vertx.grpc.client.GrpcClientRequest;
import io.vertx.grpc.client.GrpcClientResponse;
import io.vertx.grpc.common.CodecException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,13 @@
*/
package io.vertx.grpc.client.impl;

import io.grpc.Context;
import io.netty.handler.codec.http.QueryStringDecoder;
import io.vertx.core.Future;
import io.vertx.core.Handler;
import io.vertx.core.MultiMap;
import io.vertx.core.Promise;
import io.vertx.core.Vertx;
import io.vertx.core.http.HttpClientResponse;

import io.vertx.core.impl.ContextInternal;
import io.vertx.core.internal.ContextInternal;
import io.vertx.grpc.client.GrpcClientResponse;
import io.vertx.grpc.common.CodecException;
import io.vertx.grpc.common.GrpcMessageDecoder;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
import io.grpc.stub.StreamObserver;
import io.vertx.core.http.HttpClientOptions;
import io.vertx.core.http.StreamResetException;
import io.vertx.core.impl.ContextInternal;
import io.vertx.core.internal.ContextInternal;
import io.vertx.core.net.SelfSignedCertificate;
import io.vertx.core.net.SocketAddress;
import io.vertx.core.spi.context.storage.AccessMode;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
import io.vertx.codegen.annotations.GenIgnore;
import io.vertx.codegen.annotations.VertxGen;
import io.vertx.core.buffer.Buffer;
import io.vertx.core.buffer.impl.BufferInternal;
import io.vertx.core.buffer.impl.VertxByteBufAllocator;
import io.vertx.core.internal.buffer.BufferInternal;
import io.vertx.core.internal.buffer.VertxByteBufAllocator;

import java.io.ByteArrayInputStream;
import java.io.IOException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
import io.vertx.codegen.annotations.VertxGen;
import io.vertx.core.VertxException;
import io.vertx.core.buffer.Buffer;
import io.vertx.core.buffer.impl.BufferInternal;
import io.vertx.core.buffer.impl.VertxByteBufAllocator;
import io.vertx.core.internal.buffer.BufferInternal;
import io.vertx.core.internal.buffer.VertxByteBufAllocator;

import java.io.IOException;
import java.io.InputStream;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
package io.vertx.grpc.common.impl;

import io.vertx.core.buffer.Buffer;
import io.vertx.core.buffer.impl.BufferInternal;
import io.vertx.core.internal.buffer.BufferInternal;
import io.vertx.grpc.common.GrpcMessage;

public class GrpcMessageImpl implements GrpcMessage {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,13 @@
*/
package io.vertx.grpc.common.impl;

import io.netty.channel.EventLoop;
import io.vertx.core.Context;
import io.vertx.core.Future;
import io.vertx.core.Handler;
import io.vertx.core.Promise;
import io.vertx.core.buffer.Buffer;
import io.vertx.core.http.StreamResetException;
import io.vertx.core.impl.ContextInternal;
import io.vertx.core.internal.ContextInternal;
import io.vertx.core.streams.ReadStream;
import io.vertx.core.streams.impl.InboundBuffer;
import io.vertx.grpc.common.CodecException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
*/
package io.vertx.grpc.common.impl;

import io.vertx.core.impl.VertxBuilder;
import io.vertx.core.internal.VertxBootstrap;
import io.vertx.core.spi.VertxServiceProvider;
import io.vertx.core.spi.context.storage.ContextLocal;

Expand All @@ -22,6 +22,6 @@ public class GrpcRequestLocalRegistration implements VertxServiceProvider {
static final ContextLocal<GrpcRequestLocal> CONTEXT_LOCAL = ContextLocal.registerLocal(GrpcRequestLocal.class);

@Override
public void init(VertxBuilder builder) {
public void init(VertxBootstrap builder) {
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
package io.vertx.grpc.common.impl;

import io.netty.channel.EventLoop;
import io.vertx.core.impl.ContextInternal;
import io.vertx.core.internal.ContextInternal;

import java.util.List;
import java.util.concurrent.*;
Expand All @@ -21,7 +21,7 @@
*/
public class VertxScheduledExecutorService extends AbstractExecutorService implements ScheduledExecutorService {

private final io.vertx.core.impl.ContextInternal vertxContext;
private final ContextInternal vertxContext;

public VertxScheduledExecutorService(io.vertx.core.Context vertxContext) {
this.vertxContext = (ContextInternal) vertxContext;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import io.grpc.Context;
import io.vertx.core.Vertx;
import io.vertx.core.impl.ContextInternal;
import io.vertx.core.internal.ContextInternal;
import io.vertx.core.spi.context.storage.AccessMode;
import io.vertx.grpc.contextstorage.GrpcStorage;
import io.vertx.grpc.contextstorage.ContextStorageService;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package io.vertx.grpc.contextstorage;

import io.vertx.core.impl.VertxBuilder;
import io.vertx.core.internal.VertxBootstrap;
import io.vertx.core.spi.VertxServiceProvider;
import io.vertx.core.spi.context.storage.ContextLocal;

Expand All @@ -12,6 +12,6 @@ public class ContextStorageService implements VertxServiceProvider {
public static final ContextLocal<GrpcStorage> CONTEXT_LOCAL = ContextLocal.registerLocal(GrpcStorage.class);

@Override
public void init(VertxBuilder builder) {
public void init(VertxBootstrap builder) {
}
}
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
package io.vertx.grpc.contextstorage;

import io.grpc.Context;
import io.vertx.core.impl.ContextInternal;
import io.vertx.core.internal.ContextInternal;

/**
* gRPC context storage.
*/
public class GrpcStorage {

public final io.grpc.Context currentGrpcContext;
public final io.vertx.core.impl.ContextInternal prevVertxContext;
public final io.vertx.core.internal.ContextInternal prevVertxContext;

public GrpcStorage(Context currentGrpcContext, ContextInternal prevVertxContext) {
this.currentGrpcContext = currentGrpcContext;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import io.grpc.stub.StreamObserver;
import io.vertx.core.Vertx;
import io.vertx.core.http.HttpServer;
import io.vertx.core.impl.ContextInternal;
import io.vertx.core.internal.ContextInternal;
import io.vertx.ext.unit.Async;
import io.vertx.ext.unit.TestContext;
import io.vertx.ext.unit.junit.Repeat;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
import io.vertx.core.http.HttpServerRequest;
import io.vertx.core.http.HttpVersion;
import io.vertx.core.http.impl.HttpServerRequestInternal;
import io.vertx.core.impl.ContextInternal;
import io.vertx.core.impl.logging.Logger;
import io.vertx.core.impl.logging.LoggerFactory;
import io.vertx.core.internal.ContextInternal;
import io.vertx.core.internal.logging.Logger;
import io.vertx.core.internal.logging.LoggerFactory;
import io.vertx.core.spi.context.storage.AccessMode;
import io.vertx.grpc.common.GrpcMediaType;
import io.vertx.grpc.common.GrpcMessageDecoder;
Expand Down Expand Up @@ -96,7 +96,7 @@ private <Req, Resp> void handle(HttpServerRequest httpRequest,
GrpcMessageDecoder<Req> messageDecoder,
GrpcMessageEncoder<Resp> messageEncoder,
Handler<GrpcServerRequest<Req, Resp>> handler) {
io.vertx.core.impl.ContextInternal context = (ContextInternal) ((HttpServerRequestInternal) httpRequest).context();
io.vertx.core.internal.ContextInternal context = (ContextInternal) ((HttpServerRequestInternal) httpRequest).context();
GrpcServerRequestImpl<Req, Resp> grpcRequest = new GrpcServerRequestImpl<>(context, options.getScheduleDeadlineAutomatically(),
httpRequest, messageDecoder, messageEncoder, methodCall);
if (options.getDeadlinePropagation() && grpcRequest.timeout() > 0L) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import io.vertx.core.MultiMap;
import io.vertx.core.Timer;
import io.vertx.core.buffer.Buffer;
import io.vertx.core.buffer.impl.BufferInternal;
import io.vertx.core.internal.buffer.BufferInternal;
import io.vertx.core.http.HttpConnection;
import io.vertx.core.http.HttpServerRequest;
import io.vertx.core.http.HttpVersion;
Expand All @@ -27,7 +27,6 @@
import io.vertx.grpc.server.GrpcServerRequest;
import io.vertx.grpc.server.GrpcServerResponse;

import java.time.Instant;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.TimeUnit;
Expand Down Expand Up @@ -79,7 +78,7 @@ private static long parseTimeout(String timeout) {
private BufferInternal grpcWebTextBuffer;
private Timer deadline;

public GrpcServerRequestImpl(io.vertx.core.impl.ContextInternal context,
public GrpcServerRequestImpl(io.vertx.core.internal.ContextInternal context,
boolean scheduleDeadline,
HttpServerRequest httpRequest, GrpcMessageDecoder<Req> messageDecoder,
GrpcMessageEncoder<Resp> messageEncoder, GrpcMethodCall methodCall) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,14 @@
package io.vertx.grpc.server.impl;

import io.netty.handler.codec.base64.Base64;
import io.vertx.core.AsyncResult;
import io.vertx.core.Future;
import io.vertx.core.Handler;
import io.vertx.core.MultiMap;
import io.vertx.core.buffer.Buffer;
import io.vertx.core.buffer.impl.BufferInternal;
import io.vertx.core.internal.buffer.BufferInternal;
import io.vertx.core.http.HttpHeaders;
import io.vertx.core.http.HttpServerResponse;
import io.vertx.core.http.HttpVersion;
import io.vertx.core.impl.ContextInternal;
import io.vertx.core.internal.ContextInternal;
import io.vertx.grpc.common.CodecException;
import io.vertx.grpc.common.GrpcError;
import io.vertx.grpc.common.GrpcMessage;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import io.vertx.core.MultiMap;
import io.vertx.core.Timer;
import io.vertx.core.http.*;
import io.vertx.core.impl.ContextInternal;
import io.vertx.core.internal.ContextInternal;
import io.vertx.core.net.SelfSignedCertificate;
import io.vertx.ext.unit.Async;
import io.vertx.ext.unit.TestContext;
Expand Down

0 comments on commit 39a27c5

Please sign in to comment.