Skip to content
Closed
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
30 changes: 15 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ datamodel/IDL/interface you are adapting. An example is provided of a binding to

#### Key Interfaces

[Stream Observer](https://github.com/google/grpc-java/blob/master/stub/src/main/java/com/google/net/stubby/stub/StreamObserver.java)
[Stream Observer](https://github.com/google/grpc-java/blob/master/stub/src/main/java/io/grpc/stub/StreamObserver.java)


## Channel
Expand All @@ -20,17 +20,17 @@ The 'channel' layer is an abstraction over transport handling that is suitable f

#### Common

* [Metadata - headers & trailers](https://github.com/google/grpc-java/blob/master/core/src/main/java/com/google/net/stubby/Metadata.java)
* [Status - error code namespace & handling](https://github.com/google/grpc-java/blob/master/core/src/main/java/com/google/net/stubby/Status.java)
* [Metadata - headers & trailers](https://github.com/google/grpc-java/blob/master/core/src/main/java/io/grpc/Metadata.java)
* [Status - error code namespace & handling](https://github.com/google/grpc-java/blob/master/core/src/main/java/io/grpc/Status.java)

#### Client
* [Channel - client side binding](https://github.com/google/grpc-java/blob/master/core/src/main/java/com/google/net/stubby/Channel.java)
* [Call](https://github.com/google/grpc-java/blob/master/core/src/main/java/com/google/net/stubby/Call.java)
* [Client Interceptor](https://github.com/google/grpc-java/blob/master/core/src/main/java/com/google/net/stubby/ClientInterceptor.java)
* [Channel - client side binding](https://github.com/google/grpc-java/blob/master/core/src/main/java/io/grpc/Channel.java)
* [Call](https://github.com/google/grpc-java/blob/master/core/src/main/java/io/grpc/Call.java)
* [Client Interceptor](https://github.com/google/grpc-java/blob/master/core/src/main/java/io/grpc/ClientInterceptor.java)

#### Server
* [Server call handler - analog to Channel on server](https://github.com/google/grpc-java/blob/master/core/src/main/java/com/google/net/stubby/ServerCallHandler.java)
* [Server Call](https://github.com/google/grpc-java/blob/master/core/src/main/java/com/google/net/stubby/ServerCall.java)
* [Server call handler - analog to Channel on server](https://github.com/google/grpc-java/blob/master/core/src/main/java/io/grpc/ServerCallHandler.java)
* [Server Call](https://github.com/google/grpc-java/blob/master/core/src/main/java/io/grpc/ServerCall.java)


## Transport
Expand All @@ -39,20 +39,20 @@ The 'transport' layer does the heavy lifting of putting & taking bytes off the w

#### Common

* [Stream](https://github.com/google/grpc-java/blob/master/core/src/main/java/com/google/net/stubby/transport/Stream.java)
* [Stream Listener](https://github.com/google/grpc-java/blob/master/core/src/main/java/com/google/net/stubby/transport/StreamListener.java)
* [Stream](https://github.com/google/grpc-java/blob/master/core/src/main/java/io/grpc/transport/Stream.java)
* [Stream Listener](https://github.com/google/grpc-java/blob/master/core/src/main/java/io/grpc/transport/StreamListener.java)

#### Client

* [Client Stream](https://github.com/google/grpc-java/blob/master/core/src/main/java/com/google/net/stubby/transport/ClientStream.java)
* [Client Stream Listener](https://github.com/google/grpc-java/blob/master/core/src/main/java/com/google/net/stubby/transport/ClientStreamListener.java)
* [Client Stream](https://github.com/google/grpc-java/blob/master/core/src/main/java/io/grpc/transport/ClientStream.java)
* [Client Stream Listener](https://github.com/google/grpc-java/blob/master/core/src/main/java/io/grpc/transport/ClientStreamListener.java)

#### Server

* [Server Stream](https://github.com/google/grpc-java/blob/master/core/src/main/java/com/google/net/stubby/transport/ServerStream.java)
* [Server Stream Listener](https://github.com/google/grpc-java/blob/master/core/src/main/java/com/google/net/stubby/transport/ServerStreamListener.java)
* [Server Stream](https://github.com/google/grpc-java/blob/master/core/src/main/java/io/grpc/transport/ServerStream.java)
* [Server Stream Listener](https://github.com/google/grpc-java/blob/master/core/src/main/java/io/grpc/transport/ServerStreamListener.java)


# Examples

Tests showing how these layers are composed to execute calls using protobuf messages can be found here https://github.com/google/grpc-java/tree/master/integration-testing/src/main/java/com/google/net/stubby/testing/integration
Tests showing how these layers are composed to execute calls using protobuf messages can be found here https://github.com/google/grpc-java/tree/master/integration-testing/src/main/java/io/grpc/testing/integration
12 changes: 6 additions & 6 deletions all/build.gradle
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
description = "Stubby: All"
description = "gRPC: All"

// Make sure that no transitive dependencies are included.
configurations.compile.transitive = false

dependencies {
compile project(':stubby-core'),
project(':stubby-stub'),
project(':stubby-auth'),
project(':stubby-netty'),
project(':stubby-okhttp')
compile project(':grpc-core'),
project(':grpc-stub'),
project(':grpc-auth'),
project(':grpc-netty'),
project(':grpc-okhttp')
}

// Create a fat jar containing only the direct dependencies
Expand Down
4 changes: 2 additions & 2 deletions auth/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ plugins {
id "be.insaneprogramming.gradle.animalsniffer" version "1.4.0"
}

description = "Stubby: Auth"
description = "gRpc: Auth"
dependencies {
compile project(':stubby-core'),
compile project(':grpc-core'),
libraries.oauth_client,
libraries.javaee_api
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

package com.google.net.stubby.auth;
package io.grpc.auth;

import com.google.api.client.auth.oauth2.Credential;
import com.google.common.base.Preconditions;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,16 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

package com.google.net.stubby.auth;
package io.grpc.auth;

import com.google.api.client.auth.oauth2.Credential;
import com.google.net.stubby.Call;
import com.google.net.stubby.Channel;
import com.google.net.stubby.ClientInterceptor;
import com.google.net.stubby.ClientInterceptors.ForwardingCall;
import com.google.net.stubby.Metadata;
import com.google.net.stubby.MethodDescriptor;

import io.grpc.Call;
import io.grpc.Channel;
import io.grpc.ClientInterceptor;
import io.grpc.ClientInterceptors.ForwardingCall;
import io.grpc.Metadata;
import io.grpc.MethodDescriptor;

import java.util.concurrent.Executor;

Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ subprojects {
apply plugin: "maven"
apply plugin: "idea"

group = "com.google.net.stubby"
group = "io.grpc"
version = "0.1.0-SNAPSHOT"

sourceCompatibility = 1.6
Expand Down
2 changes: 1 addition & 1 deletion compiler/run_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ GOLDEN_FILE="$TEST_SRC_DIR/TestService.java.txt"
protoc --plugin=protoc-gen-java_rpc=build/binaries/java_pluginExecutable/java_plugin \
--java_rpc_out="$OUTPUT_FILE" --proto_path="$TEST_SRC_DIR" "$INPUT_FILE" && \
unzip -o -d "$TEST_TMP_DIR" "$OUTPUT_FILE" && \
diff "$TEST_TMP_DIR/com/google/net/stubby/testing/integration/TestServiceGrpc.java" \
diff "$TEST_TMP_DIR/io/grpc/testing/integration/TestServiceGrpc.java" \
"$GOLDEN_FILE" && \
echo "PASS"
44 changes: 22 additions & 22 deletions compiler/src/java_generator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -470,11 +470,11 @@ static void PrintBindServiceMethod(const ServiceDescriptor* service,
if (client_streaming) {
(*vars)["calls_method"] = "asyncStreamingRequestCall";
(*vars)["invocation_class"] =
"com.google.net.stubby.stub.ServerCalls.StreamingRequestMethod";
"io.grpc.stub.ServerCalls.StreamingRequestMethod";
} else {
(*vars)["calls_method"] = "asyncUnaryRequestCall";
(*vars)["invocation_class"] =
"com.google.net.stubby.stub.ServerCalls.UnaryRequestMethod";
"io.grpc.stub.ServerCalls.UnaryRequestMethod";
}
p->Print(*vars, ".addMethod(createMethodDefinition(\n");
p->Indent();
Expand Down Expand Up @@ -586,27 +586,27 @@ static void PrintService(const ServiceDescriptor* service,
void PrintImports(Printer* p) {
p->Print(
"import static "
"com.google.net.stubby.stub.Calls.createMethodDescriptor;\n"
"io.grpc.stub.Calls.createMethodDescriptor;\n"
"import static "
"com.google.net.stubby.stub.Calls.asyncUnaryCall;\n"
"io.grpc.stub.Calls.asyncUnaryCall;\n"
"import static "
"com.google.net.stubby.stub.Calls.asyncServerStreamingCall;\n"
"io.grpc.stub.Calls.asyncServerStreamingCall;\n"
"import static "
"com.google.net.stubby.stub.Calls.asyncClientStreamingCall;\n"
"io.grpc.stub.Calls.asyncClientStreamingCall;\n"
"import static "
"com.google.net.stubby.stub.Calls.duplexStreamingCall;\n"
"io.grpc.stub.Calls.duplexStreamingCall;\n"
"import static "
"com.google.net.stubby.stub.Calls.blockingUnaryCall;\n"
"io.grpc.stub.Calls.blockingUnaryCall;\n"
"import static "
"com.google.net.stubby.stub.Calls.blockingServerStreamingCall;\n"
"io.grpc.stub.Calls.blockingServerStreamingCall;\n"
"import static "
"com.google.net.stubby.stub.Calls.unaryFutureCall;\n"
"io.grpc.stub.Calls.unaryFutureCall;\n"
"import static "
"com.google.net.stubby.stub.ServerCalls.createMethodDefinition;\n"
"io.grpc.stub.ServerCalls.createMethodDefinition;\n"
"import static "
"com.google.net.stubby.stub.ServerCalls.asyncUnaryRequestCall;\n"
"io.grpc.stub.ServerCalls.asyncUnaryRequestCall;\n"
"import static "
"com.google.net.stubby.stub.ServerCalls.asyncStreamingRequestCall;\n\n");
"io.grpc.stub.ServerCalls.asyncStreamingRequestCall;\n\n");
}

void GenerateService(const ServiceDescriptor* service,
Expand All @@ -616,18 +616,18 @@ void GenerateService(const ServiceDescriptor* service,
map<string, string> vars;
vars["String"] = "java.lang.String";
vars["Override"] = "java.lang.Override";
vars["Channel"] = "com.google.net.stubby.Channel";
vars["MethodType"] = "com.google.net.stubby.MethodType";
vars["Channel"] = "io.grpc.Channel";
vars["MethodType"] = "io.grpc.MethodType";
vars["ServerServiceDefinition"] =
"com.google.net.stubby.ServerServiceDefinition";
vars["AbstractStub"] = "com.google.net.stubby.stub.AbstractStub";
vars["Method"] = "com.google.net.stubby.stub.Method";
"io.grpc.ServerServiceDefinition";
vars["AbstractStub"] = "io.grpc.stub.AbstractStub";
vars["Method"] = "io.grpc.stub.Method";
vars["AbstractServiceDescriptor"] =
"com.google.net.stubby.stub.AbstractServiceDescriptor";
"io.grpc.stub.AbstractServiceDescriptor";
vars["ImmutableList"] = "com.google.common.collect.ImmutableList";
vars["MethodDescriptor"] = "com.google.net.stubby.MethodDescriptor";
vars["ProtoUtils"] = "com.google.net.stubby.proto.ProtoUtils";
vars["StreamObserver"] = "com.google.net.stubby.stub.StreamObserver";
vars["MethodDescriptor"] = "io.grpc.MethodDescriptor";
vars["ProtoUtils"] = "io.grpc.proto.ProtoUtils";
vars["StreamObserver"] = "io.grpc.stub.StreamObserver";
vars["Iterator"] = "java.util.Iterator";
vars["Map"] = "java.util.Map";
vars["TimeUnit"] = "java.util.concurrent.TimeUnit";
Expand Down
Loading