Examples of invoke()


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

                                    Object result = null;
                                    boolean success = false;

                                    try {
                                        result = epr.invoke(operation, args);
                                        success = true;
                                    } catch (Exception e) {
                                      e.printStackTrace();
                                        partnerRoleMessageExchange.replyWithFailure(MessageExchange.FailureType.OTHER,
                                                                                    e.getMessage(),
View Full Code Here

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

        RuntimeWire wire = componentService.getRuntimeWire(binding, serviceContract);
        Operation jsonOperation = findOperation(method);
        Object result = null;
        JSONObject jsonResponse = new JSONObject();
        try {
            result = wire.invoke(jsonOperation, args);
            try {
                jsonResponse.put("result", result);
                jsonResponse.putOpt("id", id);
            } catch (Exception e) {
                throw new ServiceRuntimeException(e);
View Full Code Here

Examples of org.apache.tuscany.spi.wire.Interceptor.invoke()

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

Examples of org.apache.tuscany.spi.wire.TargetInvoker.invoke()

    public Message invoke(Message msg) throws InvocationRuntimeException {
        TargetInvoker invoker = msg.getTargetInvoker();
        if (invoker == null) {
            throw new InvocationRuntimeException("No target invoker specified on message");
        }
        return invoker.invoke(msg);
    }

    public void setNext(Interceptor next) {
        throw new IllegalStateException("This interceptor must be the last one in an target interceptor chain");
    }
View Full Code Here

Examples of org.apache.tuscany.spi.wire.WireInvocationHandler.invoke()

   
    public void testIntercept() throws SecurityException, NoSuchMethodException, Throwable {
        WireInvocationHandler h2 = createMock(WireInvocationHandler.class);
        Method method = Runnable.class.getDeclaredMethod("run", new Class[]{});
        Object[] noArgs = new Object[]{};
        expect(h2.invoke(method, noArgs)).andReturn("foo");
        replay(h2);
        RemoteMethodHandler handler = new RemoteMethodHandler(h2, Runnable.class);
        Object o = handler.intercept(null, method, noArgs, null);
        assertEquals("foo", o);
    }
View Full Code Here

Examples of org.apache.velocity.util.introspection.VelMethod.invoke()

             *  as long as things are peachy, we can return an empty
             *  String so ASTReference() correctly figures out that
             *  all is well.
             */

            Object obj = method.invoke(o, params);
           
            if (obj == null)
            {
                if( method.getReturnType() == Void.TYPE)
                {
View Full Code Here

Examples of org.apache.velocity.util.introspection.VelPropertyGet.invoke()

         *  now try and execute.  If we get a MIE, throw that
         *  as the app wants to get these.  If not, log and punt.
         */
        try
        {
            return vg.invoke(o);
        }
        catch(InvocationTargetException ite)
        {
            /*
             *  if we have an event cartridge, see if it wants to veto
View Full Code Here

Examples of org.apache.velocity.util.introspection.VelPropertySet.invoke()

                {
                  return false;
                }
            }

            vs.invoke(result, value);
        }
        catch(InvocationTargetException ite)
        {
            /*
             *  this is possible
View Full Code Here

Examples of org.apache.webbeans.decorator.DelegateHandler.invoke()

            }
            else
            {
                // We only have decorators, so run the decorator stack directly without interceptors.
                // The delegate handler knows about the ejbContext.proceed()
                rv = delegateHandler.invoke(instance, method, null, arguments);   
            }
        }
        else
        {
            // We have at least one interceptor.  Our delegateHandler will need to be wrapped in an interceptor.
View Full Code Here

Examples of org.apache.wicket.RequestListenerInterface.invoke()

      .forName(interfaceName);
    if (listenerInterface == null)
    {
      throw new WicketRuntimeException("unable to find listener interface " + interfaceName);
    }
    listenerInterface.invoke(page, component);
  }

  public void respond(RequestCycle requestCycle)
  {
    Page page = getPage(requestCycle);
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.