Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Unified Diff: third_party/protobuf/java/src/main/java/com/google/protobuf/BlockingService.java

Issue 11347026: Check in protobuf java code and generate lite jar. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Moved target to android conditional Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/protobuf/java/src/main/java/com/google/protobuf/BlockingService.java
diff --git a/third_party/protobuf/src/google/protobuf/compiler/main.cc b/third_party/protobuf/java/src/main/java/com/google/protobuf/BlockingService.java
similarity index 61%
copy from third_party/protobuf/src/google/protobuf/compiler/main.cc
copy to third_party/protobuf/java/src/main/java/com/google/protobuf/BlockingService.java
index d9b0c3f9d45be6bc1929f4e88fc50869b2a97444..ecc80096f550f405f3996b6b4fe12b3efa8f26c9 100644
--- a/third_party/protobuf/src/google/protobuf/compiler/main.cc
+++ b/third_party/protobuf/java/src/main/java/com/google/protobuf/BlockingService.java
@@ -28,34 +28,37 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// Author: kenton@google.com (Kenton Varda)
+package com.google.protobuf;
-#include <google/protobuf/compiler/command_line_interface.h>
-#include <google/protobuf/compiler/cpp/cpp_generator.h>
-#include <google/protobuf/compiler/python/python_generator.h>
-#include <google/protobuf/compiler/java/java_generator.h>
+/**
+ * Blocking equivalent to {@link Service}.
+ *
+ * @author kenton@google.com Kenton Varda
+ * @author cpovirk@google.com Chris Povirk
+ */
+public interface BlockingService {
+ /**
+ * Equivalent to {@link Service#getDescriptorForType}.
+ */
+ Descriptors.ServiceDescriptor getDescriptorForType();
+ /**
+ * Equivalent to {@link Service#callMethod}, except that
+ * {@code callBlockingMethod()} returns the result of the RPC or throws a
+ * {@link ServiceException} if there is a failure, rather than passing the
+ * information to a callback.
+ */
+ Message callBlockingMethod(Descriptors.MethodDescriptor method,
+ RpcController controller,
+ Message request) throws ServiceException;
-int main(int argc, char* argv[]) {
+ /**
+ * Equivalent to {@link Service#getRequestPrototype}.
+ */
+ Message getRequestPrototype(Descriptors.MethodDescriptor method);
- google::protobuf::compiler::CommandLineInterface cli;
- cli.AllowPlugins("protoc-");
-
- // Proto2 C++
- google::protobuf::compiler::cpp::CppGenerator cpp_generator;
- cli.RegisterGenerator("--cpp_out", &cpp_generator,
- "Generate C++ header and source.");
-
- // Proto2 Java
- google::protobuf::compiler::java::JavaGenerator java_generator;
- cli.RegisterGenerator("--java_out", &java_generator,
- "Generate Java source file.");
-
-
- // Proto2 Python
- google::protobuf::compiler::python::Generator py_generator;
- cli.RegisterGenerator("--python_out", &py_generator,
- "Generate Python source file.");
-
- return cli.Run(argc, argv);
+ /**
+ * Equivalent to {@link Service#getResponsePrototype}.
+ */
+ Message getResponsePrototype(Descriptors.MethodDescriptor method);
}

Powered by Google App Engine
This is Rietveld 408576698