Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to 1.6.1 #10

Merged
merged 1 commit into from
Sep 21, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 5 additions & 8 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,7 @@

<properties>
<stack.version>3.5.0-SNAPSHOT</stack.version>
<grpc.version>1.3.0</grpc.version>
<!-- CURRENT_GRPC_VERSION -->
<vertx.grpc.version>1.3.0</vertx.grpc.version>
<!-- CURRENT_GRPC_VERSION -->
<vertx.grpc.version>1.6.1</vertx.grpc.version>
<jetty.alpnAgent.version>2.0.6</jetty.alpnAgent.version>
<jetty.alpnAgent.path>${settings.localRepository}/org/mortbay/jetty/alpn/jetty-alpn-agent/${jetty.alpnAgent.version}/jetty-alpn-agent-${jetty.alpnAgent.version}.jar</jetty.alpnAgent.path>
</properties>
Expand Down Expand Up @@ -70,17 +67,17 @@
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-netty</artifactId>
<version>${grpc.version}</version>
<version>${vertx.grpc.version}</version>
</dependency>
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-protobuf</artifactId>
<version>${grpc.version}</version>
<version>${vertx.grpc.version}</version>
</dependency>
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-stub</artifactId>
<version>${grpc.version}</version>
<version>${vertx.grpc.version}</version>
</dependency>

<dependency>
Expand Down Expand Up @@ -166,7 +163,7 @@
protobuf-java directly, you will be transitively depending on the
protobuf-java version that grpc depends on.
-->
<protocArtifact>com.google.protobuf:protoc:3.2.0:exe:${os.detected.classifier}</protocArtifact>
<protocArtifact>com.google.protobuf:protoc:3.3.0:exe:${os.detected.classifier}</protocArtifact>
<pluginId>grpc-java</pluginId>
<pluginArtifact>io.vertx:protoc-gen-grpc-java:${vertx.grpc.version}:exe:${os.detected.classifier}</pluginArtifact>
</configuration>
Expand Down
4 changes: 2 additions & 2 deletions src/main/asciidoc/java/index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ If you're using Apache Maven you need to add the plugin:
<configuration>
<protocArtifact>com.google.protobuf:protoc:3.2.0:exe:${os.detected.classifier}</protocArtifact>
<pluginId>grpc-java</pluginId>
<pluginArtifact>io.vertx:protoc-gen-grpc-java:1.3.0:${os.detected.classifier}</pluginArtifact>
<pluginArtifact>io.vertx:protoc-gen-grpc-java:1.6.1:${os.detected.classifier}</pluginArtifact>
</configuration>
<executions>
<execution>
Expand Down Expand Up @@ -149,7 +149,7 @@ protobuf {
}
plugins {
grpc {
artifact = "io.vertx:protoc-gen-grpc-java:1.3.0"
artifact = "io.vertx:protoc-gen-grpc-java:1.6.1"
}
}
generateProtoTasks {
Expand Down
19 changes: 11 additions & 8 deletions src/main/java/examples/GreeterGrpc.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
* </pre>
*/
@javax.annotation.Generated(
value = "by gRPC proto compiler (version 1.3.0)",
value = "by gRPC proto compiler (version 1.6.1)",
comments = "Source: helloworld.proto")
public final class GreeterGrpc {

Expand Down Expand Up @@ -62,12 +62,15 @@ public void onCompleted() {
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
public static final io.grpc.MethodDescriptor<examples.HelloRequest,
examples.HelloReply> METHOD_SAY_HELLO =
io.grpc.MethodDescriptor.create(
io.grpc.MethodDescriptor.MethodType.UNARY,
generateFullMethodName(
"helloworld.Greeter", "SayHello"),
io.grpc.protobuf.ProtoUtils.marshaller(examples.HelloRequest.getDefaultInstance()),
io.grpc.protobuf.ProtoUtils.marshaller(examples.HelloReply.getDefaultInstance()));
io.grpc.MethodDescriptor.<examples.HelloRequest, examples.HelloReply>newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(
"helloworld.Greeter", "SayHello"))
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
examples.HelloRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
examples.HelloReply.getDefaultInstance()))
.build();

/**
* Creates a new async stub that supports all call types for the service
Expand All @@ -85,7 +88,7 @@ public static GreeterBlockingStub newBlockingStub(
}

/**
* Creates a new ListenableFuture-style stub that supports unary and streaming output calls on the service
* Creates a new ListenableFuture-style stub that supports unary calls on the service
*/
public static GreeterFutureStub newFutureStub(
io.grpc.Channel channel) {
Expand Down
11 changes: 11 additions & 0 deletions src/main/java/examples/HelloReply.java

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions src/main/java/examples/HelloRequest.java

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions src/main/java/io/vertx/grpc/VertxServer.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package io.vertx.grpc;

import io.grpc.Server;
import io.grpc.internal.ServerImpl;
import io.grpc.netty.NettyServerBuilder;
import io.netty.handler.ssl.SslContext;
import io.vertx.core.AsyncResult;
Expand Down Expand Up @@ -41,7 +40,7 @@ private static class ActualServer {
final AtomicInteger count = new AtomicInteger();
final VertxEventLoopGroup group = new VertxEventLoopGroup();
final HandlerManager<String> manager = new HandlerManager<>(group);
final ServerImpl server;
final Server server;
final ThreadLocal<List<ContextImpl>> contextLocal = new ThreadLocal<>();

private ActualServer(Vertx vertx, ServerID id, HttpServerOptions options, NettyServerBuilder builder) {
Expand Down