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