/JGameSocketServer/src/test/java/com/glu/rpc/test/TestProto.java
http://flex-mmorpg-server.googlecode.com/ · Java · 913 lines · 766 code · 136 blank · 11 comment · 65 complexity · 6781d80e8095ec85963a6cd28f01e8b4 MD5 · raw file
- // Generated by the protocol buffer compiler. DO NOT EDIT!
- package com.glu.rpc.test;
- public final class TestProto {
- private TestProto() {
- }
- public static void registerAllExtensions(
- com.google.protobuf.ExtensionRegistry registry) {
- }
- public static final class User extends com.google.protobuf.GeneratedMessage {
- // Use User.newBuilder() to construct.
- private User() {
- }
- private static final User defaultInstance = new User();
- public static User getDefaultInstance() {
- return defaultInstance;
- }
- public User getDefaultInstanceForType() {
- return defaultInstance;
- }
- public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
- return com.glu.rpc.test.TestProto.internal_static_protobuf_rpc_User_descriptor;
- }
- protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() {
- return com.glu.rpc.test.TestProto.internal_static_protobuf_rpc_User_fieldAccessorTable;
- }
- // optional string userName = 1;
- public static final int USERNAME_FIELD_NUMBER = 1;
- private boolean hasUserName;
- private java.lang.String userName_ = "";
- public boolean hasUserName() {
- return hasUserName;
- }
- public java.lang.String getUserName() {
- return userName_;
- }
- public final boolean isInitialized() {
- return true;
- }
- public void writeTo(com.google.protobuf.CodedOutputStream output)
- throws java.io.IOException {
- if (hasUserName()) {
- output.writeString(1, getUserName());
- }
- getUnknownFields().writeTo(output);
- }
- private int memoizedSerializedSize = -1;
- public int getSerializedSize() {
- int size = memoizedSerializedSize;
- if (size != -1)
- return size;
- size = 0;
- if (hasUserName()) {
- size += com.google.protobuf.CodedOutputStream
- .computeStringSize(1, getUserName());
- }
- size += getUnknownFields().getSerializedSize();
- memoizedSerializedSize = size;
- return size;
- }
- public static com.glu.rpc.test.TestProto.User parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return newBuilder().mergeFrom(data).buildParsed();
- }
- public static com.glu.rpc.test.TestProto.User parseFrom(
- com.google.protobuf.ByteString data,
- com.google.protobuf.ExtensionRegistry extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return newBuilder().mergeFrom(data, extensionRegistry)
- .buildParsed();
- }
- public static com.glu.rpc.test.TestProto.User parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return newBuilder().mergeFrom(data).buildParsed();
- }
- public static com.glu.rpc.test.TestProto.User parseFrom(byte[] data,
- com.google.protobuf.ExtensionRegistry extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return newBuilder().mergeFrom(data, extensionRegistry)
- .buildParsed();
- }
- public static com.glu.rpc.test.TestProto.User parseFrom(
- java.io.InputStream input) throws java.io.IOException {
- return newBuilder().mergeFrom(input).buildParsed();
- }
- public static com.glu.rpc.test.TestProto.User parseFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistry extensionRegistry)
- throws java.io.IOException {
- return newBuilder().mergeFrom(input, extensionRegistry)
- .buildParsed();
- }
- public static com.glu.rpc.test.TestProto.User parseDelimitedFrom(
- java.io.InputStream input) throws java.io.IOException {
- return newBuilder().mergeDelimitedFrom(input).buildParsed();
- }
- public static com.glu.rpc.test.TestProto.User parseDelimitedFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistry extensionRegistry)
- throws java.io.IOException {
- return newBuilder().mergeDelimitedFrom(input, extensionRegistry)
- .buildParsed();
- }
- public static com.glu.rpc.test.TestProto.User parseFrom(
- com.google.protobuf.CodedInputStream input)
- throws java.io.IOException {
- return newBuilder().mergeFrom(input).buildParsed();
- }
- public static com.glu.rpc.test.TestProto.User parseFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistry extensionRegistry)
- throws java.io.IOException {
- return newBuilder().mergeFrom(input, extensionRegistry)
- .buildParsed();
- }
- public static Builder newBuilder() {
- return Builder.create();
- }
- public Builder newBuilderForType() {
- return newBuilder();
- }
- public static Builder newBuilder(
- com.glu.rpc.test.TestProto.User prototype) {
- return newBuilder().mergeFrom(prototype);
- }
- public Builder toBuilder() {
- return newBuilder(this);
- }
- public static final class Builder extends
- com.google.protobuf.GeneratedMessage.Builder<Builder> {
- private com.glu.rpc.test.TestProto.User result;
- // Construct using com.glu.rpc.test.TestProto.User.newBuilder()
- private Builder() {
- }
- private static Builder create() {
- Builder builder = new Builder();
- builder.result = new com.glu.rpc.test.TestProto.User();
- return builder;
- }
- protected com.glu.rpc.test.TestProto.User internalGetResult() {
- return result;
- }
- public Builder clear() {
- if (result == null) {
- throw new IllegalStateException(
- "Cannot call clear() after build().");
- }
- result = new com.glu.rpc.test.TestProto.User();
- return this;
- }
- public Builder clone() {
- return create().mergeFrom(result);
- }
- public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
- return com.glu.rpc.test.TestProto.User.getDescriptor();
- }
- public com.glu.rpc.test.TestProto.User getDefaultInstanceForType() {
- return com.glu.rpc.test.TestProto.User.getDefaultInstance();
- }
- public boolean isInitialized() {
- return result.isInitialized();
- }
- public com.glu.rpc.test.TestProto.User build() {
- if (result != null && !isInitialized()) {
- throw new com.google.protobuf.UninitializedMessageException(
- result);
- }
- return buildPartial();
- }
- private com.glu.rpc.test.TestProto.User buildParsed()
- throws com.google.protobuf.InvalidProtocolBufferException {
- if (!isInitialized()) {
- throw new com.google.protobuf.UninitializedMessageException(
- result).asInvalidProtocolBufferException();
- }
- return buildPartial();
- }
- public com.glu.rpc.test.TestProto.User buildPartial() {
- if (result == null) {
- throw new IllegalStateException(
- "build() has already been called on this Builder.");
- }
- com.glu.rpc.test.TestProto.User returnMe = result;
- result = null;
- return returnMe;
- }
- public Builder mergeFrom(com.google.protobuf.Message other) {
- if (other instanceof com.glu.rpc.test.TestProto.User) {
- return mergeFrom((com.glu.rpc.test.TestProto.User) other);
- } else {
- super.mergeFrom(other);
- return this;
- }
- }
- public Builder mergeFrom(com.glu.rpc.test.TestProto.User other) {
- if (other == com.glu.rpc.test.TestProto.User
- .getDefaultInstance())
- return this;
- if (other.hasUserName()) {
- setUserName(other.getUserName());
- }
- this.mergeUnknownFields(other.getUnknownFields());
- return this;
- }
- public Builder mergeFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistry extensionRegistry)
- throws java.io.IOException {
- com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet
- .newBuilder(this.getUnknownFields());
- while (true) {
- int tag = input.readTag();
- switch (tag) {
- case 0:
- this.setUnknownFields(unknownFields.build());
- return this;
- default: {
- if (!parseUnknownField(input, unknownFields,
- extensionRegistry, tag)) {
- this.setUnknownFields(unknownFields.build());
- return this;
- }
- break;
- }
- case 10: {
- setUserName(input.readString());
- break;
- }
- }
- }
- }
- // optional string userName = 1;
- public boolean hasUserName() {
- return result.hasUserName();
- }
- public java.lang.String getUserName() {
- return result.getUserName();
- }
- public Builder setUserName(java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
- result.hasUserName = true;
- result.userName_ = value;
- return this;
- }
- public Builder clearUserName() {
- result.hasUserName = false;
- result.userName_ = getDefaultInstance().getUserName();
- return this;
- }
- }
- static {
- com.glu.rpc.test.TestProto.getDescriptor();
- }
- }
- public static final class Result extends
- com.google.protobuf.GeneratedMessage {
- // Use Result.newBuilder() to construct.
- private Result() {
- }
- private static final Result defaultInstance = new Result();
- public static Result getDefaultInstance() {
- return defaultInstance;
- }
- public Result getDefaultInstanceForType() {
- return defaultInstance;
- }
- public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
- return com.glu.rpc.test.TestProto.internal_static_protobuf_rpc_Result_descriptor;
- }
- protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() {
- return com.glu.rpc.test.TestProto.internal_static_protobuf_rpc_Result_fieldAccessorTable;
- }
- // optional string result = 1;
- public static final int RESULT_FIELD_NUMBER = 1;
- private boolean hasResult;
- private java.lang.String result_ = "";
- public boolean hasResult() {
- return hasResult;
- }
- public java.lang.String getResult() {
- return result_;
- }
- // optional bool success = 2;
- public static final int SUCCESS_FIELD_NUMBER = 2;
- private boolean hasSuccess;
- private boolean success_ = false;
- public boolean hasSuccess() {
- return hasSuccess;
- }
- public boolean getSuccess() {
- return success_;
- }
- public final boolean isInitialized() {
- return true;
- }
- public void writeTo(com.google.protobuf.CodedOutputStream output)
- throws java.io.IOException {
- if (hasResult()) {
- output.writeString(1, getResult());
- }
- if (hasSuccess()) {
- output.writeBool(2, getSuccess());
- }
- getUnknownFields().writeTo(output);
- }
- private int memoizedSerializedSize = -1;
- public int getSerializedSize() {
- int size = memoizedSerializedSize;
- if (size != -1)
- return size;
- size = 0;
- if (hasResult()) {
- size += com.google.protobuf.CodedOutputStream
- .computeStringSize(1, getResult());
- }
- if (hasSuccess()) {
- size += com.google.protobuf.CodedOutputStream.computeBoolSize(
- 2, getSuccess());
- }
- size += getUnknownFields().getSerializedSize();
- memoizedSerializedSize = size;
- return size;
- }
- public static com.glu.rpc.test.TestProto.Result parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return newBuilder().mergeFrom(data).buildParsed();
- }
- public static com.glu.rpc.test.TestProto.Result parseFrom(
- com.google.protobuf.ByteString data,
- com.google.protobuf.ExtensionRegistry extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return newBuilder().mergeFrom(data, extensionRegistry)
- .buildParsed();
- }
- public static com.glu.rpc.test.TestProto.Result parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return newBuilder().mergeFrom(data).buildParsed();
- }
- public static com.glu.rpc.test.TestProto.Result parseFrom(byte[] data,
- com.google.protobuf.ExtensionRegistry extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return newBuilder().mergeFrom(data, extensionRegistry)
- .buildParsed();
- }
- public static com.glu.rpc.test.TestProto.Result parseFrom(
- java.io.InputStream input) throws java.io.IOException {
- return newBuilder().mergeFrom(input).buildParsed();
- }
- public static com.glu.rpc.test.TestProto.Result parseFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistry extensionRegistry)
- throws java.io.IOException {
- return newBuilder().mergeFrom(input, extensionRegistry)
- .buildParsed();
- }
- public static com.glu.rpc.test.TestProto.Result parseDelimitedFrom(
- java.io.InputStream input) throws java.io.IOException {
- return newBuilder().mergeDelimitedFrom(input).buildParsed();
- }
- public static com.glu.rpc.test.TestProto.Result parseDelimitedFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistry extensionRegistry)
- throws java.io.IOException {
- return newBuilder().mergeDelimitedFrom(input, extensionRegistry)
- .buildParsed();
- }
- public static com.glu.rpc.test.TestProto.Result parseFrom(
- com.google.protobuf.CodedInputStream input)
- throws java.io.IOException {
- return newBuilder().mergeFrom(input).buildParsed();
- }
- public static com.glu.rpc.test.TestProto.Result parseFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistry extensionRegistry)
- throws java.io.IOException {
- return newBuilder().mergeFrom(input, extensionRegistry)
- .buildParsed();
- }
- public static Builder newBuilder() {
- return Builder.create();
- }
- public Builder newBuilderForType() {
- return newBuilder();
- }
- public static Builder newBuilder(
- com.glu.rpc.test.TestProto.Result prototype) {
- return newBuilder().mergeFrom(prototype);
- }
- public Builder toBuilder() {
- return newBuilder(this);
- }
- public static final class Builder extends
- com.google.protobuf.GeneratedMessage.Builder<Builder> {
- private com.glu.rpc.test.TestProto.Result result;
- // Construct using com.glu.rpc.test.TestProto.Result.newBuilder()
- private Builder() {
- }
- private static Builder create() {
- Builder builder = new Builder();
- builder.result = new com.glu.rpc.test.TestProto.Result();
- return builder;
- }
- protected com.glu.rpc.test.TestProto.Result internalGetResult() {
- return result;
- }
- public Builder clear() {
- if (result == null) {
- throw new IllegalStateException(
- "Cannot call clear() after build().");
- }
- result = new com.glu.rpc.test.TestProto.Result();
- return this;
- }
- public Builder clone() {
- return create().mergeFrom(result);
- }
- public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
- return com.glu.rpc.test.TestProto.Result.getDescriptor();
- }
- public com.glu.rpc.test.TestProto.Result getDefaultInstanceForType() {
- return com.glu.rpc.test.TestProto.Result.getDefaultInstance();
- }
- public boolean isInitialized() {
- return result.isInitialized();
- }
- public com.glu.rpc.test.TestProto.Result build() {
- if (result != null && !isInitialized()) {
- throw new com.google.protobuf.UninitializedMessageException(
- result);
- }
- return buildPartial();
- }
- private com.glu.rpc.test.TestProto.Result buildParsed()
- throws com.google.protobuf.InvalidProtocolBufferException {
- if (!isInitialized()) {
- throw new com.google.protobuf.UninitializedMessageException(
- result).asInvalidProtocolBufferException();
- }
- return buildPartial();
- }
- public com.glu.rpc.test.TestProto.Result buildPartial() {
- if (result == null) {
- throw new IllegalStateException(
- "build() has already been called on this Builder.");
- }
- com.glu.rpc.test.TestProto.Result returnMe = result;
- result = null;
- return returnMe;
- }
- public Builder mergeFrom(com.google.protobuf.Message other) {
- if (other instanceof com.glu.rpc.test.TestProto.Result) {
- return mergeFrom((com.glu.rpc.test.TestProto.Result) other);
- } else {
- super.mergeFrom(other);
- return this;
- }
- }
- public Builder mergeFrom(com.glu.rpc.test.TestProto.Result other) {
- if (other == com.glu.rpc.test.TestProto.Result
- .getDefaultInstance())
- return this;
- if (other.hasResult()) {
- setResult(other.getResult());
- }
- if (other.hasSuccess()) {
- setSuccess(other.getSuccess());
- }
- this.mergeUnknownFields(other.getUnknownFields());
- return this;
- }
- public Builder mergeFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistry extensionRegistry)
- throws java.io.IOException {
- com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet
- .newBuilder(this.getUnknownFields());
- while (true) {
- int tag = input.readTag();
- switch (tag) {
- case 0:
- this.setUnknownFields(unknownFields.build());
- return this;
- default: {
- if (!parseUnknownField(input, unknownFields,
- extensionRegistry, tag)) {
- this.setUnknownFields(unknownFields.build());
- return this;
- }
- break;
- }
- case 10: {
- setResult(input.readString());
- break;
- }
- case 16: {
- setSuccess(input.readBool());
- break;
- }
- }
- }
- }
- // optional string result = 1;
- public boolean hasResult() {
- return result.hasResult();
- }
- public java.lang.String getResult() {
- return result.getResult();
- }
- public Builder setResult(java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
- result.hasResult = true;
- result.result_ = value;
- return this;
- }
- public Builder clearResult() {
- result.hasResult = false;
- result.result_ = getDefaultInstance().getResult();
- return this;
- }
- // optional bool success = 2;
- public boolean hasSuccess() {
- return result.hasSuccess();
- }
- public boolean getSuccess() {
- return result.getSuccess();
- }
- public Builder setSuccess(boolean value) {
- result.hasSuccess = true;
- result.success_ = value;
- return this;
- }
- public Builder clearSuccess() {
- result.hasSuccess = false;
- result.success_ = false;
- return this;
- }
- }
- static {
- com.glu.rpc.test.TestProto.getDescriptor();
- }
- }
- public static abstract class TestService implements
- com.google.protobuf.Service {
- protected TestService() {
- }
- public interface Interface {
- public abstract void testMethod(
- com.google.protobuf.RpcController controller,
- com.glu.rpc.test.TestProto.User request,
- com.google.protobuf.RpcCallback<com.glu.rpc.test.TestProto.Result> done);
- }
- public static com.google.protobuf.Service newReflectiveService(
- final Interface impl) {
- return new TestService() {
- @Override
- public void testMethod(
- com.google.protobuf.RpcController controller,
- com.glu.rpc.test.TestProto.User request,
- com.google.protobuf.RpcCallback<com.glu.rpc.test.TestProto.Result> done) {
- impl.testMethod(controller, request, done);
- }
- };
- }
- public static com.google.protobuf.BlockingService newReflectiveBlockingService(
- final BlockingInterface impl) {
- return new com.google.protobuf.BlockingService() {
- public final com.google.protobuf.Descriptors.ServiceDescriptor getDescriptorForType() {
- return getDescriptor();
- }
- public final com.google.protobuf.Message callBlockingMethod(
- com.google.protobuf.Descriptors.MethodDescriptor method,
- com.google.protobuf.RpcController controller,
- com.google.protobuf.Message request)
- throws com.google.protobuf.ServiceException {
- if (method.getService() != getDescriptor()) {
- throw new java.lang.IllegalArgumentException(
- "Service.callBlockingMethod() given method descriptor for "
- + "wrong service type.");
- }
- switch (method.getIndex()) {
- case 0:
- return impl.testMethod(controller,
- (com.glu.rpc.test.TestProto.User) request);
- default:
- throw new java.lang.AssertionError("Can't get here.");
- }
- }
- public final com.google.protobuf.Message getRequestPrototype(
- com.google.protobuf.Descriptors.MethodDescriptor method) {
- if (method.getService() != getDescriptor()) {
- throw new java.lang.IllegalArgumentException(
- "Service.getRequestPrototype() given method "
- + "descriptor for wrong service type.");
- }
- switch (method.getIndex()) {
- case 0:
- return com.glu.rpc.test.TestProto.User
- .getDefaultInstance();
- default:
- throw new java.lang.AssertionError("Can't get here.");
- }
- }
- public final com.google.protobuf.Message getResponsePrototype(
- com.google.protobuf.Descriptors.MethodDescriptor method) {
- if (method.getService() != getDescriptor()) {
- throw new java.lang.IllegalArgumentException(
- "Service.getResponsePrototype() given method "
- + "descriptor for wrong service type.");
- }
- switch (method.getIndex()) {
- case 0:
- return com.glu.rpc.test.TestProto.Result
- .getDefaultInstance();
- default:
- throw new java.lang.AssertionError("Can't get here.");
- }
- }
- };
- }
- public abstract void testMethod(
- com.google.protobuf.RpcController controller,
- com.glu.rpc.test.TestProto.User request,
- com.google.protobuf.RpcCallback<com.glu.rpc.test.TestProto.Result> done);
- public static final com.google.protobuf.Descriptors.ServiceDescriptor getDescriptor() {
- return com.glu.rpc.test.TestProto.getDescriptor().getServices()
- .get(0);
- }
- public final com.google.protobuf.Descriptors.ServiceDescriptor getDescriptorForType() {
- return getDescriptor();
- }
- public final void callMethod(
- com.google.protobuf.Descriptors.MethodDescriptor method,
- com.google.protobuf.RpcController controller,
- com.google.protobuf.Message request,
- com.google.protobuf.RpcCallback<com.google.protobuf.Message> done) {
- if (method.getService() != getDescriptor()) {
- throw new java.lang.IllegalArgumentException(
- "Service.callMethod() given method descriptor for wrong "
- + "service type.");
- }
- switch (method.getIndex()) {
- case 0:
- this.testMethod(controller, (com.glu.rpc.test.TestProto.User) request,
- com.google.protobuf.RpcUtil.<com.glu.rpc.test.TestProto.Result> specializeCallback(done));
- return;
- default:
- throw new java.lang.AssertionError("Can't get here.");
- }
- }
- public final com.google.protobuf.Message getRequestPrototype(
- com.google.protobuf.Descriptors.MethodDescriptor method) {
- if (method.getService() != getDescriptor()) {
- throw new java.lang.IllegalArgumentException(
- "Service.getRequestPrototype() given method "
- + "descriptor for wrong service type.");
- }
- switch (method.getIndex()) {
- case 0:
- return com.glu.rpc.test.TestProto.User.getDefaultInstance();
- default:
- throw new java.lang.AssertionError("Can't get here.");
- }
- }
- public final com.google.protobuf.Message getResponsePrototype(
- com.google.protobuf.Descriptors.MethodDescriptor method) {
- if (method.getService() != getDescriptor()) {
- throw new java.lang.IllegalArgumentException(
- "Service.getResponsePrototype() given method "
- + "descriptor for wrong service type.");
- }
- switch (method.getIndex()) {
- case 0:
- return com.glu.rpc.test.TestProto.Result.getDefaultInstance();
- default:
- throw new java.lang.AssertionError("Can't get here.");
- }
- }
- public static Stub newStub(com.google.protobuf.RpcChannel channel) {
- return new Stub(channel);
- }
- public static final class Stub extends
- com.glu.rpc.test.TestProto.TestService implements Interface {
- private Stub(com.google.protobuf.RpcChannel channel) {
- this.channel = channel;
- }
- private final com.google.protobuf.RpcChannel channel;
- public com.google.protobuf.RpcChannel getChannel() {
- return channel;
- }
- public void testMethod(
- com.google.protobuf.RpcController controller,
- com.glu.rpc.test.TestProto.User request,
- com.google.protobuf.RpcCallback<com.glu.rpc.test.TestProto.Result> done) {
- channel.callMethod(getDescriptor().getMethods().get(0),
- controller, request, com.glu.rpc.test.TestProto.Result
- .getDefaultInstance(),
- com.google.protobuf.RpcUtil.generalizeCallback(done,
- com.glu.rpc.test.TestProto.Result.class,
- com.glu.rpc.test.TestProto.Result
- .getDefaultInstance()));
- }
- }
- public static BlockingInterface newBlockingStub(
- com.google.protobuf.BlockingRpcChannel channel) {
- return new BlockingStub(channel);
- }
- public interface BlockingInterface {
- public com.glu.rpc.test.TestProto.Result testMethod(
- com.google.protobuf.RpcController controller,
- com.glu.rpc.test.TestProto.User request)
- throws com.google.protobuf.ServiceException;
- }
- private static final class BlockingStub implements BlockingInterface {
- private BlockingStub(com.google.protobuf.BlockingRpcChannel channel) {
- this.channel = channel;
- }
- private final com.google.protobuf.BlockingRpcChannel channel;
- public com.glu.rpc.test.TestProto.Result testMethod(
- com.google.protobuf.RpcController controller,
- com.glu.rpc.test.TestProto.User request)
- throws com.google.protobuf.ServiceException {
- return (com.glu.rpc.test.TestProto.Result) channel
- .callBlockingMethod(
- getDescriptor().getMethods().get(0),
- controller, request,
- com.glu.rpc.test.TestProto.Result
- .getDefaultInstance());
- }
- }
- }
- private static com.google.protobuf.Descriptors.Descriptor internal_static_protobuf_rpc_User_descriptor;
- private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_protobuf_rpc_User_fieldAccessorTable;
- private static com.google.protobuf.Descriptors.Descriptor internal_static_protobuf_rpc_Result_descriptor;
- private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_protobuf_rpc_Result_fieldAccessorTable;
- public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
- return descriptor;
- }
- private static com.google.protobuf.Descriptors.FileDescriptor descriptor;
- static {
- String descriptorData = "\n\ntest.proto\022\014protobuf.rpc\"\030\n\004User\022\020\n\010us"
- + "erName\030\001 \001(\t\")\n\006Result\022\016\n\006result\030\001 \001(\t\022\017"
- + "\n\007success\030\002 \001(\0102E\n\013TestService\0226\n\nTestMe"
- + "thod\022\022.protobuf.rpc.User\032\024.protobuf.rpc."
- + "ResultB\035\n\020com.glu.rpc.testB\tTestProto";
- com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() {
- public com.google.protobuf.ExtensionRegistry assignDescriptors(
- com.google.protobuf.Descriptors.FileDescriptor root) {
- descriptor = root;
- internal_static_protobuf_rpc_User_descriptor = getDescriptor()
- .getMessageTypes().get(0);
- internal_static_protobuf_rpc_User_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable(
- internal_static_protobuf_rpc_User_descriptor,
- new java.lang.String[] { "UserName", },
- com.glu.rpc.test.TestProto.User.class,
- com.glu.rpc.test.TestProto.User.Builder.class);
- internal_static_protobuf_rpc_Result_descriptor = getDescriptor()
- .getMessageTypes().get(1);
- internal_static_protobuf_rpc_Result_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable(
- internal_static_protobuf_rpc_Result_descriptor,
- new java.lang.String[] { "Result", "Success", },
- com.glu.rpc.test.TestProto.Result.class,
- com.glu.rpc.test.TestProto.Result.Builder.class);
- return null;
- }
- };
- com.google.protobuf.Descriptors.FileDescriptor
- .internalBuildGeneratedFileFrom(
- descriptorData,
- new com.google.protobuf.Descriptors.FileDescriptor[] {},
- assigner);
- }
- }