// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: ca/evanjones/protorpc/Counter.proto
package ca.evanjones.protorpc;
public final class Counter {
private Counter() {}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistry registry) {
}
public static final class Value extends
com.google.protobuf.GeneratedMessage {
// Use Value.newBuilder() to construct.
private Value() {
initFields();
}
private Value(boolean noInit) {}
private static final Value defaultInstance;
public static Value getDefaultInstance() {
return defaultInstance;
}
public Value getDefaultInstanceForType() {
return defaultInstance;
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return ca.evanjones.protorpc.Counter.internal_static_protorpc_Value_descriptor;
}
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return ca.evanjones.protorpc.Counter.internal_static_protorpc_Value_fieldAccessorTable;
}
// required int32 value = 1;
public static final int VALUE_FIELD_NUMBER = 1;
private boolean hasValue;
private int value_ = 0;
public boolean hasValue() { return hasValue; }
public int getValue() { return value_; }
// optional string name = 2;
public static final int NAME_FIELD_NUMBER = 2;
private boolean hasName;
private java.lang.String name_ = "";
public boolean hasName() { return hasName; }
public java.lang.String getName() { return name_; }
private void initFields() {
}
public final boolean isInitialized() {
if (!hasValue) return false;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
getSerializedSize();
if (hasValue()) {
output.writeInt32(1, getValue());
}
if (hasName()) {
output.writeString(2, getName());
}
getUnknownFields().writeTo(output);
}
private int memoizedSerializedSize = -1;
public int getSerializedSize() {
int size = memoizedSerializedSize;
if (size != -1) return size;
size = 0;
if (hasValue()) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(1, getValue());
}
if (hasName()) {
size += com.google.protobuf.CodedOutputStream
.computeStringSize(2, getName());
}
size += getUnknownFields().getSerializedSize();
memoizedSerializedSize = size;
return size;
}
public static ca.evanjones.protorpc.Counter.Value parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return newBuilder().mergeFrom(data).buildParsed();
}
public static ca.evanjones.protorpc.Counter.Value parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return newBuilder().mergeFrom(data, extensionRegistry)
.buildParsed();
}
public static ca.evanjones.protorpc.Counter.Value parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return newBuilder().mergeFrom(data).buildParsed();
}
public static ca.evanjones.protorpc.Counter.Value parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return newBuilder().mergeFrom(data, extensionRegistry)
.buildParsed();
}
public static ca.evanjones.protorpc.Counter.Value parseFrom(java.io.InputStream input)
throws java.io.IOException {
return newBuilder().mergeFrom(input).buildParsed();
}
public static ca.evanjones.protorpc.Counter.Value parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return newBuilder().mergeFrom(input, extensionRegistry)
.buildParsed();
}
public static ca.evanjones.protorpc.Counter.Value parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
Builder builder = newBuilder();
if (builder.mergeDelimitedFrom(input)) {
return builder.buildParsed();
} else {
return null;
}
}
public static ca.evanjones.protorpc.Counter.Value parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
Builder builder = newBuilder();
if (builder.mergeDelimitedFrom(input, extensionRegistry)) {
return builder.buildParsed();
} else {
return null;
}
}
public static ca.evanjones.protorpc.Counter.Value parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return newBuilder().mergeFrom(input).buildParsed();
}
public static ca.evanjones.protorpc.Counter.Value parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite 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(ca.evanjones.protorpc.Counter.Value prototype) {
return newBuilder().mergeFrom(prototype);
}
public Builder toBuilder() { return newBuilder(this); }
public static final class Builder extends
com.google.protobuf.GeneratedMessage.Builder<Builder> {
private ca.evanjones.protorpc.Counter.Value result;
// Construct using ca.evanjones.protorpc.Counter.Value.newBuilder()
private Builder() {}
private static Builder create() {
Builder builder = new Builder();
builder.result = new ca.evanjones.protorpc.Counter.Value();
return builder;
}
protected ca.evanjones.protorpc.Counter.Value internalGetResult() {
return result;
}
public Builder clear() {
if (result == null) {
throw new IllegalStateException(
"Cannot call clear() after build().");
}
result = new ca.evanjones.protorpc.Counter.Value();
return this;
}
public Builder clone() {
return create().mergeFrom(result);
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return ca.evanjones.protorpc.Counter.Value.getDescriptor();
}
public ca.evanjones.protorpc.Counter.Value getDefaultInstanceForType() {
return ca.evanjones.protorpc.Counter.Value.getDefaultInstance();
}
public boolean isInitialized() {
return result.isInitialized();
}
public ca.evanjones.protorpc.Counter.Value build() {
if (result != null && !isInitialized()) {
throw newUninitializedMessageException(result);
}
return buildPartial();
}
private ca.evanjones.protorpc.Counter.Value buildParsed()
throws com.google.protobuf.InvalidProtocolBufferException {
if (!isInitialized()) {
throw newUninitializedMessageException(
result).asInvalidProtocolBufferException();
}
return buildPartial();
}
public ca.evanjones.protorpc.Counter.Value buildPartial() {
if (result == null) {
throw new IllegalStateException(
"build() has already been called on this Builder.");
}
ca.evanjones.protorpc.Counter.Value returnMe = result;
result = null;
return returnMe;
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof ca.evanjones.protorpc.Counter.Value) {
return mergeFrom((ca.evanjones.protorpc.Counter.Value)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(ca.evanjones.protorpc.Counter.Value other) {
if (other == ca.evanjones.protorpc.Counter.Value.getDefaultInstance()) return this;
if (other.hasValue()) {
setValue(other.getValue());
}
if (other.hasName()) {
setName(other.getName());
}
this.mergeUnknownFields(other.getUnknownFields());
return this;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite 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 8: {
setValue(input.readInt32());
break;
}
case 18: {
setName(input.readString());
break;
}
}
}
}
// required int32 value = 1;
public boolean hasValue() {
return result.hasValue();
}
public int getValue() {
return result.getValue();
}
public Builder setValue(int value) {
result.hasValue = true;
result.value_ = value;
return this;
}
public Builder clearValue() {
result.hasValue = false;
result.value_ = 0;
return this;
}
// optional string name = 2;
public boolean hasName() {
return result.hasName();
}
public java.lang.String getName() {
return result.getName();
}
public Builder setName(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
result.hasName = true;
result.name_ = value;
return this;
}
public Builder clearName() {
result.hasName = false;
result.name_ = getDefaultInstance().getName();
return this;
}
// @@protoc_insertion_point(builder_scope:protorpc.Value)
}
static {
defaultInstance = new Value(true);
ca.evanjones.protorpc.Counter.internalForceInit();
defaultInstance.initFields();
}
// @@protoc_insertion_point(class_scope:protorpc.Value)
}
public static final class GetRequest extends
com.google.protobuf.GeneratedMessage {
// Use GetRequest.newBuilder() to construct.
private GetRequest() {
initFields();
}
private GetRequest(boolean noInit) {}
private static final GetRequest defaultInstance;
public static GetRequest getDefaultInstance() {
return defaultInstance;
}
public GetRequest getDefaultInstanceForType() {
return defaultInstance;
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return ca.evanjones.protorpc.Counter.internal_static_protorpc_GetRequest_descriptor;
}
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return ca.evanjones.protorpc.Counter.internal_static_protorpc_GetRequest_fieldAccessorTable;
}
// optional string name = 1;
public static final int NAME_FIELD_NUMBER = 1;
private boolean hasName;
private java.lang.String name_ = "";
public boolean hasName() { return hasName; }
public java.lang.String getName() { return name_; }
private void initFields() {
}
public final boolean isInitialized() {
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
getSerializedSize();
if (hasName()) {
output.writeString(1, getName());
}
getUnknownFields().writeTo(output);
}
private int memoizedSerializedSize = -1;
public int getSerializedSize() {
int size = memoizedSerializedSize;
if (size != -1) return size;
size = 0;
if (hasName()) {
size += com.google.protobuf.CodedOutputStream
.computeStringSize(1, getName());
}
size += getUnknownFields().getSerializedSize();
memoizedSerializedSize = size;
return size;
}
public static ca.evanjones.protorpc.Counter.GetRequest parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return newBuilder().mergeFrom(data).buildParsed();
}
public static ca.evanjones.protorpc.Counter.GetRequest parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return newBuilder().mergeFrom(data, extensionRegistry)
.buildParsed();
}
public static ca.evanjones.protorpc.Counter.GetRequest parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return newBuilder().mergeFrom(data).buildParsed();
}
public static ca.evanjones.protorpc.Counter.GetRequest parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return newBuilder().mergeFrom(data, extensionRegistry)
.buildParsed();
}
public static ca.evanjones.protorpc.Counter.GetRequest parseFrom(java.io.InputStream input)
throws java.io.IOException {
return newBuilder().mergeFrom(input).buildParsed();
}
public static ca.evanjones.protorpc.Counter.GetRequest parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return newBuilder().mergeFrom(input, extensionRegistry)
.buildParsed();
}
public static ca.evanjones.protorpc.Counter.GetRequest parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
Builder builder = newBuilder();
if (builder.mergeDelimitedFrom(input)) {
return builder.buildParsed();
} else {
return null;
}
}
public static ca.evanjones.protorpc.Counter.GetRequest parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
Builder builder = newBuilder();
if (builder.mergeDelimitedFrom(input, extensionRegistry)) {
return builder.buildParsed();
} else {
return null;
}
}
public static ca.evanjones.protorpc.Counter.GetRequest parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return newBuilder().mergeFrom(input).buildParsed();
}
public static ca.evanjones.protorpc.Counter.GetRequest parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite 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(ca.evanjones.protorpc.Counter.GetRequest prototype) {
return newBuilder().mergeFrom(prototype);
}
public Builder toBuilder() { return newBuilder(this); }
public static final class Builder extends
com.google.protobuf.GeneratedMessage.Builder<Builder> {
private ca.evanjones.protorpc.Counter.GetRequest result;
// Construct using ca.evanjones.protorpc.Counter.GetRequest.newBuilder()
private Builder() {}
private static Builder create() {
Builder builder = new Builder();
builder.result = new ca.evanjones.protorpc.Counter.GetRequest();
return builder;
}
protected ca.evanjones.protorpc.Counter.GetRequest internalGetResult() {
return result;
}
public Builder clear() {
if (result == null) {
throw new IllegalStateException(
"Cannot call clear() after build().");
}
result = new ca.evanjones.protorpc.Counter.GetRequest();
return this;
}
public Builder clone() {
return create().mergeFrom(result);
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return ca.evanjones.protorpc.Counter.GetRequest.getDescriptor();
}
public ca.evanjones.protorpc.Counter.GetRequest getDefaultInstanceForType() {
return ca.evanjones.protorpc.Counter.GetRequest.getDefaultInstance();
}
public boolean isInitialized() {
return result.isInitialized();
}
public ca.evanjones.protorpc.Counter.GetRequest build() {
if (result != null && !isInitialized()) {
throw newUninitializedMessageException(result);
}
return buildPartial();
}
private ca.evanjones.protorpc.Counter.GetRequest buildParsed()
throws com.google.protobuf.InvalidProtocolBufferException {
if (!isInitialized()) {
throw newUninitializedMessageException(
result).asInvalidProtocolBufferException();
}
return buildPartial();
}
public ca.evanjones.protorpc.Counter.GetRequest buildPartial() {
if (result == null) {
throw new IllegalStateException(
"build() has already been called on this Builder.");
}
ca.evanjones.protorpc.Counter.GetRequest returnMe = result;
result = null;
return returnMe;
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof ca.evanjones.protorpc.Counter.GetRequest) {
return mergeFrom((ca.evanjones.protorpc.Counter.GetRequest)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(ca.evanjones.protorpc.Counter.GetRequest other) {
if (other == ca.evanjones.protorpc.Counter.GetRequest.getDefaultInstance()) return this;
if (other.hasName()) {
setName(other.getName());
}
this.mergeUnknownFields(other.getUnknownFields());
return this;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite 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: {
setName(input.readString());
break;
}
}
}
}
// optional string name = 1;
public boolean hasName() {
return result.hasName();
}
public java.lang.String getName() {
return result.getName();
}
public Builder setName(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
result.hasName = true;
result.name_ = value;
return this;
}
public Builder clearName() {
result.hasName = false;
result.name_ = getDefaultInstance().getName();
return this;
}
// @@protoc_insertion_point(builder_scope:protorpc.GetRequest)
}
static {
defaultInstance = new GetRequest(true);
ca.evanjones.protorpc.Counter.internalForceInit();
defaultInstance.initFields();
}
// @@protoc_insertion_point(class_scope:protorpc.GetRequest)
}
public static abstract class CounterService
implements com.google.protobuf.Service {
protected CounterService() {}
public interface Interface {
public abstract void add(
com.google.protobuf.RpcController controller,
ca.evanjones.protorpc.Counter.Value request,
com.google.protobuf.RpcCallback<ca.evanjones.protorpc.Counter.Value> done);
public abstract void get(
com.google.protobuf.RpcController controller,
ca.evanjones.protorpc.Counter.GetRequest request,
com.google.protobuf.RpcCallback<ca.evanjones.protorpc.Counter.Value> done);
}
public static com.google.protobuf.Service newReflectiveService(
final Interface impl) {
return new CounterService() {
@Override
public void add(
com.google.protobuf.RpcController controller,
ca.evanjones.protorpc.Counter.Value request,
com.google.protobuf.RpcCallback<ca.evanjones.protorpc.Counter.Value> done) {
impl.add(controller, request, done);
}
@Override
public void get(
com.google.protobuf.RpcController controller,
ca.evanjones.protorpc.Counter.GetRequest request,
com.google.protobuf.RpcCallback<ca.evanjones.protorpc.Counter.Value> done) {
impl.get(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.add(controller, (ca.evanjones.protorpc.Counter.Value)request);
case 1:
return impl.get(controller, (ca.evanjones.protorpc.Counter.GetRequest)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 ca.evanjones.protorpc.Counter.Value.getDefaultInstance();
case 1:
return ca.evanjones.protorpc.Counter.GetRequest.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 ca.evanjones.protorpc.Counter.Value.getDefaultInstance();
case 1:
return ca.evanjones.protorpc.Counter.Value.getDefaultInstance();
default:
throw new java.lang.AssertionError("Can't get here.");
}
}
};
}
public abstract void add(
com.google.protobuf.RpcController controller,
ca.evanjones.protorpc.Counter.Value request,
com.google.protobuf.RpcCallback<ca.evanjones.protorpc.Counter.Value> done);
public abstract void get(
com.google.protobuf.RpcController controller,
ca.evanjones.protorpc.Counter.GetRequest request,
com.google.protobuf.RpcCallback<ca.evanjones.protorpc.Counter.Value> done);
public static final
com.google.protobuf.Descriptors.ServiceDescriptor
getDescriptor() {
return ca.evanjones.protorpc.Counter.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.add(controller, (ca.evanjones.protorpc.Counter.Value)request,
com.google.protobuf.RpcUtil.<ca.evanjones.protorpc.Counter.Value>specializeCallback(
done));
return;
case 1:
this.get(controller, (ca.evanjones.protorpc.Counter.GetRequest)request,
com.google.protobuf.RpcUtil.<ca.evanjones.protorpc.Counter.Value>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 ca.evanjones.protorpc.Counter.Value.getDefaultInstance();
case 1:
return ca.evanjones.protorpc.Counter.GetRequest.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 ca.evanjones.protorpc.Counter.Value.getDefaultInstance();
case 1:
return ca.evanjones.protorpc.Counter.Value.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 ca.evanjones.protorpc.Counter.CounterService 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 add(
com.google.protobuf.RpcController controller,
ca.evanjones.protorpc.Counter.Value request,
com.google.protobuf.RpcCallback<ca.evanjones.protorpc.Counter.Value> done) {
channel.callMethod(
getDescriptor().getMethods().get(0),
controller,
request,
ca.evanjones.protorpc.Counter.Value.getDefaultInstance(),
com.google.protobuf.RpcUtil.generalizeCallback(
done,
ca.evanjones.protorpc.Counter.Value.class,
ca.evanjones.protorpc.Counter.Value.getDefaultInstance()));
}
public void get(
com.google.protobuf.RpcController controller,
ca.evanjones.protorpc.Counter.GetRequest request,
com.google.protobuf.RpcCallback<ca.evanjones.protorpc.Counter.Value> done) {
channel.callMethod(
getDescriptor().getMethods().get(1),
controller,
request,
ca.evanjones.protorpc.Counter.Value.getDefaultInstance(),
com.google.protobuf.RpcUtil.generalizeCallback(
done,
ca.evanjones.protorpc.Counter.Value.class,
ca.evanjones.protorpc.Counter.Value.getDefaultInstance()));
}
}
public static BlockingInterface newBlockingStub(
com.google.protobuf.BlockingRpcChannel channel) {
return new BlockingStub(channel);
}
public interface BlockingInterface {
public ca.evanjones.protorpc.Counter.Value add(
com.google.protobuf.RpcController controller,
ca.evanjones.protorpc.Counter.Value request)
throws com.google.protobuf.ServiceException;
public ca.evanjones.protorpc.Counter.Value get(
com.google.protobuf.RpcController controller,
ca.evanjones.protorpc.Counter.GetRequest 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 ca.evanjones.protorpc.Counter.Value add(
com.google.protobuf.RpcController controller,
ca.evanjones.protorpc.Counter.Value request)
throws com.google.protobuf.ServiceException {
return (ca.evanjones.protorpc.Counter.Value) channel.callBlockingMethod(
getDescriptor().getMethods().get(0),
controller,
request,
ca.evanjones.protorpc.Counter.Value.getDefaultInstance());
}
public ca.evanjones.protorpc.Counter.Value get(
com.google.protobuf.RpcController controller,
ca.evanjones.protorpc.Counter.GetRequest request)
throws com.google.protobuf.ServiceException {
return (ca.evanjones.protorpc.Counter.Value) channel.callBlockingMethod(
getDescriptor().getMethods().get(1),
controller,
request,
ca.evanjones.protorpc.Counter.Value.getDefaultInstance());
}
}
}
private static com.google.protobuf.Descriptors.Descriptor
internal_static_protorpc_Value_descriptor;
private static
com.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_protorpc_Value_fieldAccessorTable;
private static com.google.protobuf.Descriptors.Descriptor
internal_static_protorpc_GetRequest_descriptor;
private static
com.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_protorpc_GetRequest_fieldAccessorTable;
public static com.google.protobuf.Descriptors.FileDescriptor
getDescriptor() {
return descriptor;
}
private static com.google.protobuf.Descriptors.FileDescriptor
descriptor;
static {
java.lang.String[] descriptorData = {
"\n#ca/evanjones/protorpc/Counter.proto\022\010p" +
"rotorpc\"$\n\005Value\022\r\n\005value\030\001 \002(\005\022\014\n\004name\030" +
"\002 \001(\t\"\032\n\nGetRequest\022\014\n\004name\030\001 \001(\t2g\n\016Cou" +
"nterService\022\'\n\003Add\022\017.protorpc.Value\032\017.pr" +
"otorpc.Value\022,\n\003Get\022\024.protorpc.GetReques" +
"t\032\017.protorpc.ValueB\027\n\025ca.evanjones.proto" +
"rpc"
};
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_protorpc_Value_descriptor =
getDescriptor().getMessageTypes().get(0);
internal_static_protorpc_Value_fieldAccessorTable = new
com.google.protobuf.GeneratedMessage.FieldAccessorTable(
internal_static_protorpc_Value_descriptor,
new java.lang.String[] { "Value", "Name", },
ca.evanjones.protorpc.Counter.Value.class,
ca.evanjones.protorpc.Counter.Value.Builder.class);
internal_static_protorpc_GetRequest_descriptor =
getDescriptor().getMessageTypes().get(1);
internal_static_protorpc_GetRequest_fieldAccessorTable = new
com.google.protobuf.GeneratedMessage.FieldAccessorTable(
internal_static_protorpc_GetRequest_descriptor,
new java.lang.String[] { "Name", },
ca.evanjones.protorpc.Counter.GetRequest.class,
ca.evanjones.protorpc.Counter.GetRequest.Builder.class);
return null;
}
};
com.google.protobuf.Descriptors.FileDescriptor
.internalBuildGeneratedFileFrom(descriptorData,
new com.google.protobuf.Descriptors.FileDescriptor[] {
}, assigner);
}
public static void internalForceInit() {}
// @@protoc_insertion_point(outer_class_scope)
}