Examples of addProtocol()


Examples of org.jgroups.stack.ProtocolStack.addProtocol()

                    }
                }
            }
            Configurator.resolveAndAssignFields(relay, relayConfig.getProperties());
            Configurator.resolveAndInvokePropertyMethods(relay, relayConfig.getProperties());
            stack.addProtocol(relay);
            relay.init();
        }

        // Add implicit FORK to the top of the stack
        FORK fork = new FORK();
View Full Code Here

Examples of org.jgroups.stack.ProtocolStack.addProtocol()

            relay.init();
        }

        // Add implicit FORK to the top of the stack
        FORK fork = new FORK();
        stack.addProtocol(fork);
        fork.init();

        // Handle the Sasl protocol
        final SaslConfiguration saslConfig = this.configuration.getSasl();
        if (saslConfig != null) {
View Full Code Here

Examples of org.jgroups.stack.ProtocolStack.addProtocol()

                if (centralLock == null) {
                    // add the locking protocol
                    CENTRAL_LOCK lockingProtocol = new CENTRAL_LOCK();
                    // we have to call init because the channel has already been created
                    lockingProtocol.init();
                    protocolStack.addProtocol(lockingProtocol);
                }
                this.lockService = new LockService(this.channel);

                // Add a listener through which we'll know what's going on within the cluster ...
                this.channel.addChannelListener(listener);
View Full Code Here

Examples of org.jgroups.stack.ProtocolStack.addProtocol()

    public void testChannelCreation() throws Exception {
        MyReceiver receiver=new MyReceiver(null);
        c1.setReceiver(receiver);
        ProtocolStack stack=new ProtocolStack();
        c1.setProtocolStack(stack);
        stack.addProtocol(new SHARED_LOOPBACK()).addProtocol(new MockProtocol1()).addProtocol(new MockProtocol2());
        stack.init();
        c1.connect("demo");

        Protocol transport=stack.getTransport();
        transport.up(new Event(Event.MSG, new Message(null, Util.createRandomAddress(), "hello world")));
View Full Code Here

Examples of org.jgroups.stack.ProtocolStack.addProtocol()

        MyReceiver receiver1=new MyReceiver("A"), receiver2=new MyReceiver("B");

        UDP shared_transport=(UDP)new UDP().setValue("singleton_name", "shared");

        stack1.addProtocol(shared_transport).addProtocols(createProtocols());
        stack2.addProtocol(shared_transport).addProtocols(createProtocols());

        stack1.init();
        stack2.init();

        c1.setReceiver(receiver1);
View Full Code Here

Examples of org.jgroups.stack.ProtocolStack.addProtocol()

    public static JChannel createChannel(Protocol... prots) throws Exception {
        JChannel ch=new JChannel(false);
        ProtocolStack stack=new ProtocolStack();
        ch.setProtocolStack(stack);
        for(Protocol prot : prots) {
            stack.addProtocol(prot);
            prot.setProtocolStack(stack);
        }
        stack.init();
        return ch;
    }
View Full Code Here

Examples of org.jgroups.stack.ProtocolStack.addProtocol()

    protected static JChannel createChannel(Protocol unicast, DISCARD discard) throws Exception {
        JChannel ch=new JChannel(false);
        ProtocolStack stack=new ProtocolStack();
        ch.setProtocolStack(stack);
        stack.addProtocol(new SHARED_LOOPBACK());

        if(discard != null)
            stack.addProtocol(discard);

        if(unicast instanceof UNICAST2)
View Full Code Here

Examples of org.jgroups.stack.ProtocolStack.addProtocol()

        ProtocolStack stack=new ProtocolStack();
        ch.setProtocolStack(stack);
        stack.addProtocol(new SHARED_LOOPBACK());

        if(discard != null)
            stack.addProtocol(discard);

        if(unicast instanceof UNICAST2)
            unicast.setValue("stable_interval", 3000);
       
        stack.addProtocol(new SHARED_LOOPBACK_PING())
View Full Code Here

Examples of org.jgroups.stack.ProtocolStack.addProtocol()

            stack.addProtocol(discard);

        if(unicast instanceof UNICAST2)
            unicast.setValue("stable_interval", 3000);
       
        stack.addProtocol(new SHARED_LOOPBACK_PING())
          .addProtocol(new NAKACK2().setValue("use_mcast_xmit", false))
          .addProtocol(unicast)
          .addProtocol(new STABLE().setValue("max_bytes", 50000))
          .addProtocol(new GMS().setValue("print_local_addr", false));
        stack.init();
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.