Examples of invoke()


Examples of org.apache.tuscany.core.wire.jdk.JDKOutboundInvocationHandler.invoke()

        //chains.put(echo, chain);
        OutboundWire wire = new OutboundWireImpl();
        wire.addInvocationChain(operation, chain);
        wire.setServiceContract(contract);
        JDKOutboundInvocationHandler handler = new JDKOutboundInvocationHandler(wire, new WorkContextImpl());
        assertEquals("foo", handler.invoke(null, echo, new String[]{"foo"}));
        assertEquals(1, interceptor.getCount());
    }

    public void setUp() throws Exception {
        super.setUp();
View Full Code Here

Examples of org.apache.tuscany.sca.binding.corba.impl.reference.DynaCorbaRequest.invoke()

            if (msg.getOperation().getFaultTypes() != null) {
                for (DataType<?> type : msg.getOperation().getFaultTypes()) {
                    request.addExceptionType(type.getPhysical());
                }
            }
            DynaCorbaResponse response = request.invoke();
            msg.setBody(response.getContent());
        } catch (RequestConfigurationException e) {
            throw new ServiceRuntimeException(e);
        } catch (Exception e) {
            msg.setFaultBody(e);
View Full Code Here

Examples of org.apache.tuscany.sca.binding.corba.provider.reference.DynaCorbaRequest.invoke()

            if (msg.getOperation().getFaultTypes() != null) {
                for (DataType<?> type : msg.getOperation().getFaultTypes()) {
                    request.addExceptionType(type.getPhysical());
                }
            }
            DynaCorbaResponse response = request.invoke();
            msg.setBody(response.getContent());
        } catch (RequestConfigurationException e) {
            throw new ServiceRuntimeException(e);
        } catch (Exception e) {
            msg.setFaultBody(e);
View Full Code Here

Examples of org.apache.tuscany.sca.binding.ejb.util.EJBHandler.invoke()

        } else {
            methodName = operation.getName();
        }

        // invoke business method on ejb
        Object response = ejbHandler.invoke(methodName, (Object[])payload);

        return response;
    }

    protected NamingEndpoint getNamingEndpoint() {
View Full Code Here

Examples of org.apache.tuscany.sca.core.invocation.CallbackInterfaceInterceptor.invoke()

        EasyMock.replay(next);
        interceptor.setNext(next);
        Message msg = new MessageFactoryImpl().createMessage();
        msg.setFrom(new EndpointReferenceImpl("uri"));
        msg.getFrom().getReferenceParameters().setCallbackObjectID("ABC");
        interceptor.invoke(msg);
        EasyMock.verify(next);
    }

    public void testNoCallbackObject() {
        CallbackInterfaceInterceptor interceptor = new CallbackInterfaceInterceptor();
View Full Code Here

Examples of org.apache.tuscany.sca.core.invocation.NonBlockingInterceptor.invoke()

        Interceptor next = EasyMock.createMock(Interceptor.class);
        EasyMock.expect(next.invoke(EasyMock.eq(msg))).andReturn(msg);
        EasyMock.replay(next);
        EasyMock.replay(msg);
        Interceptor interceptor = new NonBlockingInterceptor(scheduler, next);
        interceptor.invoke(msg);
        verify(context);
        verify(next);
        verify(msg);
    }
View Full Code Here

Examples of org.apache.tuscany.sca.implementation.notification.NotificationComponentInvoker.invoke()

        Invoker localNotificationInvoker = new NotificationComponentInvoker(operation, component);
       
        Message msg = EasyMock.createNiceMock(Message.class);
        EasyMock.expect(msg.getBody()).andReturn("msg").times(3)// once per sub int + once in notif target invoker
        EasyMock.replay(msg);
        localNotificationInvoker.invoke(msg);
        EasyMock.verify(msg);
        } catch(Throwable e) {
            e.printStackTrace();
        }
    }
View Full Code Here

Examples of org.apache.tuscany.sca.invocation.Interceptor.invoke()

        ThreadMessageContext.setMessageContext(context);
        Message msg = createMock(Message.class);
        //TODO port to the new way of dealing with conversation IDs later
        //msg.setConversationID(convID);
        Interceptor next = EasyMock.createMock(Interceptor.class);
        EasyMock.expect(next.invoke(EasyMock.eq(msg))).andReturn(msg);
        EasyMock.replay(next);
        EasyMock.replay(msg);
        Interceptor interceptor = new NonBlockingInterceptor(scheduler, next);
        interceptor.invoke(msg);
        verify(context);
View Full Code Here

Examples of org.apache.tuscany.sca.invocation.Invoker.invoke()

            throw new IllegalStateException("No getLocationURL operation found on target component");
        }

        // Get the location URL
        Message message = messageFactory.createMessage();
        message = getLocationInvoker.invoke(message);
        URL locationURL = message.getBody();
       
        // If resource is a file, register the parent dir
        try {
            if( locationURL.getProtocol().equals("file")) {
View Full Code Here

Examples of org.apache.tuscany.sca.runtime.RuntimeEndpoint.invoke()

        final Object[] args = JSONUtil.decodeJsonParamsForOperation(jsonData, operation);
        Message msg = createMessageWithMockedCometReference(args, sessionId, callbackMethod);
        boolean isVoidReturnType = operation.getOutputType().getLogical().isEmpty();
        if (!isVoidReturnType) {
            Object response = wire.invoke(operation, args);
            Broadcaster broadcaster = CometSessionManager.get(sessionId);
            if (broadcaster != null) {
                broadcaster.broadcast(callbackMethod + "($.secureEvalJSON('" + JSONUtil.encodeResponse(response)
                        + "'))");
            }
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.