Package rocket.remoting.client

Examples of rocket.remoting.client.RpcException


          break;
        }
      }

      if (false == thrown) {
        result = new RpcException(caught.getMessage());
      }
      exceptionWasThrown = true;

    } catch (final RuntimeException runtimeException) {
      exceptionWasThrown = true;
      result = new RpcException(runtimeException.getMessage());
    } catch (final Throwable throwable) {
      exceptionWasThrown = true;
      result = new RpcException(throwable.getMessage());
    }

    // write the result...
    outputStream.writeBoolean(exceptionWasThrown);
    outputStream.writeObject(result);
View Full Code Here


    }
    return classs;
  }

  protected void throwNotAnInterface(final Class classs) {
    throw new RpcException("The requested interface is not an interface, class: " + classs);
  }
View Full Code Here

      this.throwInterfaceNotImplemented(interfacee, serviceProviderClass);
    }
  }

  protected void throwInterfaceNotImplemented(final Class interfacee, final Class serviceProvider) {
    throw new RpcException("The service provider " + serviceProvider + " does not implement the interface " + interfacee);
  }
View Full Code Here

      for (int i = 0; i < parameterCount; i++) {
        parameterTypes[i] = this.getClass(parameterTypeNames[i]);
      }
      return interfacee.getMethod(methodName, parameterTypes);
    } catch (final NoSuchMethodException noSuchMethodException) {
      throw new RpcException(noSuchMethodException);
    }
  }
View Full Code Here

   */
  protected Class getClass(final String typeName) {
    try {
      return Class.forName(typeName);
    } catch (final ExceptionInInitializerError error) {
      throw new RpcException(error);
    } catch (final LinkageError error) {
      throw new RpcException(error);
    } catch (final ClassNotFoundException exception) {
      throw new RpcException(exception);
    }
  }
View Full Code Here

   *
   * @param throwable
   *            A throwable holding what went wrong.
   */
  protected void onFailedRequest(final Throwable throwable) {
    final Throwable wrapper = new RpcException("Call to server failed: " + throwable.getMessage(), throwable);
    this.getCallback().onFailure(wrapper);
  }
View Full Code Here

   * @param request
   * @param response
   */
  protected void onFailedResponse(final Request request, final Response response) {
    this.getCallback().onFailure(
        new RpcException("Call failed on server, " + response.getStatusText() + "(" + response.getStatusCode() + ")"));
  }
View Full Code Here

TOP

Related Classes of rocket.remoting.client.RpcException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.