Package org.springframework.remoting.support

Examples of org.springframework.remoting.support.DefaultRemoteInvocationExecutor


        TestBean target = new TestBean("myname", 99);
        final JmsServiceExporter exporter = new JmsServiceExporter();
        exporter.setServiceInterface(ITestBean.class);
        exporter.setService(target);
        exporter.setProducer(createJmsProducer());
        exporter.setRemoteInvocationExecutor(new DefaultRemoteInvocationExecutor() {
            public Object invoke(RemoteInvocation invocation, Object targetObject)
                    throws NoSuchMethodException, IllegalAccessException, InvocationTargetException {
                assertNotNull(invocation.getAttributes());
                assertEquals(1, invocation.getAttributes().size());
                assertEquals("myValue", invocation.getAttributes().get("myKey"));
View Full Code Here


        TestBean target = new TestBean("myname", 99);
        final JmsServiceExporter exporter = new JmsServiceExporter();
        exporter.setServiceInterface(ITestBean.class);
        exporter.setService(target);
        exporter.setProducer(createJmsProducer());
        exporter.setRemoteInvocationExecutor(new DefaultRemoteInvocationExecutor() {
            public Object invoke(RemoteInvocation invocation, Object targetObject)
                    throws NoSuchMethodException, IllegalAccessException, InvocationTargetException {
                assertNull(invocation.getAttributes());
                assertNull(invocation.getAttribute("myKey"));
                return super.invoke(invocation, targetObject);
View Full Code Here

                    // Deserialize rmi invocation
                    XStream xstream = new XStream(new DomDriver());
                    SourceTransformer st = new SourceTransformer();
                    Object rmi = xstream.fromXML(st.toString(in.getContent()));

                    DefaultRemoteInvocationExecutor executor = new DefaultRemoteInvocationExecutor();
                    Object result = executor.invoke((RemoteInvocation) rmi, person);

                    // Convert result to an rmi invocation
                    RemoteInvocationResult rmiResult = new RemoteInvocationResult(result);
                    out.setContent(new StringSource(xstream.toXML(rmiResult)));
                } catch (Exception e) {
View Full Code Here

    LoginService loginService;
    RemoteInvocationExecutor remoteInvocationExecutor;
    if(unsecure) {
      monitoringService = CopperMonitorServiceDefaultProxy.getServiceProxy(copperMonitoringService);
      loginService = new DefaultLoginService();
      remoteInvocationExecutor = new DefaultRemoteInvocationExecutor();
    } else {
      monitoringService = CopperMonitorServiceSecurityProxy.secure(copperMonitoringService);
      final SimpleAccountRealm realm = new SimpleAccountRealm();
      realm.addAccount("user1", "pass1");     
      loginService = new SecureLoginService(realm);
View Full Code Here

    TestBean target = new TestBean("myname", 99);

    final HttpInvokerServiceExporter exporter = new HttpInvokerServiceExporter();
    exporter.setServiceInterface(ITestBean.class);
    exporter.setService(target);
    exporter.setRemoteInvocationExecutor(new DefaultRemoteInvocationExecutor() {
      public Object invoke(RemoteInvocation invocation, Object targetObject)
          throws NoSuchMethodException, IllegalAccessException, InvocationTargetException {
        assertNotNull(invocation.getAttributes());
        assertEquals(1, invocation.getAttributes().size());
        assertEquals("myValue", invocation.getAttributes().get("myKey"));
View Full Code Here

    TestBean target = new TestBean("myname", 99);

    final HttpInvokerServiceExporter exporter = new HttpInvokerServiceExporter();
    exporter.setServiceInterface(ITestBean.class);
    exporter.setService(target);
    exporter.setRemoteInvocationExecutor(new DefaultRemoteInvocationExecutor() {
      public Object invoke(RemoteInvocation invocation, Object targetObject)
          throws NoSuchMethodException, IllegalAccessException, InvocationTargetException {
        assertTrue(invocation instanceof TestRemoteInvocation);
        assertNull(invocation.getAttributes());
        assertNull(invocation.getAttribute("myKey"));
View Full Code Here

    TestBean target = new TestBean("myname", 99);

    final HttpInvokerServiceExporter exporter = new HttpInvokerServiceExporter();
    exporter.setServiceInterface(ITestBean.class);
    exporter.setService(target);
    exporter.setRemoteInvocationExecutor(new DefaultRemoteInvocationExecutor() {
      @Override
      public Object invoke(RemoteInvocation invocation, Object targetObject)
          throws NoSuchMethodException, IllegalAccessException, InvocationTargetException {
        assertNotNull(invocation.getAttributes());
        assertEquals(1, invocation.getAttributes().size());
View Full Code Here

    TestBean target = new TestBean("myname", 99);

    final HttpInvokerServiceExporter exporter = new HttpInvokerServiceExporter();
    exporter.setServiceInterface(ITestBean.class);
    exporter.setService(target);
    exporter.setRemoteInvocationExecutor(new DefaultRemoteInvocationExecutor() {
      @Override
      public Object invoke(RemoteInvocation invocation, Object targetObject)
          throws NoSuchMethodException, IllegalAccessException, InvocationTargetException {
        assertTrue(invocation instanceof TestRemoteInvocation);
        assertNull(invocation.getAttributes());
View Full Code Here

TOP

Related Classes of org.springframework.remoting.support.DefaultRemoteInvocationExecutor

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.