Package org.jgroups.blocks

Examples of org.jgroups.blocks.MessageDispatcher


   public void configure(String props) throws Exception
   {
      channel_ = new JChannel(props);
      requestHandler_ = new RequestHandlerImpl();
      mdispatcher_ = new MessageDispatcher(channel_, null, null, requestHandler_);
      channel_.setChannelListener(channelListener_);
      channel_.connect("Portal");
   }
View Full Code Here


            channel = new JChannel(channelConfig);

            channel.setOpt(Channel.AUTO_RECONNECT, Boolean.TRUE);
            channel.setOpt(Channel.AUTO_GETSTATE, Boolean.TRUE);

            dispatcher = new MessageDispatcher(channel, null, null, null);

            dispatcher.setRequestHandler(this);
            dispatcher.setMembershipListener(this);
         }
      }
View Full Code Here

            channel = new JChannel(channelConfig);

            channel.setOpt(Channel.AUTO_RECONNECT, Boolean.TRUE);
            channel.setOpt(Channel.AUTO_GETSTATE, Boolean.TRUE);

            dispatcher = new MessageDispatcher(channel, null, null, null);

            dispatcher.setRequestHandler(this);
            dispatcher.setMembershipListener(this);
         }
      }
View Full Code Here

     
      MembershipListener membershipListener = new ControlMembershipListener();
     
      RequestHandler requestHandler = new ControlRequestHandler();
     
      dispatcher = new MessageDispatcher(controlChannel, messageListener, membershipListener, requestHandler, true);
             
      Receiver dataReceiver = new DataReceiver();
     
      dataChannel.setReceiver(dataReceiver);
     
View Full Code Here


    public void start() throws Exception {
        channel=new JChannel(props);
        //channel.setOpt(Channel.LOCAL, Boolean.FALSE);
        disp=new MessageDispatcher(channel, null, null, this);
        channel.connect("MessageDispatcherTestAsyncGroup");
    }
View Full Code Here

    protected void setUp() throws Exception {
        super.setUp();
        ch=createChannel();
        disableBundling(ch);
        disp=new MessageDispatcher(ch, null, null, null);
        ch.connect("x");
    }
View Full Code Here

        disp.setRequestHandler(new MyHandler(null));

        ch2=createChannel();
        disableBundling(ch2);
        long stop,start=System.currentTimeMillis();
        disp2=new MessageDispatcher(ch2, null, null, new MyHandler(null));
        stop=System.currentTimeMillis();
        ch2.connect("x");
        assertEquals(2, ch2.getView().size());
        System.out.println("view: " + ch2.getView());
View Full Code Here

        long start, stop;
        disp.setRequestHandler(new MyHandler(new byte[size]));

        ch2=createChannel();
        disableBundling(ch2);
        disp2=new MessageDispatcher(ch2, null, null, new MyHandler(new byte[size]));
        ch2.connect("x");
        assertEquals(2, ch2.getView().size());

        System.out.println("casting message");
        start=System.currentTimeMillis();
View Full Code Here

    }

    private void start(String props) throws IOException, ChannelException {
        channel=new JChannel(props);
        channel.setOpt(Channel.AUTO_RECONNECT, Boolean.TRUE);
        disp=new MessageDispatcher(channel, null, this, this,
                false, // deadlock detection is disabled
                true); // concurrent processing is enabled
        channel.connect("MessageDispatcherTestGroup");
        mainLoop();
    }
View Full Code Here

        }

        public void run() {
      try {
        if (useDispatcher) {
          final MessageDispatcher md = new MessageDispatcher(c, null, null, new MyHandler());
          c.connect("test");
          md.castMessage(null, new Message(null, null, "blah"),GroupRequest.GET_ALL, 2500);
        } else {
          c.connect("test");
        }
      } catch (final Exception e) {
        exception = e;
View Full Code Here

TOP

Related Classes of org.jgroups.blocks.MessageDispatcher

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.