12a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)// Protocol Buffers - Google's data interchange format
22a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)// Copyright 2008 Google Inc.  All rights reserved.
32a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)// http://code.google.com/p/protobuf/
42a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)//
52a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)// Redistribution and use in source and binary forms, with or without
62a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)// modification, are permitted provided that the following conditions are
72a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)// met:
82a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)//
92a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)//     * Redistributions of source code must retain the above copyright
102a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)// notice, this list of conditions and the following disclaimer.
112a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)//     * Redistributions in binary form must reproduce the above
122a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)// copyright notice, this list of conditions and the following disclaimer
132a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)// in the documentation and/or other materials provided with the
142a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)// distribution.
152a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)//     * Neither the name of Google Inc. nor the names of its
162a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)// contributors may be used to endorse or promote products derived from
172a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)// this software without specific prior written permission.
182a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)//
192a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
202a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
212a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
222a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
232a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
242a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
252a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
262a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
272a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
282a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
292a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
302a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)
312a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)package com.google.protobuf;
322a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)
332a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)/**
342a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) * Blocking equivalent to {@link Service}.
352a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) *
362a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) * @author kenton@google.com Kenton Varda
372a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) * @author cpovirk@google.com Chris Povirk
382a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) */
392a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)public interface BlockingService {
402a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  /**
412a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)   * Equivalent to {@link Service#getDescriptorForType}.
422a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)   */
432a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  Descriptors.ServiceDescriptor getDescriptorForType();
442a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)
452a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  /**
462a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)   * Equivalent to {@link Service#callMethod}, except that
472a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)   * {@code callBlockingMethod()} returns the result of the RPC or throws a
482a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)   * {@link ServiceException} if there is a failure, rather than passing the
492a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)   * information to a callback.
502a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)   */
512a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  Message callBlockingMethod(Descriptors.MethodDescriptor method,
522a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)                             RpcController controller,
532a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)                             Message request) throws ServiceException;
542a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)
552a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  /**
562a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)   * Equivalent to {@link Service#getRequestPrototype}.
572a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)   */
582a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  Message getRequestPrototype(Descriptors.MethodDescriptor method);
592a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)
602a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  /**
612a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)   * Equivalent to {@link Service#getResponsePrototype}.
622a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)   */
632a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  Message getResponsePrototype(Descriptors.MethodDescriptor method);
642a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)}
65