Examples of MethodCall


Examples of org.jgroups.blocks.MethodCall

    disp = new RpcDispatcher(channel, messageListener, membershipListener, rpcMethods);
    channel.connect("RpcDispatcherContentTestGroup");
   
    Util.sleep(1000);
    String param = channel.getName();
    MethodCall call = new MethodCall("getNodeName", new Object[]{param}, new Class[]{String.class});
    logger.info("Call all members getNodeName()");
    RequestOptions requestOptions = new RequestOptions(ResponseMode.GET_ALL, 0);
   
    System.out.println("Responses:");
    List<String> list = rsp_list.getResults();
View Full Code Here

Examples of org.jgroups.blocks.MethodCall

    disp = new RpcDispatcher(channel, messageListener, membershipListener, rpcMethods);
    channel.connect("RspFilterTestGroup");
   
    Util.sleep(1000);
    String param = channel.getName();
    MethodCall call = new MethodCall("getNodeName", new Object[]{param}, new Class[]{String.class});
    logger.info("Call all members getNodeName()");
    RequestOptions requestOptions = new RequestOptions(ResponseMode.GET_ALL, 0, false, new MyRspFilter());   
    rsp_list = disp.callRemoteMethods(null, call, requestOptions);
   
    System.out.println("Responses:");
View Full Code Here

Examples of org.jgroups.blocks.MethodCall

      String viewId = null;
      if(null != channel.getView()) {
        viewId = channel.getView().getViewId().toString();
      }
      Content content = new Content(i, channel.getName(), viewId);
      MethodCall call = new MethodCall("updateContent", new Object[]{content}, new Class[]{Content.class});
      logger.info("Call all group members updatecontent method: " + content);
      rsp_list = disp.callRemoteMethods(null, call, requestOptions);
     
      showRspList(rsp_list);
    }
View Full Code Here

Examples of org.jgroups.blocks.MethodCall

      String viewId = null;
      if(null != channel.getView()) {
        viewId = channel.getView().getViewId().toString();
      }
      Content content = new Content(i, channel.getName(), viewId);
      MethodCall call = new MethodCall("updateContent", new Object[]{content}, new Class[]{Content.class});
      logger.info("Call all group members updatecontent method: " + content);
     
      NotifyingFuture<RspList<Content>> future = disp.callRemoteMethodsWithFuture(null, call, requestOptions);
     
      Util.sleep(1000);
View Full Code Here

Examples of org.jgroups.blocks.MethodCall

    String viewId = null;
    if(null != channel.getView()) {
      viewId = channel.getView().getViewId().toString();
    }
    Content content = new Content(1, channel.getName(), viewId);
    MethodCall call = new MethodCall("updateContent", new Object[]{content}, new Class[]{Content.class});
    logger.info("Call all group members updatecontent method: " + content);
    rsp_list = disp.callRemoteMethods(null, call, requestOptions);
   
    System.out.println("Responses:");
    List<Content> list = rsp_list.getResults();
View Full Code Here

Examples of org.jgroups.blocks.MethodCall

    logger.info(" -> View Id: " + channel.getView().getViewId());
    logger.info(" -> View Creater: " + channel.getView().getCreator());
    logger.info(" -> View Coordinator: " + channel.getView().getMembers().get(0));
    logger.info(" -> View Memembers: " + channel.getView().getMembers() + "\n");
   
    MethodCall method_call = new MethodCall("getUser", new Object[]{101, "RPC remote test", new User(1000, "Kylin Soong", "IT")}, new Class[]{int.class, String.class, User.class});
   
//    String methodName = RpcDispatcherTest.class.getMethod("getUser", new Class[] {int.class, String.class, User.class}).getName();
//    System.out.println(methodName);
   
    for (int i = 0; i < 5; i++){
View Full Code Here

Examples of org.jgroups.blocks.MethodCall

                }
                else {
                    try {

                            if(log.isInfoEnabled()) log.info("sending LEAVE request to " + coord);
                        MethodCall call = new MethodCall("handleLeave", new Object[] {mbr, Boolean.FALSE},
                            new String[] {Address.class.getName(), boolean.class.getName()});
                        gms.callRemoteMethod(coord, call, GroupRequest.GET_NONE, 0)// asynchronous
                    }
                    catch(Exception e) {
                    }
View Full Code Here

Examples of org.jgroups.blocks.MethodCall

  /* Call the handleFlush() method of all existing members. The highest seqnos seen by the coord
     is the argument */
   if(log.isInfoEnabled()) log.info("calling handleFlush(" + dests + ')');
  passDown(new Event(Event.SWITCH_OUT_OF_BAND)); // we need out-of-band control for FLUSH ...
  MethodCall call = new MethodCall("handleFlush", new Object[] {dests, highest_delivered_msgs.clone()},
    new String[] {Vector.class.getName(), long[].class.getName()});
  rsp_list=callRemoteMethods(dests, call, GroupRequest.GET_ALL, 0);
   if(log.isInfoEnabled()) log.info("flush done");


View Full Code Here

Examples of org.jgroups.blocks.MethodCall

            }

            synchronized(view_installation_mutex) {
                try {
                    if(log.isInfoEnabled()) log.info("sending handleJoin() to " + coord);
                    MethodCall call=new MethodCall("handleJoin", new Object[]{mbr}, new Class[]{Address.class});
                    gms.callRemoteMethod(coord, call, GroupRequest.GET_NONE, 0);
                    view_installation_mutex.wait(gms.join_timeout)// wait for view -> handleView()
                }
                catch(Exception e) {
                    if(log.isErrorEnabled()) log.error("exception is " + e);
View Full Code Here

Examples of org.jgroups.blocks.MethodCall

        serverObject.setRpcDispatcher(disp);
        channel.connect(name);
        Address localAddress = channel.getLocalAddress();

        // call the nested group method on itself
        MethodCall call = new MethodCall("outerMethod", new Object[0], new Class[0]);
        log("calling outerMethod() on all members");
        RspList rspList = disp.callRemoteMethods(null, call, GroupRequest.GET_ALL, 0);
        log("results of outerMethod(): " + rspList);

        assertEquals(1, rspList.size());
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.