Package org.jgroups.blocks

Examples of org.jgroups.blocks.MessageDispatcher


         SecurityHelper.doPrivilegedExceptionAction(new PrivilegedExceptionAction<Void>()
         {
            public Void run() throws Exception
            {
               channel = createChannel();
               dispatcher = new MessageDispatcher(channel, null, AbstractRPCService.this, AbstractRPCService.this);
               channel.connect(clusterName);
               return null;
            }
         });
      }
View Full Code Here


         SecurityHelper.doPrivilegedExceptionAction(new PrivilegedExceptionAction<Void>()
         {
            public Void run() throws Exception
            {
               channel = createChannel();
               dispatcher = new MessageDispatcher(channel, null, AbstractRPCService.this, AbstractRPCService.this);
               channel.connect(clusterName);
               return null;
            }
         });
      }
View Full Code Here

         {
            public Void run() throws Exception
            {
               channel = new JChannel(configurator);
               channel.setOpt(Channel.AUTO_RECONNECT, true);
               dispatcher = new MessageDispatcher(channel, null, RPCServiceImpl.this, RPCServiceImpl.this);
               channel.connect(clusterName);
               return null;
            }
         });
      }
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

            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

      }

      ClassLoader cl = (ClassLoader) props.get( CLASSLOADER );
      MessageListener wrapper = ( cl != null ) ? new ClassloaderMessageListener( listener, cl ) : listener;
      MessageListenerToRequestHandlerAdapter adapter = new MessageListenerToRequestHandlerAdapter( wrapper );
      MessageDispatcher dispatcher = new MuxMessageDispatcher( muxId, channel, wrapper, listener, adapter );
      sender = new DispatcherMessageSender( dispatcher );
    }
    else {
      MessageListenerToRequestHandlerAdapter adapter = new MessageListenerToRequestHandlerAdapter( listener );
      MessageDispatcher standardDispatcher = new MessageDispatcher( channel, listener, listener, adapter );
      sender = new DispatcherMessageSender( standardDispatcher );
    }

    masterNodeSelector.setLocalAddress( channel.getAddress() );
View Full Code Here

    this.id = id;
    this.context = context;
    this.stateful = stateful;
    this.membershipListener = membershipListener;
   
    this.dispatcher = new MessageDispatcher(channel, this, this, this);
    this.timeout = timeout;
  }
View Full Code Here

    }

    public void start() throws Exception {
        channel=new JChannel(props);
       //  channel.setOpt(Channel.LOCAL, Boolean.FALSE); // do not receive my own messages
        disp=new MessageDispatcher(channel, null, this, this, false);
        channel.connect("MessageDispatcherSpeedTestGroup");

        try {
            if(server) {
                System.out.println("-- Started as server. Press ctrl-c to kill");
View Full Code Here

        super();
        this.channel=channel;
    }

    public void start() throws Exception {
        disp=new MessageDispatcher(channel, null, null, this, false, true);
        channel.connect("MessageDispatcherTestGroup");

        MyThread t1=new MyThread("one"), t2=new MyThread("two");
        t1.start();
        t2.start();
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.