001// Generated by the protocol buffer compiler. DO NOT EDIT! 002// source: test_rpc_service.proto 003 004package org.apache.hadoop.ipc.protobuf; 005 006public final class TestRpcServiceProtos { 007 private TestRpcServiceProtos() {} 008 public static void registerAllExtensions( 009 com.google.protobuf.ExtensionRegistry registry) { 010 } 011 /** 012 * Protobuf service {@code hadoop.common.TestProtobufRpcProto} 013 * 014 * <pre> 015 ** 016 * A protobuf service for use in tests 017 * </pre> 018 */ 019 public static abstract class TestProtobufRpcProto 020 implements com.google.protobuf.Service { 021 protected TestProtobufRpcProto() {} 022 023 public interface Interface { 024 /** 025 * <code>rpc ping(.hadoop.common.EmptyRequestProto) returns (.hadoop.common.EmptyResponseProto);</code> 026 */ 027 public abstract void ping( 028 com.google.protobuf.RpcController controller, 029 org.apache.hadoop.ipc.protobuf.TestProtos.EmptyRequestProto request, 030 com.google.protobuf.RpcCallback<org.apache.hadoop.ipc.protobuf.TestProtos.EmptyResponseProto> done); 031 032 /** 033 * <code>rpc echo(.hadoop.common.EchoRequestProto) returns (.hadoop.common.EchoResponseProto);</code> 034 */ 035 public abstract void echo( 036 com.google.protobuf.RpcController controller, 037 org.apache.hadoop.ipc.protobuf.TestProtos.EchoRequestProto request, 038 com.google.protobuf.RpcCallback<org.apache.hadoop.ipc.protobuf.TestProtos.EchoResponseProto> done); 039 040 /** 041 * <code>rpc error(.hadoop.common.EmptyRequestProto) returns (.hadoop.common.EmptyResponseProto);</code> 042 */ 043 public abstract void error( 044 com.google.protobuf.RpcController controller, 045 org.apache.hadoop.ipc.protobuf.TestProtos.EmptyRequestProto request, 046 com.google.protobuf.RpcCallback<org.apache.hadoop.ipc.protobuf.TestProtos.EmptyResponseProto> done); 047 048 /** 049 * <code>rpc error2(.hadoop.common.EmptyRequestProto) returns (.hadoop.common.EmptyResponseProto);</code> 050 */ 051 public abstract void error2( 052 com.google.protobuf.RpcController controller, 053 org.apache.hadoop.ipc.protobuf.TestProtos.EmptyRequestProto request, 054 com.google.protobuf.RpcCallback<org.apache.hadoop.ipc.protobuf.TestProtos.EmptyResponseProto> done); 055 056 } 057 058 public static com.google.protobuf.Service newReflectiveService( 059 final Interface impl) { 060 return new TestProtobufRpcProto() { 061 @java.lang.Override 062 public void ping( 063 com.google.protobuf.RpcController controller, 064 org.apache.hadoop.ipc.protobuf.TestProtos.EmptyRequestProto request, 065 com.google.protobuf.RpcCallback<org.apache.hadoop.ipc.protobuf.TestProtos.EmptyResponseProto> done) { 066 impl.ping(controller, request, done); 067 } 068 069 @java.lang.Override 070 public void echo( 071 com.google.protobuf.RpcController controller, 072 org.apache.hadoop.ipc.protobuf.TestProtos.EchoRequestProto request, 073 com.google.protobuf.RpcCallback<org.apache.hadoop.ipc.protobuf.TestProtos.EchoResponseProto> done) { 074 impl.echo(controller, request, done); 075 } 076 077 @java.lang.Override 078 public void error( 079 com.google.protobuf.RpcController controller, 080 org.apache.hadoop.ipc.protobuf.TestProtos.EmptyRequestProto request, 081 com.google.protobuf.RpcCallback<org.apache.hadoop.ipc.protobuf.TestProtos.EmptyResponseProto> done) { 082 impl.error(controller, request, done); 083 } 084 085 @java.lang.Override 086 public void error2( 087 com.google.protobuf.RpcController controller, 088 org.apache.hadoop.ipc.protobuf.TestProtos.EmptyRequestProto request, 089 com.google.protobuf.RpcCallback<org.apache.hadoop.ipc.protobuf.TestProtos.EmptyResponseProto> done) { 090 impl.error2(controller, request, done); 091 } 092 093 }; 094 } 095 096 public static com.google.protobuf.BlockingService 097 newReflectiveBlockingService(final BlockingInterface impl) { 098 return new com.google.protobuf.BlockingService() { 099 public final com.google.protobuf.Descriptors.ServiceDescriptor 100 getDescriptorForType() { 101 return getDescriptor(); 102 } 103 104 public final com.google.protobuf.Message callBlockingMethod( 105 com.google.protobuf.Descriptors.MethodDescriptor method, 106 com.google.protobuf.RpcController controller, 107 com.google.protobuf.Message request) 108 throws com.google.protobuf.ServiceException { 109 if (method.getService() != getDescriptor()) { 110 throw new java.lang.IllegalArgumentException( 111 "Service.callBlockingMethod() given method descriptor for " + 112 "wrong service type."); 113 } 114 switch(method.getIndex()) { 115 case 0: 116 return impl.ping(controller, (org.apache.hadoop.ipc.protobuf.TestProtos.EmptyRequestProto)request); 117 case 1: 118 return impl.echo(controller, (org.apache.hadoop.ipc.protobuf.TestProtos.EchoRequestProto)request); 119 case 2: 120 return impl.error(controller, (org.apache.hadoop.ipc.protobuf.TestProtos.EmptyRequestProto)request); 121 case 3: 122 return impl.error2(controller, (org.apache.hadoop.ipc.protobuf.TestProtos.EmptyRequestProto)request); 123 default: 124 throw new java.lang.AssertionError("Can't get here."); 125 } 126 } 127 128 public final com.google.protobuf.Message 129 getRequestPrototype( 130 com.google.protobuf.Descriptors.MethodDescriptor method) { 131 if (method.getService() != getDescriptor()) { 132 throw new java.lang.IllegalArgumentException( 133 "Service.getRequestPrototype() given method " + 134 "descriptor for wrong service type."); 135 } 136 switch(method.getIndex()) { 137 case 0: 138 return org.apache.hadoop.ipc.protobuf.TestProtos.EmptyRequestProto.getDefaultInstance(); 139 case 1: 140 return org.apache.hadoop.ipc.protobuf.TestProtos.EchoRequestProto.getDefaultInstance(); 141 case 2: 142 return org.apache.hadoop.ipc.protobuf.TestProtos.EmptyRequestProto.getDefaultInstance(); 143 case 3: 144 return org.apache.hadoop.ipc.protobuf.TestProtos.EmptyRequestProto.getDefaultInstance(); 145 default: 146 throw new java.lang.AssertionError("Can't get here."); 147 } 148 } 149 150 public final com.google.protobuf.Message 151 getResponsePrototype( 152 com.google.protobuf.Descriptors.MethodDescriptor method) { 153 if (method.getService() != getDescriptor()) { 154 throw new java.lang.IllegalArgumentException( 155 "Service.getResponsePrototype() given method " + 156 "descriptor for wrong service type."); 157 } 158 switch(method.getIndex()) { 159 case 0: 160 return org.apache.hadoop.ipc.protobuf.TestProtos.EmptyResponseProto.getDefaultInstance(); 161 case 1: 162 return org.apache.hadoop.ipc.protobuf.TestProtos.EchoResponseProto.getDefaultInstance(); 163 case 2: 164 return org.apache.hadoop.ipc.protobuf.TestProtos.EmptyResponseProto.getDefaultInstance(); 165 case 3: 166 return org.apache.hadoop.ipc.protobuf.TestProtos.EmptyResponseProto.getDefaultInstance(); 167 default: 168 throw new java.lang.AssertionError("Can't get here."); 169 } 170 } 171 172 }; 173 } 174 175 /** 176 * <code>rpc ping(.hadoop.common.EmptyRequestProto) returns (.hadoop.common.EmptyResponseProto);</code> 177 */ 178 public abstract void ping( 179 com.google.protobuf.RpcController controller, 180 org.apache.hadoop.ipc.protobuf.TestProtos.EmptyRequestProto request, 181 com.google.protobuf.RpcCallback<org.apache.hadoop.ipc.protobuf.TestProtos.EmptyResponseProto> done); 182 183 /** 184 * <code>rpc echo(.hadoop.common.EchoRequestProto) returns (.hadoop.common.EchoResponseProto);</code> 185 */ 186 public abstract void echo( 187 com.google.protobuf.RpcController controller, 188 org.apache.hadoop.ipc.protobuf.TestProtos.EchoRequestProto request, 189 com.google.protobuf.RpcCallback<org.apache.hadoop.ipc.protobuf.TestProtos.EchoResponseProto> done); 190 191 /** 192 * <code>rpc error(.hadoop.common.EmptyRequestProto) returns (.hadoop.common.EmptyResponseProto);</code> 193 */ 194 public abstract void error( 195 com.google.protobuf.RpcController controller, 196 org.apache.hadoop.ipc.protobuf.TestProtos.EmptyRequestProto request, 197 com.google.protobuf.RpcCallback<org.apache.hadoop.ipc.protobuf.TestProtos.EmptyResponseProto> done); 198 199 /** 200 * <code>rpc error2(.hadoop.common.EmptyRequestProto) returns (.hadoop.common.EmptyResponseProto);</code> 201 */ 202 public abstract void error2( 203 com.google.protobuf.RpcController controller, 204 org.apache.hadoop.ipc.protobuf.TestProtos.EmptyRequestProto request, 205 com.google.protobuf.RpcCallback<org.apache.hadoop.ipc.protobuf.TestProtos.EmptyResponseProto> done); 206 207 public static final 208 com.google.protobuf.Descriptors.ServiceDescriptor 209 getDescriptor() { 210 return org.apache.hadoop.ipc.protobuf.TestRpcServiceProtos.getDescriptor().getServices().get(0); 211 } 212 public final com.google.protobuf.Descriptors.ServiceDescriptor 213 getDescriptorForType() { 214 return getDescriptor(); 215 } 216 217 public final void callMethod( 218 com.google.protobuf.Descriptors.MethodDescriptor method, 219 com.google.protobuf.RpcController controller, 220 com.google.protobuf.Message request, 221 com.google.protobuf.RpcCallback< 222 com.google.protobuf.Message> done) { 223 if (method.getService() != getDescriptor()) { 224 throw new java.lang.IllegalArgumentException( 225 "Service.callMethod() given method descriptor for wrong " + 226 "service type."); 227 } 228 switch(method.getIndex()) { 229 case 0: 230 this.ping(controller, (org.apache.hadoop.ipc.protobuf.TestProtos.EmptyRequestProto)request, 231 com.google.protobuf.RpcUtil.<org.apache.hadoop.ipc.protobuf.TestProtos.EmptyResponseProto>specializeCallback( 232 done)); 233 return; 234 case 1: 235 this.echo(controller, (org.apache.hadoop.ipc.protobuf.TestProtos.EchoRequestProto)request, 236 com.google.protobuf.RpcUtil.<org.apache.hadoop.ipc.protobuf.TestProtos.EchoResponseProto>specializeCallback( 237 done)); 238 return; 239 case 2: 240 this.error(controller, (org.apache.hadoop.ipc.protobuf.TestProtos.EmptyRequestProto)request, 241 com.google.protobuf.RpcUtil.<org.apache.hadoop.ipc.protobuf.TestProtos.EmptyResponseProto>specializeCallback( 242 done)); 243 return; 244 case 3: 245 this.error2(controller, (org.apache.hadoop.ipc.protobuf.TestProtos.EmptyRequestProto)request, 246 com.google.protobuf.RpcUtil.<org.apache.hadoop.ipc.protobuf.TestProtos.EmptyResponseProto>specializeCallback( 247 done)); 248 return; 249 default: 250 throw new java.lang.AssertionError("Can't get here."); 251 } 252 } 253 254 public final com.google.protobuf.Message 255 getRequestPrototype( 256 com.google.protobuf.Descriptors.MethodDescriptor method) { 257 if (method.getService() != getDescriptor()) { 258 throw new java.lang.IllegalArgumentException( 259 "Service.getRequestPrototype() given method " + 260 "descriptor for wrong service type."); 261 } 262 switch(method.getIndex()) { 263 case 0: 264 return org.apache.hadoop.ipc.protobuf.TestProtos.EmptyRequestProto.getDefaultInstance(); 265 case 1: 266 return org.apache.hadoop.ipc.protobuf.TestProtos.EchoRequestProto.getDefaultInstance(); 267 case 2: 268 return org.apache.hadoop.ipc.protobuf.TestProtos.EmptyRequestProto.getDefaultInstance(); 269 case 3: 270 return org.apache.hadoop.ipc.protobuf.TestProtos.EmptyRequestProto.getDefaultInstance(); 271 default: 272 throw new java.lang.AssertionError("Can't get here."); 273 } 274 } 275 276 public final com.google.protobuf.Message 277 getResponsePrototype( 278 com.google.protobuf.Descriptors.MethodDescriptor method) { 279 if (method.getService() != getDescriptor()) { 280 throw new java.lang.IllegalArgumentException( 281 "Service.getResponsePrototype() given method " + 282 "descriptor for wrong service type."); 283 } 284 switch(method.getIndex()) { 285 case 0: 286 return org.apache.hadoop.ipc.protobuf.TestProtos.EmptyResponseProto.getDefaultInstance(); 287 case 1: 288 return org.apache.hadoop.ipc.protobuf.TestProtos.EchoResponseProto.getDefaultInstance(); 289 case 2: 290 return org.apache.hadoop.ipc.protobuf.TestProtos.EmptyResponseProto.getDefaultInstance(); 291 case 3: 292 return org.apache.hadoop.ipc.protobuf.TestProtos.EmptyResponseProto.getDefaultInstance(); 293 default: 294 throw new java.lang.AssertionError("Can't get here."); 295 } 296 } 297 298 public static Stub newStub( 299 com.google.protobuf.RpcChannel channel) { 300 return new Stub(channel); 301 } 302 303 public static final class Stub extends org.apache.hadoop.ipc.protobuf.TestRpcServiceProtos.TestProtobufRpcProto implements Interface { 304 private Stub(com.google.protobuf.RpcChannel channel) { 305 this.channel = channel; 306 } 307 308 private final com.google.protobuf.RpcChannel channel; 309 310 public com.google.protobuf.RpcChannel getChannel() { 311 return channel; 312 } 313 314 public void ping( 315 com.google.protobuf.RpcController controller, 316 org.apache.hadoop.ipc.protobuf.TestProtos.EmptyRequestProto request, 317 com.google.protobuf.RpcCallback<org.apache.hadoop.ipc.protobuf.TestProtos.EmptyResponseProto> done) { 318 channel.callMethod( 319 getDescriptor().getMethods().get(0), 320 controller, 321 request, 322 org.apache.hadoop.ipc.protobuf.TestProtos.EmptyResponseProto.getDefaultInstance(), 323 com.google.protobuf.RpcUtil.generalizeCallback( 324 done, 325 org.apache.hadoop.ipc.protobuf.TestProtos.EmptyResponseProto.class, 326 org.apache.hadoop.ipc.protobuf.TestProtos.EmptyResponseProto.getDefaultInstance())); 327 } 328 329 public void echo( 330 com.google.protobuf.RpcController controller, 331 org.apache.hadoop.ipc.protobuf.TestProtos.EchoRequestProto request, 332 com.google.protobuf.RpcCallback<org.apache.hadoop.ipc.protobuf.TestProtos.EchoResponseProto> done) { 333 channel.callMethod( 334 getDescriptor().getMethods().get(1), 335 controller, 336 request, 337 org.apache.hadoop.ipc.protobuf.TestProtos.EchoResponseProto.getDefaultInstance(), 338 com.google.protobuf.RpcUtil.generalizeCallback( 339 done, 340 org.apache.hadoop.ipc.protobuf.TestProtos.EchoResponseProto.class, 341 org.apache.hadoop.ipc.protobuf.TestProtos.EchoResponseProto.getDefaultInstance())); 342 } 343 344 public void error( 345 com.google.protobuf.RpcController controller, 346 org.apache.hadoop.ipc.protobuf.TestProtos.EmptyRequestProto request, 347 com.google.protobuf.RpcCallback<org.apache.hadoop.ipc.protobuf.TestProtos.EmptyResponseProto> done) { 348 channel.callMethod( 349 getDescriptor().getMethods().get(2), 350 controller, 351 request, 352 org.apache.hadoop.ipc.protobuf.TestProtos.EmptyResponseProto.getDefaultInstance(), 353 com.google.protobuf.RpcUtil.generalizeCallback( 354 done, 355 org.apache.hadoop.ipc.protobuf.TestProtos.EmptyResponseProto.class, 356 org.apache.hadoop.ipc.protobuf.TestProtos.EmptyResponseProto.getDefaultInstance())); 357 } 358 359 public void error2( 360 com.google.protobuf.RpcController controller, 361 org.apache.hadoop.ipc.protobuf.TestProtos.EmptyRequestProto request, 362 com.google.protobuf.RpcCallback<org.apache.hadoop.ipc.protobuf.TestProtos.EmptyResponseProto> done) { 363 channel.callMethod( 364 getDescriptor().getMethods().get(3), 365 controller, 366 request, 367 org.apache.hadoop.ipc.protobuf.TestProtos.EmptyResponseProto.getDefaultInstance(), 368 com.google.protobuf.RpcUtil.generalizeCallback( 369 done, 370 org.apache.hadoop.ipc.protobuf.TestProtos.EmptyResponseProto.class, 371 org.apache.hadoop.ipc.protobuf.TestProtos.EmptyResponseProto.getDefaultInstance())); 372 } 373 } 374 375 public static BlockingInterface newBlockingStub( 376 com.google.protobuf.BlockingRpcChannel channel) { 377 return new BlockingStub(channel); 378 } 379 380 public interface BlockingInterface { 381 public org.apache.hadoop.ipc.protobuf.TestProtos.EmptyResponseProto ping( 382 com.google.protobuf.RpcController controller, 383 org.apache.hadoop.ipc.protobuf.TestProtos.EmptyRequestProto request) 384 throws com.google.protobuf.ServiceException; 385 386 public org.apache.hadoop.ipc.protobuf.TestProtos.EchoResponseProto echo( 387 com.google.protobuf.RpcController controller, 388 org.apache.hadoop.ipc.protobuf.TestProtos.EchoRequestProto request) 389 throws com.google.protobuf.ServiceException; 390 391 public org.apache.hadoop.ipc.protobuf.TestProtos.EmptyResponseProto error( 392 com.google.protobuf.RpcController controller, 393 org.apache.hadoop.ipc.protobuf.TestProtos.EmptyRequestProto request) 394 throws com.google.protobuf.ServiceException; 395 396 public org.apache.hadoop.ipc.protobuf.TestProtos.EmptyResponseProto error2( 397 com.google.protobuf.RpcController controller, 398 org.apache.hadoop.ipc.protobuf.TestProtos.EmptyRequestProto request) 399 throws com.google.protobuf.ServiceException; 400 } 401 402 private static final class BlockingStub implements BlockingInterface { 403 private BlockingStub(com.google.protobuf.BlockingRpcChannel channel) { 404 this.channel = channel; 405 } 406 407 private final com.google.protobuf.BlockingRpcChannel channel; 408 409 public org.apache.hadoop.ipc.protobuf.TestProtos.EmptyResponseProto ping( 410 com.google.protobuf.RpcController controller, 411 org.apache.hadoop.ipc.protobuf.TestProtos.EmptyRequestProto request) 412 throws com.google.protobuf.ServiceException { 413 return (org.apache.hadoop.ipc.protobuf.TestProtos.EmptyResponseProto) channel.callBlockingMethod( 414 getDescriptor().getMethods().get(0), 415 controller, 416 request, 417 org.apache.hadoop.ipc.protobuf.TestProtos.EmptyResponseProto.getDefaultInstance()); 418 } 419 420 421 public org.apache.hadoop.ipc.protobuf.TestProtos.EchoResponseProto echo( 422 com.google.protobuf.RpcController controller, 423 org.apache.hadoop.ipc.protobuf.TestProtos.EchoRequestProto request) 424 throws com.google.protobuf.ServiceException { 425 return (org.apache.hadoop.ipc.protobuf.TestProtos.EchoResponseProto) channel.callBlockingMethod( 426 getDescriptor().getMethods().get(1), 427 controller, 428 request, 429 org.apache.hadoop.ipc.protobuf.TestProtos.EchoResponseProto.getDefaultInstance()); 430 } 431 432 433 public org.apache.hadoop.ipc.protobuf.TestProtos.EmptyResponseProto error( 434 com.google.protobuf.RpcController controller, 435 org.apache.hadoop.ipc.protobuf.TestProtos.EmptyRequestProto request) 436 throws com.google.protobuf.ServiceException { 437 return (org.apache.hadoop.ipc.protobuf.TestProtos.EmptyResponseProto) channel.callBlockingMethod( 438 getDescriptor().getMethods().get(2), 439 controller, 440 request, 441 org.apache.hadoop.ipc.protobuf.TestProtos.EmptyResponseProto.getDefaultInstance()); 442 } 443 444 445 public org.apache.hadoop.ipc.protobuf.TestProtos.EmptyResponseProto error2( 446 com.google.protobuf.RpcController controller, 447 org.apache.hadoop.ipc.protobuf.TestProtos.EmptyRequestProto request) 448 throws com.google.protobuf.ServiceException { 449 return (org.apache.hadoop.ipc.protobuf.TestProtos.EmptyResponseProto) channel.callBlockingMethod( 450 getDescriptor().getMethods().get(3), 451 controller, 452 request, 453 org.apache.hadoop.ipc.protobuf.TestProtos.EmptyResponseProto.getDefaultInstance()); 454 } 455 456 } 457 458 // @@protoc_insertion_point(class_scope:hadoop.common.TestProtobufRpcProto) 459 } 460 461 /** 462 * Protobuf service {@code hadoop.common.TestProtobufRpc2Proto} 463 */ 464 public static abstract class TestProtobufRpc2Proto 465 implements com.google.protobuf.Service { 466 protected TestProtobufRpc2Proto() {} 467 468 public interface Interface { 469 /** 470 * <code>rpc ping2(.hadoop.common.EmptyRequestProto) returns (.hadoop.common.EmptyResponseProto);</code> 471 */ 472 public abstract void ping2( 473 com.google.protobuf.RpcController controller, 474 org.apache.hadoop.ipc.protobuf.TestProtos.EmptyRequestProto request, 475 com.google.protobuf.RpcCallback<org.apache.hadoop.ipc.protobuf.TestProtos.EmptyResponseProto> done); 476 477 /** 478 * <code>rpc echo2(.hadoop.common.EchoRequestProto) returns (.hadoop.common.EchoResponseProto);</code> 479 */ 480 public abstract void echo2( 481 com.google.protobuf.RpcController controller, 482 org.apache.hadoop.ipc.protobuf.TestProtos.EchoRequestProto request, 483 com.google.protobuf.RpcCallback<org.apache.hadoop.ipc.protobuf.TestProtos.EchoResponseProto> done); 484 485 } 486 487 public static com.google.protobuf.Service newReflectiveService( 488 final Interface impl) { 489 return new TestProtobufRpc2Proto() { 490 @java.lang.Override 491 public void ping2( 492 com.google.protobuf.RpcController controller, 493 org.apache.hadoop.ipc.protobuf.TestProtos.EmptyRequestProto request, 494 com.google.protobuf.RpcCallback<org.apache.hadoop.ipc.protobuf.TestProtos.EmptyResponseProto> done) { 495 impl.ping2(controller, request, done); 496 } 497 498 @java.lang.Override 499 public void echo2( 500 com.google.protobuf.RpcController controller, 501 org.apache.hadoop.ipc.protobuf.TestProtos.EchoRequestProto request, 502 com.google.protobuf.RpcCallback<org.apache.hadoop.ipc.protobuf.TestProtos.EchoResponseProto> done) { 503 impl.echo2(controller, request, done); 504 } 505 506 }; 507 } 508 509 public static com.google.protobuf.BlockingService 510 newReflectiveBlockingService(final BlockingInterface impl) { 511 return new com.google.protobuf.BlockingService() { 512 public final com.google.protobuf.Descriptors.ServiceDescriptor 513 getDescriptorForType() { 514 return getDescriptor(); 515 } 516 517 public final com.google.protobuf.Message callBlockingMethod( 518 com.google.protobuf.Descriptors.MethodDescriptor method, 519 com.google.protobuf.RpcController controller, 520 com.google.protobuf.Message request) 521 throws com.google.protobuf.ServiceException { 522 if (method.getService() != getDescriptor()) { 523 throw new java.lang.IllegalArgumentException( 524 "Service.callBlockingMethod() given method descriptor for " + 525 "wrong service type."); 526 } 527 switch(method.getIndex()) { 528 case 0: 529 return impl.ping2(controller, (org.apache.hadoop.ipc.protobuf.TestProtos.EmptyRequestProto)request); 530 case 1: 531 return impl.echo2(controller, (org.apache.hadoop.ipc.protobuf.TestProtos.EchoRequestProto)request); 532 default: 533 throw new java.lang.AssertionError("Can't get here."); 534 } 535 } 536 537 public final com.google.protobuf.Message 538 getRequestPrototype( 539 com.google.protobuf.Descriptors.MethodDescriptor method) { 540 if (method.getService() != getDescriptor()) { 541 throw new java.lang.IllegalArgumentException( 542 "Service.getRequestPrototype() given method " + 543 "descriptor for wrong service type."); 544 } 545 switch(method.getIndex()) { 546 case 0: 547 return org.apache.hadoop.ipc.protobuf.TestProtos.EmptyRequestProto.getDefaultInstance(); 548 case 1: 549 return org.apache.hadoop.ipc.protobuf.TestProtos.EchoRequestProto.getDefaultInstance(); 550 default: 551 throw new java.lang.AssertionError("Can't get here."); 552 } 553 } 554 555 public final com.google.protobuf.Message 556 getResponsePrototype( 557 com.google.protobuf.Descriptors.MethodDescriptor method) { 558 if (method.getService() != getDescriptor()) { 559 throw new java.lang.IllegalArgumentException( 560 "Service.getResponsePrototype() given method " + 561 "descriptor for wrong service type."); 562 } 563 switch(method.getIndex()) { 564 case 0: 565 return org.apache.hadoop.ipc.protobuf.TestProtos.EmptyResponseProto.getDefaultInstance(); 566 case 1: 567 return org.apache.hadoop.ipc.protobuf.TestProtos.EchoResponseProto.getDefaultInstance(); 568 default: 569 throw new java.lang.AssertionError("Can't get here."); 570 } 571 } 572 573 }; 574 } 575 576 /** 577 * <code>rpc ping2(.hadoop.common.EmptyRequestProto) returns (.hadoop.common.EmptyResponseProto);</code> 578 */ 579 public abstract void ping2( 580 com.google.protobuf.RpcController controller, 581 org.apache.hadoop.ipc.protobuf.TestProtos.EmptyRequestProto request, 582 com.google.protobuf.RpcCallback<org.apache.hadoop.ipc.protobuf.TestProtos.EmptyResponseProto> done); 583 584 /** 585 * <code>rpc echo2(.hadoop.common.EchoRequestProto) returns (.hadoop.common.EchoResponseProto);</code> 586 */ 587 public abstract void echo2( 588 com.google.protobuf.RpcController controller, 589 org.apache.hadoop.ipc.protobuf.TestProtos.EchoRequestProto request, 590 com.google.protobuf.RpcCallback<org.apache.hadoop.ipc.protobuf.TestProtos.EchoResponseProto> done); 591 592 public static final 593 com.google.protobuf.Descriptors.ServiceDescriptor 594 getDescriptor() { 595 return org.apache.hadoop.ipc.protobuf.TestRpcServiceProtos.getDescriptor().getServices().get(1); 596 } 597 public final com.google.protobuf.Descriptors.ServiceDescriptor 598 getDescriptorForType() { 599 return getDescriptor(); 600 } 601 602 public final void callMethod( 603 com.google.protobuf.Descriptors.MethodDescriptor method, 604 com.google.protobuf.RpcController controller, 605 com.google.protobuf.Message request, 606 com.google.protobuf.RpcCallback< 607 com.google.protobuf.Message> done) { 608 if (method.getService() != getDescriptor()) { 609 throw new java.lang.IllegalArgumentException( 610 "Service.callMethod() given method descriptor for wrong " + 611 "service type."); 612 } 613 switch(method.getIndex()) { 614 case 0: 615 this.ping2(controller, (org.apache.hadoop.ipc.protobuf.TestProtos.EmptyRequestProto)request, 616 com.google.protobuf.RpcUtil.<org.apache.hadoop.ipc.protobuf.TestProtos.EmptyResponseProto>specializeCallback( 617 done)); 618 return; 619 case 1: 620 this.echo2(controller, (org.apache.hadoop.ipc.protobuf.TestProtos.EchoRequestProto)request, 621 com.google.protobuf.RpcUtil.<org.apache.hadoop.ipc.protobuf.TestProtos.EchoResponseProto>specializeCallback( 622 done)); 623 return; 624 default: 625 throw new java.lang.AssertionError("Can't get here."); 626 } 627 } 628 629 public final com.google.protobuf.Message 630 getRequestPrototype( 631 com.google.protobuf.Descriptors.MethodDescriptor method) { 632 if (method.getService() != getDescriptor()) { 633 throw new java.lang.IllegalArgumentException( 634 "Service.getRequestPrototype() given method " + 635 "descriptor for wrong service type."); 636 } 637 switch(method.getIndex()) { 638 case 0: 639 return org.apache.hadoop.ipc.protobuf.TestProtos.EmptyRequestProto.getDefaultInstance(); 640 case 1: 641 return org.apache.hadoop.ipc.protobuf.TestProtos.EchoRequestProto.getDefaultInstance(); 642 default: 643 throw new java.lang.AssertionError("Can't get here."); 644 } 645 } 646 647 public final com.google.protobuf.Message 648 getResponsePrototype( 649 com.google.protobuf.Descriptors.MethodDescriptor method) { 650 if (method.getService() != getDescriptor()) { 651 throw new java.lang.IllegalArgumentException( 652 "Service.getResponsePrototype() given method " + 653 "descriptor for wrong service type."); 654 } 655 switch(method.getIndex()) { 656 case 0: 657 return org.apache.hadoop.ipc.protobuf.TestProtos.EmptyResponseProto.getDefaultInstance(); 658 case 1: 659 return org.apache.hadoop.ipc.protobuf.TestProtos.EchoResponseProto.getDefaultInstance(); 660 default: 661 throw new java.lang.AssertionError("Can't get here."); 662 } 663 } 664 665 public static Stub newStub( 666 com.google.protobuf.RpcChannel channel) { 667 return new Stub(channel); 668 } 669 670 public static final class Stub extends org.apache.hadoop.ipc.protobuf.TestRpcServiceProtos.TestProtobufRpc2Proto implements Interface { 671 private Stub(com.google.protobuf.RpcChannel channel) { 672 this.channel = channel; 673 } 674 675 private final com.google.protobuf.RpcChannel channel; 676 677 public com.google.protobuf.RpcChannel getChannel() { 678 return channel; 679 } 680 681 public void ping2( 682 com.google.protobuf.RpcController controller, 683 org.apache.hadoop.ipc.protobuf.TestProtos.EmptyRequestProto request, 684 com.google.protobuf.RpcCallback<org.apache.hadoop.ipc.protobuf.TestProtos.EmptyResponseProto> done) { 685 channel.callMethod( 686 getDescriptor().getMethods().get(0), 687 controller, 688 request, 689 org.apache.hadoop.ipc.protobuf.TestProtos.EmptyResponseProto.getDefaultInstance(), 690 com.google.protobuf.RpcUtil.generalizeCallback( 691 done, 692 org.apache.hadoop.ipc.protobuf.TestProtos.EmptyResponseProto.class, 693 org.apache.hadoop.ipc.protobuf.TestProtos.EmptyResponseProto.getDefaultInstance())); 694 } 695 696 public void echo2( 697 com.google.protobuf.RpcController controller, 698 org.apache.hadoop.ipc.protobuf.TestProtos.EchoRequestProto request, 699 com.google.protobuf.RpcCallback<org.apache.hadoop.ipc.protobuf.TestProtos.EchoResponseProto> done) { 700 channel.callMethod( 701 getDescriptor().getMethods().get(1), 702 controller, 703 request, 704 org.apache.hadoop.ipc.protobuf.TestProtos.EchoResponseProto.getDefaultInstance(), 705 com.google.protobuf.RpcUtil.generalizeCallback( 706 done, 707 org.apache.hadoop.ipc.protobuf.TestProtos.EchoResponseProto.class, 708 org.apache.hadoop.ipc.protobuf.TestProtos.EchoResponseProto.getDefaultInstance())); 709 } 710 } 711 712 public static BlockingInterface newBlockingStub( 713 com.google.protobuf.BlockingRpcChannel channel) { 714 return new BlockingStub(channel); 715 } 716 717 public interface BlockingInterface { 718 public org.apache.hadoop.ipc.protobuf.TestProtos.EmptyResponseProto ping2( 719 com.google.protobuf.RpcController controller, 720 org.apache.hadoop.ipc.protobuf.TestProtos.EmptyRequestProto request) 721 throws com.google.protobuf.ServiceException; 722 723 public org.apache.hadoop.ipc.protobuf.TestProtos.EchoResponseProto echo2( 724 com.google.protobuf.RpcController controller, 725 org.apache.hadoop.ipc.protobuf.TestProtos.EchoRequestProto request) 726 throws com.google.protobuf.ServiceException; 727 } 728 729 private static final class BlockingStub implements BlockingInterface { 730 private BlockingStub(com.google.protobuf.BlockingRpcChannel channel) { 731 this.channel = channel; 732 } 733 734 private final com.google.protobuf.BlockingRpcChannel channel; 735 736 public org.apache.hadoop.ipc.protobuf.TestProtos.EmptyResponseProto ping2( 737 com.google.protobuf.RpcController controller, 738 org.apache.hadoop.ipc.protobuf.TestProtos.EmptyRequestProto request) 739 throws com.google.protobuf.ServiceException { 740 return (org.apache.hadoop.ipc.protobuf.TestProtos.EmptyResponseProto) channel.callBlockingMethod( 741 getDescriptor().getMethods().get(0), 742 controller, 743 request, 744 org.apache.hadoop.ipc.protobuf.TestProtos.EmptyResponseProto.getDefaultInstance()); 745 } 746 747 748 public org.apache.hadoop.ipc.protobuf.TestProtos.EchoResponseProto echo2( 749 com.google.protobuf.RpcController controller, 750 org.apache.hadoop.ipc.protobuf.TestProtos.EchoRequestProto request) 751 throws com.google.protobuf.ServiceException { 752 return (org.apache.hadoop.ipc.protobuf.TestProtos.EchoResponseProto) channel.callBlockingMethod( 753 getDescriptor().getMethods().get(1), 754 controller, 755 request, 756 org.apache.hadoop.ipc.protobuf.TestProtos.EchoResponseProto.getDefaultInstance()); 757 } 758 759 } 760 761 // @@protoc_insertion_point(class_scope:hadoop.common.TestProtobufRpc2Proto) 762 } 763 764 765 public static com.google.protobuf.Descriptors.FileDescriptor 766 getDescriptor() { 767 return descriptor; 768 } 769 private static com.google.protobuf.Descriptors.FileDescriptor 770 descriptor; 771 static { 772 java.lang.String[] descriptorData = { 773 "\n\026test_rpc_service.proto\022\rhadoop.common\032" + 774 "\ntest.proto2\313\002\n\024TestProtobufRpcProto\022K\n\004" + 775 "ping\022 .hadoop.common.EmptyRequestProto\032!" + 776 ".hadoop.common.EmptyResponseProto\022I\n\004ech" + 777 "o\022\037.hadoop.common.EchoRequestProto\032 .had" + 778 "oop.common.EchoResponseProto\022L\n\005error\022 ." + 779 "hadoop.common.EmptyRequestProto\032!.hadoop" + 780 ".common.EmptyResponseProto\022M\n\006error2\022 .h" + 781 "adoop.common.EmptyRequestProto\032!.hadoop." + 782 "common.EmptyResponseProto2\261\001\n\025TestProtob", 783 "ufRpc2Proto\022L\n\005ping2\022 .hadoop.common.Emp" + 784 "tyRequestProto\032!.hadoop.common.EmptyResp" + 785 "onseProto\022J\n\005echo2\022\037.hadoop.common.EchoR" + 786 "equestProto\032 .hadoop.common.EchoResponse" + 787 "ProtoB<\n\036org.apache.hadoop.ipc.protobufB" + 788 "\024TestRpcServiceProtos\210\001\001\240\001\001" 789 }; 790 com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = 791 new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { 792 public com.google.protobuf.ExtensionRegistry assignDescriptors( 793 com.google.protobuf.Descriptors.FileDescriptor root) { 794 descriptor = root; 795 return null; 796 } 797 }; 798 com.google.protobuf.Descriptors.FileDescriptor 799 .internalBuildGeneratedFileFrom(descriptorData, 800 new com.google.protobuf.Descriptors.FileDescriptor[] { 801 org.apache.hadoop.ipc.protobuf.TestProtos.getDescriptor(), 802 }, assigner); 803 } 804 805 // @@protoc_insertion_point(outer_class_scope) 806}