Package org.jgroups.blocks

Examples of org.jgroups.blocks.RpcDispatcher$Marshaller2


    }
   
    messageListener = new MyMessageListener();
    membershipListener = new MyMembershipListener();
    rpcMethods = new RpcMethods(channel);
    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});
View Full Code Here


    }
   
    messageListener = new MyMessageListener();
    membershipListener = new MyMembershipListener();
    rpcMethods = new RpcMethods(channel);
    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});
View Full Code Here

    }
   
    messageListener = new MyMessageListener();
    membershipListener = new MyMembershipListener();
    rpcMethods = new RpcMethods(channel);
    disp = new RpcDispatcher(channel, messageListener, membershipListener, rpcMethods);
    channel.connect("RpcDispatcherContentTestGroup");
   
    RequestOptions requestOptions = new RequestOptions(ResponseMode.GET_ALL, 0, false, new MyRspFilter());
   
    for(int i = 0 ; i < 10 ; i ++) {
View Full Code Here

    }
   
    messageListener = new MyMessageListener();
    membershipListener = new MyMembershipListener();
    rpcMethods = new RpcMethods(channel);
    disp = new RpcDispatcher(channel, messageListener, membershipListener, rpcMethods);
    channel.connect("RpcDispatcherContentTestGroup");
   
    RequestOptions requestOptions = new RequestOptions(ResponseMode.GET_ALL, 0);
   
    for(int i = 0 ; i < 10 ; i ++) {
View Full Code Here

    }
   
    messageListener = new MyMessageListener();
    membershipListener = new MyMembershipListener();
    rpcMethods = new RpcMethods(channel);
    disp = new RpcDispatcher(channel, messageListener, membershipListener, rpcMethods);
    channel.connect("RpcDispatcherContentTestGroup");
   
    RequestOptions requestOptions = new RequestOptions(ResponseMode.GET_ALL, 0);
   
    Util.sleep(1000);
View Full Code Here

  public void test() throws Exception {
   
    logger.info("'org.jgroups.blocks.RpcDispatcher' test");
   
    channel = new JChannel();
    disp = new RpcDispatcher(channel, this);
    channel.connect("RpcDispatcherTestGroup");
   
    logger.info(" -> View Id: " + channel.getView().getViewId());
    logger.info(" -> View Creater: " + channel.getView().getCreator());
    logger.info(" -> View Coordinator: " + channel.getView().getMembers().get(0));
View Full Code Here

  public void test() throws Exception {
   
    logger.info("'org.jgroups.blocks.RpcDispatcher' test with future");
   
    channel = new JChannel();
    disp = new RpcDispatcher(channel, this);
    channel.connect("RpcDispatcherTestGroup");
   
    logger.info(" -> View Id: " + channel.getView().getViewId());
    logger.info(" -> View Creater: " + channel.getView().getCreator());
    logger.info(" -> View Coordinator: " + channel.getView().getMembers().get(0));
View Full Code Here

    }

    public void start() {
        try {
            channel=new JChannel(props);
            disp=new RpcDispatcher(channel, this, this, this);
            channel.connect(channel_name);
            System.out.println("\nQuote Server started at " + new Date());
            System.out.println("Joined channel '" + channel_name + "' (" + channel.getView().size() + " members)");
            channel.getState(null, 0);
            System.out.println("Ready to serve requests");
View Full Code Here

        System.out.println("properties are " + props);

        try {
            channel = new JChannel(props);
            disp = new RpcDispatcher(channel, this, this, this);
            channel.connect(groupname);
            System.out.println("INIT()");
            channel.getState(null, 0);
        } catch (Exception e) {
            log.error("Whiteboard.init(): " + e);
View Full Code Here

     * @throws Exception
     */
    public void testOneChannel() throws Exception {
        JChannel channel = new JChannel();
        ServerObject serverObject = new ServerObject("obj1");
        RpcDispatcher disp=new RpcDispatcher(channel, null, null, serverObject, DEADLOCK_DETECTION);
        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());
        assertEquals("outerMethod[innerMethod]", rspList.getValue(localAddress));
        assertTrue(rspList.isReceived(localAddress));
View Full Code Here

TOP

Related Classes of org.jgroups.blocks.RpcDispatcher$Marshaller2

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.