Package org.jgroups

Examples of org.jgroups.ReceiverAdapter


         }

         public synchronized void connect() throws Exception
         {
            if (channel.isConnected()) return;
            channel.setReceiver(new ReceiverAdapter() {

               @Override
               public void receive(Message msg)
               {
                  synchronized(receivers)
View Full Code Here


    @ConstructorProperties({"name", "cluster", "serverComm"})
    public JGroupsComm(String name, Cluster cluster, Comm serverComm) {
        super(name, cluster, new JGroupsNodeAddressResolver(cluster));
        this.channel = getCluster().getDataChannel();
        this.serverComm = serverComm;
        channel.setReceiver(new ReceiverAdapter() {
            @Override
            public void receive(org.jgroups.Message msg) {
                JGroupsComm.this.receive(msg);
            }
        });
View Full Code Here

        this.isLocal = isLocalConnectionBeingCreated;
        rcm.logDebug("creating_broadcast_connection", getInfo());
        try {
            if (isLocalConnectionBeingCreated) {
                // it's a local connection
                this.channel.setReceiver(new ReceiverAdapter() {
                    public void receive(Message message) {
                        onMessage(message);
                    }
                });
                rcm.logDebug("broadcast_connection_created", getInfo());
View Full Code Here

  }

  @Override
  protected void doStart() {

    jgroupsChannel.setReceiver(new ReceiverAdapter() {

      @Override
      public void receive(Message msg) {
        Object object = msg.getObject();
View Full Code Here

         }

         public synchronized void connect() throws Exception
         {
            if (channel.isConnected()) return;
            channel.setReceiver(new ReceiverAdapter()
            {

               @Override
               public void receive(Message msg)
               {
View Full Code Here

        java.util.logging.Logger.getLogger("").setLevel(java.util.logging.Level.FINER);
        System.setProperty(Global.CUSTOM_LOG_FACTORY, "mesi.jgroups.SLF4JLogFactory");


        final JChannel jchannel = new JChannel(new File("src/udp.xml"));
        jchannel.setReceiver(new ReceiverAdapter() {

            @Override
            public void receive(Message msg) {
                //System.err.println("XXXX " + msg);
            }
View Full Code Here

        jchannel.setDiscardOwnMessages(true);

        ControlChannel control = new ControlChannel(jchannel);
        control.setDiscardOwnMessages(true);

        jchannel.setReceiver(new ReceiverAdapter() {

            @Override
            public void receive(Message msg) {
                log.info("received: {} headers: {} content: {}", new Object[]{msg, msg.getHeaders(), msg.getObject()});
            }
        });

        control.setReceiver(new ReceiverAdapter() {

            @Override
            public void receive(Message msg) {
                log.info("CONTROL received: {} headers: {} content: {}", new Object[]{msg, msg.getHeaders(), msg.getObject()});
            }
View Full Code Here

        System.setProperty(Global.CUSTOM_LOG_FACTORY, "mesi.jgroups.SLF4JLogFactory");

        Random random = new Random();

        final JChannel jchannel = new JChannel(new File("src/udp.xml"));
        jchannel.setReceiver(new ReceiverAdapter() {

            @Override
            public void receive(Message msg) {
                //System.err.println("XXXX " + msg);
            }
View Full Code Here

         }

         public synchronized void connect() throws Exception
         {
            if (channel.isConnected()) return;
            channel.setReceiver(new ReceiverAdapter()
            {

               @Override
               public void receive(Message msg)
               {
View Full Code Here

    @ConstructorProperties({"name", "cluster", "serverComm"})
    public JGroupsComm(String name, Cluster cluster, Comm serverComm) {
        super(name, cluster, new JGroupsNodeAddressResolver(cluster));
        this.channel = getCluster().getDataChannel();
        this.serverComm = serverComm;
        channel.setReceiver(new ReceiverAdapter() {
            @Override
            public void receive(org.jgroups.Message msg) {
                JGroupsComm.this.receive(msg);
            }
        });
View Full Code Here

TOP

Related Classes of org.jgroups.ReceiverAdapter

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.