Package com.google.gwt.user.server.rpc

Examples of com.google.gwt.user.server.rpc.RPCRequest


   */
  public String processCall(String payload) throws SerializationException
  {   
  //  Normal processing
  //
    RPCRequest rpcRequest = null;
    try
    {
    // Decode request
    //
         rpcRequest = RPCCopy.getInstance().decodeRequest(payload, this.getClass(), this);
       
      //  Invoke method
      //
         HibernateRPCHelper.parseInputParameters(rpcRequest, _beanManager,
                                getThreadLocalRequest().getSession());
         Object returnValue = RPCCopy.getInstance().invoke(this, rpcRequest.getMethod(),
                             rpcRequest.getParameters(),
                             rpcRequest.getSerializationPolicy());
       
         returnValue = HibernateRPCHelper.parseReturnValue(returnValue, _beanManager);
       
      //  Encode response
      // 
        return RPCCopy.getInstance().encodeResponseForSuccess(rpcRequest.getMethod(),
                                      returnValue,
                                      rpcRequest.getSerializationPolicy());
       
      }
    catch (InvocationTargetException e)
    {
      return RPCCopy.getInstance().encodeResponseForFailure(rpcRequest.getMethod(), e.getCause());
    }
    catch (IncompatibleRemoteServiceException ex)
    {
          return RPCCopy.getInstance().encodeResponseForFailure(null, ex);
      }
View Full Code Here


        log.error( e.getMessage(), e );
        throw e;
      }
    }
    else {
      RPCRequest rpcRequest = RPC.decodeRequest( payload, this.getClass(), this );
      return RPC.encodeResponseForFailure( rpcRequest.getMethod(), new GWTInvalidSessionException() );
    }
  }
View Full Code Here

    assert clientOracle != null : "clientOracle";
    assert payload != null : "payload";
    assert stream != null : "stream";

    try {
      RPCRequest rpcRequest = RPC.decodeRequest(payload, this.getClass(),
          clientOracle);
      onAfterRequestDeserialized(rpcRequest);
      RPC.invokeAndStreamResponse(this, rpcRequest.getMethod(),
          rpcRequest.getParameters(), clientOracle, stream);
    } catch (RemoteException ex) {
      throw new SerializationException("An exception was sent from the client",
          ex.getCause());
    } catch (IncompatibleRemoteServiceException ex) {
      log(
View Full Code Here

  public String processCall(String payload) throws SerializationException {
    // First, check for possible XSRF situation
    checkPermutationStrongName();

    try {
      RPCRequest rpcRequest = RPC.decodeRequest(payload, delegate.getClass(), this);
      onAfterRequestDeserialized(rpcRequest);
      return RPC.invokeAndEncodeResponse(delegate, rpcRequest.getMethod(),
          rpcRequest.getParameters(), rpcRequest.getSerializationPolicy(),
          rpcRequest.getFlags());
    } catch (IncompatibleRemoteServiceException ex) {
      log(
          "An IncompatibleRemoteServiceException was thrown while processing this call.",
          ex);
      return RPC.encodeResponseForFailure(null, ex);
View Full Code Here

        Object[] parameterValues = new Object[parameterTypes.length];
        for (int i = 0; i < parameterValues.length; i++) {
          parameterValues[i] = streamReader.deserializeValue(parameterTypes[i]);
        }

        return new RPCRequest(method, parameterValues, rpcToken,
            serializationPolicy, streamReader.getFlags());

      } catch (NoSuchMethodException e) {
        throw new IncompatibleRemoteServiceException(
            formatMethodNotFoundErrorMessage(serviceIntf, serviceMethodName,
View Full Code Here

    assert clientOracle != null : "clientOracle";
    assert payload != null : "payload";
    assert stream != null : "stream";

    try {
      RPCRequest rpcRequest = RPC.decodeRequest(payload, delegate.getClass(),
          clientOracle);
      onAfterRequestDeserialized(rpcRequest);
      RPC.invokeAndStreamResponse(delegate, rpcRequest.getMethod(),
          rpcRequest.getParameters(), clientOracle, stream);
    } catch (RemoteException ex) {
      throw new SerializationException("An exception was sent from the client",
          ex.getCause());
    } catch (IncompatibleRemoteServiceException ex) {
      log(
View Full Code Here

          Object o = CommandSerializationUtil.getAccessor(parameterTypes[i]).readNext(
              streamReader);
          parameterValues[i] = o;
        }

        return new RPCRequest(method, parameterValues, null, 0);

      } catch (NoSuchMethodException e) {
        throw new IncompatibleRemoteServiceException(
            formatMethodNotFoundErrorMessage(serviceIntf, serviceMethodName,
                parameterTypes));
View Full Code Here

    assert clientOracle != null : "clientOracle";
    assert payload != null : "payload";
    assert stream != null : "stream";

    try {
      RPCRequest rpcRequest = RPC.decodeRequest(payload, delegate.getClass(),
          clientOracle);
      onAfterRequestDeserialized(rpcRequest);
      RPC.invokeAndStreamResponse(delegate, rpcRequest.getMethod(),
          rpcRequest.getParameters(), clientOracle, stream);
    } catch (RemoteException ex) {
      throw new SerializationException("An exception was sent from the client",
          ex.getCause());
    } catch (IncompatibleRemoteServiceException ex) {
      log(
View Full Code Here

TOP

Related Classes of com.google.gwt.user.server.rpc.RPCRequest

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.