Examples of RemoteInvocation


Examples of org.jboss.remoting.invocation.RemoteInvocation

   }

  
   public ArrayList list() throws RemoteConnectionException, ShuttingDownException
   {
      RemoteInvocation invocation = new RemoteInvocation("list", null);
     
      try
      {
         return (ArrayList) managerClient.invoke(invocation);
      }
View Full Code Here

Examples of org.jmanage.core.remote.RemoteInvocation

        logger.log(Level.FINE, "Invoking service method: {0}",
                method.getDeclaringClass().getName() + ":" + method.getName());

        try {
            RemoteInvocation invocation = new RemoteInvocation(method, args);
            return invoke(invocation);
        } catch (ConnectException e) {
            throw new ServiceException(ErrorCodes.JMANAGE_SERVER_CONNECTION_FAILED,
                    JManageProperties.getJManageURL());
        }
View Full Code Here

Examples of org.jmanage.core.remote.RemoteInvocation

        response.setContentType(RESPONSE_CONTENT_TYPE);
        try {
            /* get the RemoteInvocation object */
            ServletInputStream sis = request.getInputStream();
            ObjectInputStream ois = new ObjectInputStream(sis);
            RemoteInvocation invocation = (RemoteInvocation) ois.readObject();
            ois.close();
            /* execute the method */
            InvocationResult result = ServiceCallHandler.execute(invocation);
            /* write the result */
            ServletOutputStream sos = response.getOutputStream();
View Full Code Here

Examples of org.springframework.remoting.support.RemoteInvocation

        }
    }

    public void onMessage(Message message) {
        try {
            RemoteInvocation invocation = marshaller.readRemoteInvocation(message);
            if (invocation != null) {
                boolean oneway = false;
                if (invocation instanceof LingoInvocation) {
                    LingoInvocation lingoInvocation = (LingoInvocation) invocation;
                    oneway = lingoInvocation.getMetadata().isOneWay();
View Full Code Here

Examples of org.springframework.remoting.support.RemoteInvocation

        pfb.setServiceInterface(ITestBean.class);
        pfb.setServiceUrl("http://myurl");
        pfb.setRequestor(createRequestor(getDestinationName()));
        pfb.setRemoteInvocationFactory(new LingoRemoteInvocationFactory(strategy) {
            public RemoteInvocation createRemoteInvocation(MethodInvocation methodInvocation) {
                RemoteInvocation invocation = super.createRemoteInvocation(methodInvocation);
                invocation.addAttribute("myKey", "myValue");
                try {
                    invocation.addAttribute("myKey", "myValue");
                    fail("Should have thrown IllegalStateException");
                }
                catch (IllegalStateException ex) {
                    // expected: already defined
                }
                assertNotNull(invocation.getAttributes());
                assertEquals(1, invocation.getAttributes().size());
                assertEquals("myValue", invocation.getAttributes().get("myKey"));
                assertEquals("myValue", invocation.getAttribute("myKey"));
                return invocation;
            }
        });
        configure(pfb);
View Full Code Here

Examples of org.springframework.remoting.support.RemoteInvocation

        pfb.setServiceInterface(ITestBean.class);
        pfb.setServiceUrl("http://myurl");
        pfb.setRequestor(createRequestor(getDestinationName()));
        pfb.setRemoteInvocationFactory(new LingoRemoteInvocationFactory(strategy) {
            public RemoteInvocation createRemoteInvocation(MethodInvocation methodInvocation) {
                RemoteInvocation invocation = super.createRemoteInvocation(methodInvocation);
                assertNull(invocation.getAttributes());
                assertNull(invocation.getAttribute("myKey"));
                return invocation;
            }
        });
        configure(pfb);
View Full Code Here

Examples of org.springframework.remoting.support.RemoteInvocation

        this.pojo = pojo;
        this.marshaller = marshaller;
    }

    public boolean handle(Message message) throws JMSException {
        RemoteInvocation invocation = marshaller.readRemoteInvocation(message);
        try {
            invoke(invocation, pojo);
        }
        catch (NoSuchMethodException e) {
            onException(invocation, e);
View Full Code Here

Examples of org.springframework.remoting.support.RemoteInvocation

    XmlRpcRequest request = new XmlRpcRequest();
    request.setMethodName(methodName);
    request.setParameters(parameters);

    RemoteInvocation remoteInvocation = this.serviceExporter
        .findMatchingMethod(request);

    assertEquals("<Method name>", methodName, remoteInvocation.getMethodName());

    Class[] expectedParameterTypes = { Long.class };
    Class[] actualParameterTypes = remoteInvocation.getParameterTypes();
    assertTrue("<Parameter Types>. Expected: '"
        + Arrays.toString(expectedParameterTypes) + "' but was: '"
        + Arrays.toString(actualParameterTypes), Arrays.equals(
        expectedParameterTypes, actualParameterTypes));

    Object[] expectedArguments = { customerId };
    Object[] actualArguments = remoteInvocation.getArguments();

    assertTrue("<Arguments>. Expected: '" + Arrays.toString(expectedArguments)
        + "' but was: '" + Arrays.toString(actualArguments), Arrays.equals(
        expectedArguments, actualArguments));
  }
View Full Code Here

Examples of org.springframework.remoting.support.RemoteInvocation

    XmlRpcRequest request = new XmlRpcRequest();
    request.setMethodName(methodName);
    request.setParameters(parameters);
   
    RemoteInvocation invocation = new RemoteInvocation();
    invocation.setMethodName("getCustomerName");
    invocation.setParameterTypes(new Class[] { Long.class });
    invocation.setArguments(new Object[] { argument });

    // expectation: call the service method.
    this.myService.getCustomerName(argument);
    this.myServiceControl.setReturnValue(customerName);
View Full Code Here

Examples of org.springframework.remoting.support.RemoteInvocation

    if (targetMethod == null) {
      throw new XmlRpcMethodNotFoundException("Unable to find method "
          + Strings.quote(requestMethodName) + "");
    }

    RemoteInvocation invocation = new RemoteInvocation(targetMethod.getName(),
        targetMethod.getParameterTypes(), arguments);
    return invocation;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.