Examples of MethodCall


Examples of org.jgroups.blocks.MethodCall

        c2.connect(name);
        Address localAddress2 = c2.getLocalAddress();

        try {
            // call a point-to-point method on Member 2 that triggers a nested distributed RPC
            MethodCall call = new MethodCall("outerMethod", new Object[0], new Class[0]);
            log("calling outerMethod() on " + localAddress2);
            Object retval = disp1.callRemoteMethod(localAddress2, call, GroupRequest.GET_ALL, 0);
            log("results of outerMethod(): " + retval);
        }
        finally {
View Full Code Here

Examples of org.jgroups.blocks.MethodCall

        dests.add(c1.getLocalAddress());
        dests.add(c2.getLocalAddress());

        try {
            // call a point-to-point method on Member 2 that triggers a nested distributed RPC
            MethodCall call = new MethodCall("outerMethod", new Object[0], new Class[0]);
            log("calling outerMethod() on all members");
            RspList rsps = disp1.callRemoteMethods(dests, call, GroupRequest.GET_ALL, 0);
            log("results of outerMethod():\n" + rsps);
            assertEquals(2, rsps.size());
        }
View Full Code Here

Examples of org.jgroups.blocks.MethodCall

            this.disp = rpcDispatcher;
        }

        public String outerMethod() {
            log("**** outerMethod() received, calling innerMethod() on all members");
            MethodCall call = new MethodCall("innerMethod", new Object[0], new Class[0]);
            // RspList rspList = disp.callRemoteMethods(null, call, GroupRequest.GET_ALL, 5000);
            RspList rspList = disp.callRemoteMethods(null, call, GroupRequest.GET_ALL, 0);
            Vector results = rspList.getResults();
            log("results of calling innerMethod():\n" + rspList);
            StringBuffer sb = new StringBuffer("outerMethod[");
View Full Code Here

Examples of org.jgroups.blocks.MethodCall

    }


    public void testOld() {
        try {
            MethodCall mc=new MethodCall("foo", new Object[]{new Integer(22), "Bela"});
            assertEquals(mc.invoke(this), Boolean.TRUE);
        }
        catch(Throwable t) {
            fail(t.toString());
        }
    }
View Full Code Here

Examples of org.jgroups.blocks.MethodCall

        }
    }

    public void testOld2() {
        try {
            MethodCall mc=new MethodCall("bar", new Object[]{new String[]{"one", "two", "three"}, "Bela"});
            mc.invoke(this);
        }
        catch(Throwable t) {
            fail(t.toString());
        }
    }
View Full Code Here

Examples of org.luaj.vm2.ast.Exp.MethodCall

      }
    }

    public void tailCall( Exp e ) {
      if ( e instanceof MethodCall ) {
        MethodCall mc = (MethodCall) e;
        outl("return new TailcallVarargs("+evalLuaValue(mc.lhs)+","+evalStringConstant(mc.name)+","+evalListAsVarargs(mc.args.exps)+");");
      } else if ( e instanceof FuncCall ) {
        FuncCall fc = (FuncCall) e;
        outl("return new TailcallVarargs("+evalLuaValue(fc.lhs)+","+evalListAsVarargs(fc.args.exps)+");");
      } else {
View Full Code Here

Examples of org.omegahat.Environment.Parser.Parse.MethodCall

*/
public String evalMethod(String objKey, String methodName, String[] argumentKeys, String resultKey)
  throws Throwable
{
ExpressionInt expr = null;
    expr = new MethodCall(new Name(objKey), methodName, argsToList(argumentKeys));
if(resultKey != null) {
   expr = new AssignExpression(new Name(resultKey), expr);
}

  return(eval(resultKey, expr));
View Full Code Here

Examples of org.openengsb.core.api.remote.MethodCall

     */
    public static void main(String[] args) throws Exception {
        LOGGER.info("initializing");
        init();
        LOGGER.info("initialized");
        MethodCall methodCall =
            new MethodCall("doSomething", new Object[]{ "Hello World!" }, ImmutableMap.of("serviceId",
                "example+example+testlog", "contextId", "foo"));
        LOGGER.info("calling method");
        MethodResult methodResult = call(methodCall);
        System.out.println(methodResult);

View Full Code Here

Examples of org.openengsb.ui.admin.model.MethodCall

        setupAndStartTestClientPage();
        setServiceInDropDown("testdomain+testconnector+test-service");

        @SuppressWarnings("unchecked")
        Form<MethodCall> form = (Form<MethodCall>) tester.getComponentFromLastRenderedPage("methodCallForm");
        MethodCall modelObject = form.getModelObject();
        ServiceId reference = new ServiceId(TestInterface.class, "testdomain+testconnector+test-service");
        Assert.assertEquals(reference.toString(), modelObject.getService().toString());
    }
View Full Code Here

Examples of org.tinyuml.util.MethodCall

   * Tests usage of the MethodCall class.
   * @throws Exception if error occurred
   */
  public void testMethodCall() throws Exception {
    MyObject myobj = new MyObject();
    MethodCall mycall = new MethodCall(myobj.getClass().getMethod("mymethod",
      String.class), "wascalled");
    mycall.call(myobj);
    assertEquals("wascalled", myobj.callparam);
  }
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.