Skip to content

Commit

Permalink
Update to vertx-core inbound message queue changes
Browse files Browse the repository at this point in the history
  • Loading branch information
vietj committed Sep 23, 2024
1 parent b1dbfb1 commit faed069
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ protected GrpcReadStreamBase(Context context,
this.maxMessageSize = maxMessageSize;
this.stream = stream;
this.format = format;
this.queue = new InboundMessageQueue<>(ctx.nettyEventLoop(), ctx, 8, 16) {
this.queue = new InboundMessageQueue<>(ctx.eventLoop(), ctx.executor(), 8, 16) {
@Override
protected void handleResume() {
stream.resume();
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
package io.vertx.grpc.server;

import io.vertx.core.json.JsonObject;
import io.vertx.core.json.JsonArray;
import java.time.Instant;
import java.time.format.DateTimeFormatter;
import java.util.Base64;

/**
* Converter and mapper for {@link io.vertx.grpc.server.GrpcServerOptions}.
* NOTE: This class has been automatically generated from the {@link io.vertx.grpc.server.GrpcServerOptions} original class using Vert.x codegen.
*/
public class GrpcServerOptionsConverter {

private static final Base64.Decoder BASE64_DECODER = Base64.getUrlDecoder();
private static final Base64.Encoder BASE64_ENCODER = Base64.getUrlEncoder().withoutPadding();

static void fromJson(Iterable<java.util.Map.Entry<String, Object>> json, GrpcServerOptions obj) {
for (java.util.Map.Entry<String, Object> member : json) {
switch (member.getKey()) {
case "grpcWebEnabled":
if (member.getValue() instanceof Boolean) {
obj.setGrpcWebEnabled((Boolean)member.getValue());
}
break;
case "scheduleDeadlineAutomatically":
if (member.getValue() instanceof Boolean) {
obj.setScheduleDeadlineAutomatically((Boolean)member.getValue());
}
break;
case "deadlinePropagation":
if (member.getValue() instanceof Boolean) {
obj.setDeadlinePropagation((Boolean)member.getValue());
}
break;
case "maxMessageSize":
if (member.getValue() instanceof Number) {
obj.setMaxMessageSize(((Number)member.getValue()).longValue());
}
break;
}
}
}

static void toJson(GrpcServerOptions obj, JsonObject json) {
toJson(obj, json.getMap());
}

static void toJson(GrpcServerOptions obj, java.util.Map<String, Object> json) {
json.put("grpcWebEnabled", obj.isGrpcWebEnabled());
json.put("scheduleDeadlineAutomatically", obj.getScheduleDeadlineAutomatically());
json.put("deadlinePropagation", obj.getDeadlinePropagation());
json.put("maxMessageSize", obj.getMaxMessageSize());
}
}

0 comments on commit faed069

Please sign in to comment.