org.apache.tajo.rpc.test.DummyProtocol Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of tajo-rpc Show documentation
Show all versions of tajo-rpc Show documentation
RPC Server/Client Implementation based on Netty and Protocol Buffer
The newest version!
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: TestProtocol.proto
package org.apache.tajo.rpc.test;
public final class DummyProtocol {
private DummyProtocol() {}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistry registry) {
}
/**
* Protobuf service {@code DummyProtocolService}
*/
public static abstract class DummyProtocolService
implements com.google.protobuf.Service {
protected DummyProtocolService() {}
public interface Interface {
/**
* rpc sum(.SumRequest) returns (.SumResponse);
*/
public abstract void sum(
com.google.protobuf.RpcController controller,
org.apache.tajo.rpc.test.TestProtos.SumRequest request,
com.google.protobuf.RpcCallback done);
/**
* rpc echo(.EchoMessage) returns (.EchoMessage);
*/
public abstract void echo(
com.google.protobuf.RpcController controller,
org.apache.tajo.rpc.test.TestProtos.EchoMessage request,
com.google.protobuf.RpcCallback done);
/**
* rpc getError(.EchoMessage) returns (.EchoMessage);
*/
public abstract void getError(
com.google.protobuf.RpcController controller,
org.apache.tajo.rpc.test.TestProtos.EchoMessage request,
com.google.protobuf.RpcCallback done);
/**
* rpc getNull(.EchoMessage) returns (.EchoMessage);
*/
public abstract void getNull(
com.google.protobuf.RpcController controller,
org.apache.tajo.rpc.test.TestProtos.EchoMessage request,
com.google.protobuf.RpcCallback done);
/**
* rpc deley(.EchoMessage) returns (.EchoMessage);
*/
public abstract void deley(
com.google.protobuf.RpcController controller,
org.apache.tajo.rpc.test.TestProtos.EchoMessage request,
com.google.protobuf.RpcCallback done);
/**
* rpc throwException(.EchoMessage) returns (.EchoMessage);
*/
public abstract void throwException(
com.google.protobuf.RpcController controller,
org.apache.tajo.rpc.test.TestProtos.EchoMessage request,
com.google.protobuf.RpcCallback done);
}
public static com.google.protobuf.Service newReflectiveService(
final Interface impl) {
return new DummyProtocolService() {
@java.lang.Override
public void sum(
com.google.protobuf.RpcController controller,
org.apache.tajo.rpc.test.TestProtos.SumRequest request,
com.google.protobuf.RpcCallback done) {
impl.sum(controller, request, done);
}
@java.lang.Override
public void echo(
com.google.protobuf.RpcController controller,
org.apache.tajo.rpc.test.TestProtos.EchoMessage request,
com.google.protobuf.RpcCallback done) {
impl.echo(controller, request, done);
}
@java.lang.Override
public void getError(
com.google.protobuf.RpcController controller,
org.apache.tajo.rpc.test.TestProtos.EchoMessage request,
com.google.protobuf.RpcCallback done) {
impl.getError(controller, request, done);
}
@java.lang.Override
public void getNull(
com.google.protobuf.RpcController controller,
org.apache.tajo.rpc.test.TestProtos.EchoMessage request,
com.google.protobuf.RpcCallback done) {
impl.getNull(controller, request, done);
}
@java.lang.Override
public void deley(
com.google.protobuf.RpcController controller,
org.apache.tajo.rpc.test.TestProtos.EchoMessage request,
com.google.protobuf.RpcCallback done) {
impl.deley(controller, request, done);
}
@java.lang.Override
public void throwException(
com.google.protobuf.RpcController controller,
org.apache.tajo.rpc.test.TestProtos.EchoMessage request,
com.google.protobuf.RpcCallback done) {
impl.throwException(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.sum(controller, (org.apache.tajo.rpc.test.TestProtos.SumRequest)request);
case 1:
return impl.echo(controller, (org.apache.tajo.rpc.test.TestProtos.EchoMessage)request);
case 2:
return impl.getError(controller, (org.apache.tajo.rpc.test.TestProtos.EchoMessage)request);
case 3:
return impl.getNull(controller, (org.apache.tajo.rpc.test.TestProtos.EchoMessage)request);
case 4:
return impl.deley(controller, (org.apache.tajo.rpc.test.TestProtos.EchoMessage)request);
case 5:
return impl.throwException(controller, (org.apache.tajo.rpc.test.TestProtos.EchoMessage)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 org.apache.tajo.rpc.test.TestProtos.SumRequest.getDefaultInstance();
case 1:
return org.apache.tajo.rpc.test.TestProtos.EchoMessage.getDefaultInstance();
case 2:
return org.apache.tajo.rpc.test.TestProtos.EchoMessage.getDefaultInstance();
case 3:
return org.apache.tajo.rpc.test.TestProtos.EchoMessage.getDefaultInstance();
case 4:
return org.apache.tajo.rpc.test.TestProtos.EchoMessage.getDefaultInstance();
case 5:
return org.apache.tajo.rpc.test.TestProtos.EchoMessage.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 org.apache.tajo.rpc.test.TestProtos.SumResponse.getDefaultInstance();
case 1:
return org.apache.tajo.rpc.test.TestProtos.EchoMessage.getDefaultInstance();
case 2:
return org.apache.tajo.rpc.test.TestProtos.EchoMessage.getDefaultInstance();
case 3:
return org.apache.tajo.rpc.test.TestProtos.EchoMessage.getDefaultInstance();
case 4:
return org.apache.tajo.rpc.test.TestProtos.EchoMessage.getDefaultInstance();
case 5:
return org.apache.tajo.rpc.test.TestProtos.EchoMessage.getDefaultInstance();
default:
throw new java.lang.AssertionError("Can't get here.");
}
}
};
}
/**
* rpc sum(.SumRequest) returns (.SumResponse);
*/
public abstract void sum(
com.google.protobuf.RpcController controller,
org.apache.tajo.rpc.test.TestProtos.SumRequest request,
com.google.protobuf.RpcCallback done);
/**
* rpc echo(.EchoMessage) returns (.EchoMessage);
*/
public abstract void echo(
com.google.protobuf.RpcController controller,
org.apache.tajo.rpc.test.TestProtos.EchoMessage request,
com.google.protobuf.RpcCallback done);
/**
* rpc getError(.EchoMessage) returns (.EchoMessage);
*/
public abstract void getError(
com.google.protobuf.RpcController controller,
org.apache.tajo.rpc.test.TestProtos.EchoMessage request,
com.google.protobuf.RpcCallback done);
/**
* rpc getNull(.EchoMessage) returns (.EchoMessage);
*/
public abstract void getNull(
com.google.protobuf.RpcController controller,
org.apache.tajo.rpc.test.TestProtos.EchoMessage request,
com.google.protobuf.RpcCallback done);
/**
* rpc deley(.EchoMessage) returns (.EchoMessage);
*/
public abstract void deley(
com.google.protobuf.RpcController controller,
org.apache.tajo.rpc.test.TestProtos.EchoMessage request,
com.google.protobuf.RpcCallback done);
/**
* rpc throwException(.EchoMessage) returns (.EchoMessage);
*/
public abstract void throwException(
com.google.protobuf.RpcController controller,
org.apache.tajo.rpc.test.TestProtos.EchoMessage request,
com.google.protobuf.RpcCallback done);
public static final
com.google.protobuf.Descriptors.ServiceDescriptor
getDescriptor() {
return org.apache.tajo.rpc.test.DummyProtocol.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.sum(controller, (org.apache.tajo.rpc.test.TestProtos.SumRequest)request,
com.google.protobuf.RpcUtil.specializeCallback(
done));
return;
case 1:
this.echo(controller, (org.apache.tajo.rpc.test.TestProtos.EchoMessage)request,
com.google.protobuf.RpcUtil.specializeCallback(
done));
return;
case 2:
this.getError(controller, (org.apache.tajo.rpc.test.TestProtos.EchoMessage)request,
com.google.protobuf.RpcUtil.specializeCallback(
done));
return;
case 3:
this.getNull(controller, (org.apache.tajo.rpc.test.TestProtos.EchoMessage)request,
com.google.protobuf.RpcUtil.specializeCallback(
done));
return;
case 4:
this.deley(controller, (org.apache.tajo.rpc.test.TestProtos.EchoMessage)request,
com.google.protobuf.RpcUtil.specializeCallback(
done));
return;
case 5:
this.throwException(controller, (org.apache.tajo.rpc.test.TestProtos.EchoMessage)request,
com.google.protobuf.RpcUtil.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 org.apache.tajo.rpc.test.TestProtos.SumRequest.getDefaultInstance();
case 1:
return org.apache.tajo.rpc.test.TestProtos.EchoMessage.getDefaultInstance();
case 2:
return org.apache.tajo.rpc.test.TestProtos.EchoMessage.getDefaultInstance();
case 3:
return org.apache.tajo.rpc.test.TestProtos.EchoMessage.getDefaultInstance();
case 4:
return org.apache.tajo.rpc.test.TestProtos.EchoMessage.getDefaultInstance();
case 5:
return org.apache.tajo.rpc.test.TestProtos.EchoMessage.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 org.apache.tajo.rpc.test.TestProtos.SumResponse.getDefaultInstance();
case 1:
return org.apache.tajo.rpc.test.TestProtos.EchoMessage.getDefaultInstance();
case 2:
return org.apache.tajo.rpc.test.TestProtos.EchoMessage.getDefaultInstance();
case 3:
return org.apache.tajo.rpc.test.TestProtos.EchoMessage.getDefaultInstance();
case 4:
return org.apache.tajo.rpc.test.TestProtos.EchoMessage.getDefaultInstance();
case 5:
return org.apache.tajo.rpc.test.TestProtos.EchoMessage.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 org.apache.tajo.rpc.test.DummyProtocol.DummyProtocolService 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 sum(
com.google.protobuf.RpcController controller,
org.apache.tajo.rpc.test.TestProtos.SumRequest request,
com.google.protobuf.RpcCallback done) {
channel.callMethod(
getDescriptor().getMethods().get(0),
controller,
request,
org.apache.tajo.rpc.test.TestProtos.SumResponse.getDefaultInstance(),
com.google.protobuf.RpcUtil.generalizeCallback(
done,
org.apache.tajo.rpc.test.TestProtos.SumResponse.class,
org.apache.tajo.rpc.test.TestProtos.SumResponse.getDefaultInstance()));
}
public void echo(
com.google.protobuf.RpcController controller,
org.apache.tajo.rpc.test.TestProtos.EchoMessage request,
com.google.protobuf.RpcCallback done) {
channel.callMethod(
getDescriptor().getMethods().get(1),
controller,
request,
org.apache.tajo.rpc.test.TestProtos.EchoMessage.getDefaultInstance(),
com.google.protobuf.RpcUtil.generalizeCallback(
done,
org.apache.tajo.rpc.test.TestProtos.EchoMessage.class,
org.apache.tajo.rpc.test.TestProtos.EchoMessage.getDefaultInstance()));
}
public void getError(
com.google.protobuf.RpcController controller,
org.apache.tajo.rpc.test.TestProtos.EchoMessage request,
com.google.protobuf.RpcCallback done) {
channel.callMethod(
getDescriptor().getMethods().get(2),
controller,
request,
org.apache.tajo.rpc.test.TestProtos.EchoMessage.getDefaultInstance(),
com.google.protobuf.RpcUtil.generalizeCallback(
done,
org.apache.tajo.rpc.test.TestProtos.EchoMessage.class,
org.apache.tajo.rpc.test.TestProtos.EchoMessage.getDefaultInstance()));
}
public void getNull(
com.google.protobuf.RpcController controller,
org.apache.tajo.rpc.test.TestProtos.EchoMessage request,
com.google.protobuf.RpcCallback done) {
channel.callMethod(
getDescriptor().getMethods().get(3),
controller,
request,
org.apache.tajo.rpc.test.TestProtos.EchoMessage.getDefaultInstance(),
com.google.protobuf.RpcUtil.generalizeCallback(
done,
org.apache.tajo.rpc.test.TestProtos.EchoMessage.class,
org.apache.tajo.rpc.test.TestProtos.EchoMessage.getDefaultInstance()));
}
public void deley(
com.google.protobuf.RpcController controller,
org.apache.tajo.rpc.test.TestProtos.EchoMessage request,
com.google.protobuf.RpcCallback done) {
channel.callMethod(
getDescriptor().getMethods().get(4),
controller,
request,
org.apache.tajo.rpc.test.TestProtos.EchoMessage.getDefaultInstance(),
com.google.protobuf.RpcUtil.generalizeCallback(
done,
org.apache.tajo.rpc.test.TestProtos.EchoMessage.class,
org.apache.tajo.rpc.test.TestProtos.EchoMessage.getDefaultInstance()));
}
public void throwException(
com.google.protobuf.RpcController controller,
org.apache.tajo.rpc.test.TestProtos.EchoMessage request,
com.google.protobuf.RpcCallback done) {
channel.callMethod(
getDescriptor().getMethods().get(5),
controller,
request,
org.apache.tajo.rpc.test.TestProtos.EchoMessage.getDefaultInstance(),
com.google.protobuf.RpcUtil.generalizeCallback(
done,
org.apache.tajo.rpc.test.TestProtos.EchoMessage.class,
org.apache.tajo.rpc.test.TestProtos.EchoMessage.getDefaultInstance()));
}
}
public static BlockingInterface newBlockingStub(
com.google.protobuf.BlockingRpcChannel channel) {
return new BlockingStub(channel);
}
public interface BlockingInterface {
public org.apache.tajo.rpc.test.TestProtos.SumResponse sum(
com.google.protobuf.RpcController controller,
org.apache.tajo.rpc.test.TestProtos.SumRequest request)
throws com.google.protobuf.ServiceException;
public org.apache.tajo.rpc.test.TestProtos.EchoMessage echo(
com.google.protobuf.RpcController controller,
org.apache.tajo.rpc.test.TestProtos.EchoMessage request)
throws com.google.protobuf.ServiceException;
public org.apache.tajo.rpc.test.TestProtos.EchoMessage getError(
com.google.protobuf.RpcController controller,
org.apache.tajo.rpc.test.TestProtos.EchoMessage request)
throws com.google.protobuf.ServiceException;
public org.apache.tajo.rpc.test.TestProtos.EchoMessage getNull(
com.google.protobuf.RpcController controller,
org.apache.tajo.rpc.test.TestProtos.EchoMessage request)
throws com.google.protobuf.ServiceException;
public org.apache.tajo.rpc.test.TestProtos.EchoMessage deley(
com.google.protobuf.RpcController controller,
org.apache.tajo.rpc.test.TestProtos.EchoMessage request)
throws com.google.protobuf.ServiceException;
public org.apache.tajo.rpc.test.TestProtos.EchoMessage throwException(
com.google.protobuf.RpcController controller,
org.apache.tajo.rpc.test.TestProtos.EchoMessage 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 org.apache.tajo.rpc.test.TestProtos.SumResponse sum(
com.google.protobuf.RpcController controller,
org.apache.tajo.rpc.test.TestProtos.SumRequest request)
throws com.google.protobuf.ServiceException {
return (org.apache.tajo.rpc.test.TestProtos.SumResponse) channel.callBlockingMethod(
getDescriptor().getMethods().get(0),
controller,
request,
org.apache.tajo.rpc.test.TestProtos.SumResponse.getDefaultInstance());
}
public org.apache.tajo.rpc.test.TestProtos.EchoMessage echo(
com.google.protobuf.RpcController controller,
org.apache.tajo.rpc.test.TestProtos.EchoMessage request)
throws com.google.protobuf.ServiceException {
return (org.apache.tajo.rpc.test.TestProtos.EchoMessage) channel.callBlockingMethod(
getDescriptor().getMethods().get(1),
controller,
request,
org.apache.tajo.rpc.test.TestProtos.EchoMessage.getDefaultInstance());
}
public org.apache.tajo.rpc.test.TestProtos.EchoMessage getError(
com.google.protobuf.RpcController controller,
org.apache.tajo.rpc.test.TestProtos.EchoMessage request)
throws com.google.protobuf.ServiceException {
return (org.apache.tajo.rpc.test.TestProtos.EchoMessage) channel.callBlockingMethod(
getDescriptor().getMethods().get(2),
controller,
request,
org.apache.tajo.rpc.test.TestProtos.EchoMessage.getDefaultInstance());
}
public org.apache.tajo.rpc.test.TestProtos.EchoMessage getNull(
com.google.protobuf.RpcController controller,
org.apache.tajo.rpc.test.TestProtos.EchoMessage request)
throws com.google.protobuf.ServiceException {
return (org.apache.tajo.rpc.test.TestProtos.EchoMessage) channel.callBlockingMethod(
getDescriptor().getMethods().get(3),
controller,
request,
org.apache.tajo.rpc.test.TestProtos.EchoMessage.getDefaultInstance());
}
public org.apache.tajo.rpc.test.TestProtos.EchoMessage deley(
com.google.protobuf.RpcController controller,
org.apache.tajo.rpc.test.TestProtos.EchoMessage request)
throws com.google.protobuf.ServiceException {
return (org.apache.tajo.rpc.test.TestProtos.EchoMessage) channel.callBlockingMethod(
getDescriptor().getMethods().get(4),
controller,
request,
org.apache.tajo.rpc.test.TestProtos.EchoMessage.getDefaultInstance());
}
public org.apache.tajo.rpc.test.TestProtos.EchoMessage throwException(
com.google.protobuf.RpcController controller,
org.apache.tajo.rpc.test.TestProtos.EchoMessage request)
throws com.google.protobuf.ServiceException {
return (org.apache.tajo.rpc.test.TestProtos.EchoMessage) channel.callBlockingMethod(
getDescriptor().getMethods().get(5),
controller,
request,
org.apache.tajo.rpc.test.TestProtos.EchoMessage.getDefaultInstance());
}
}
// @@protoc_insertion_point(class_scope:DummyProtocolService)
}
public static com.google.protobuf.Descriptors.FileDescriptor
getDescriptor() {
return descriptor;
}
private static com.google.protobuf.Descriptors.FileDescriptor
descriptor;
static {
java.lang.String[] descriptorData = {
"\n\022TestProtocol.proto\032\020TestProtos.proto2\376" +
"\001\n\024DummyProtocolService\022 \n\003sum\022\013.SumRequ" +
"est\032\014.SumResponse\022\"\n\004echo\022\014.EchoMessage\032" +
"\014.EchoMessage\022&\n\010getError\022\014.EchoMessage\032" +
"\014.EchoMessage\022%\n\007getNull\022\014.EchoMessage\032\014" +
".EchoMessage\022#\n\005deley\022\014.EchoMessage\032\014.Ec" +
"hoMessage\022,\n\016throwException\022\014.EchoMessag" +
"e\032\014.EchoMessageB/\n\030org.apache.tajo.rpc.t" +
"estB\rDummyProtocol\210\001\001\240\001\001"
};
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;
return null;
}
};
com.google.protobuf.Descriptors.FileDescriptor
.internalBuildGeneratedFileFrom(descriptorData,
new com.google.protobuf.Descriptors.FileDescriptor[] {
org.apache.tajo.rpc.test.TestProtos.getDescriptor(),
}, assigner);
}
// @@protoc_insertion_point(outer_class_scope)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy