Examples of GroupChannel


Examples of org.apache.catalina.tribes.group.GroupChannel

    @SuppressWarnings("unused")
    private int threadCounter = 0;

    @Before
    public void setUp() throws Exception {
        channel1 = new GroupChannel();
        channel1.addInterceptor(new MessageDispatch15Interceptor());
        channel2 = new GroupChannel();
        channel2.addInterceptor(new MessageDispatch15Interceptor());
        listener1 = new Listener();
        channel2.addChannelListener(listener1);
        channel1.start(Channel.DEFAULT);
        channel2.start(Channel.DEFAULT);
View Full Code Here

Examples of org.apache.catalina.tribes.group.GroupChannel

    @SuppressWarnings("unused")
    private int threadCounter = 0;

    @Before
    public void setUp() throws Exception {
        channel1 = new GroupChannel();
        channel1.addInterceptor(new MessageDispatch15Interceptor());
        channel2 = new GroupChannel();
        channel2.addInterceptor(new MessageDispatch15Interceptor());
        ThroughputInterceptor tint = new ThroughputInterceptor();
        tint.setInterval(500);
        ThroughputInterceptor tint2 = new ThroughputInterceptor();
        tint2.setInterval(500);
View Full Code Here

Examples of org.apache.catalina.tribes.group.GroupChannel

        if ( valves.size() == 0 ) {
            addValve(new JvmRouteBinderValve());
            addValve(new ReplicationValve());
        }
        if ( clusterDeployer != null ) clusterDeployer.setCluster(this);
        if ( channel == null ) channel = new GroupChannel();
        if ( channel instanceof GroupChannel && !((GroupChannel)channel).getInterceptors().hasNext()) {
            channel.addInterceptor(new MessageDispatch15Interceptor());
            channel.addInterceptor(new TcpFailureDetector());
        }
    }
View Full Code Here

Examples of org.apache.catalina.tribes.group.GroupChannel

        cluster.setManagerTemplate((org.apache.catalina.ha.ClusterManager)manager);
        //cluster.setDebug(debug);
        // removed since 5.5.9? cluster.setExpireSessionsOnShutdown(expireSession);
        // removed since 5.5.9? cluster.setUseDirtyFlag(useDirty);

        GroupChannel channel = new GroupChannel();
        channel.setChannelReceiver(listener);
        channel.setChannelSender(trans);
        channel.setMembershipService(mcast);

        cluster.setChannel(channel);
        cluster.addValve(clusterValve);
        // removed since 5.5.9? cluster.setPrintToScreen(true);
View Full Code Here

Examples of org.apache.catalina.tribes.group.GroupChannel

       //Set the parameters
       setParameters(channel, initParams);
      
       // if the channel is a GroupChannel then add the sender, receiver, and membership service
       if (channel instanceof GroupChannel) {
           GroupChannel groupChannel = (GroupChannel)channel;
           //Add the MembershipService
           if (membership != null){
               groupChannel.setMembershipService((MembershipService)membership.getInternalObject());
           }
          
           //Add Receiver
           if (receiver != null){
               groupChannel.setChannelReceiver((ChannelReceiver)receiver.getInternalObject());
           }
          
           //Add Sender
           if (sender != null){
               groupChannel.setChannelSender((ChannelSender)sender.getInternalObject());
           }
       } else {
           log.warn(className + " is not an instance of GroupChannel. Did not set Receiver, Sender, or MembershipService");
       }
      
View Full Code Here

Examples of org.apache.catalina.tribes.group.GroupChannel

        if (mbind != null) service.setMcastBindAddress(mbind);
        service.setMcastFrequency(mcastfreq);
        service.setMcastDropTime(mcastdrop);
        service.setMcastPort(mcastport);

        ManagedChannel channel = new GroupChannel();
        channel.setChannelReceiver(rl);
        channel.setChannelSender(ps);
        channel.setMembershipService(service);

        if (gzip) channel.addInterceptor(new GzipInterceptor());
        if ( frag ) {
            FragmentationInterceptor fi = new FragmentationInterceptor();
            fi.setMaxSize(fragsize);
            channel.addInterceptor(fi);
        }
        if (order) {
            OrderInterceptor oi = new OrderInterceptor();
            oi.setMaxQueue(ordersize);
            channel.addInterceptor(oi);
        }
        return channel;
       
    }
View Full Code Here

Examples of org.apache.catalina.tribes.group.GroupChannel

        if ( valves.size() == 0 ) {
            addValve(new JvmRouteBinderValve());
            addValve(new ReplicationValve());
        }
        if ( clusterDeployer != null ) clusterDeployer.setCluster(this);
        if ( channel == null ) channel = new GroupChannel();
        if ( channel instanceof GroupChannel && !((GroupChannel)channel).getInterceptors().hasNext()) {
            channel.addInterceptor(new MessageDispatch15Interceptor());
            channel.addInterceptor(new TcpFailureDetector());
        }
    }
View Full Code Here

Examples of org.apache.catalina.tribes.group.GroupChannel

        cluster.setManagerTemplate((org.apache.catalina.ha.ClusterManager)manager);
        //cluster.setDebug(debug);
        // removed since 5.5.9? cluster.setExpireSessionsOnShutdown(expireSession);
        // removed since 5.5.9? cluster.setUseDirtyFlag(useDirty);

        GroupChannel channel = new GroupChannel();
        channel.setChannelReceiver(listener);
        channel.setChannelSender(trans);
        channel.setMembershipService(mcast);

        cluster.setChannel(channel);
        cluster.addValve(clusterValve);
        // removed since 5.5.9? cluster.setPrintToScreen(true);
View Full Code Here

Examples of org.apache.catalina.tribes.group.GroupChannel

        if ( valves.size() == 0 ) {
            addValve(new JvmRouteBinderValve());
            addValve(new ReplicationValve());
        }
        if ( clusterDeployer != null ) clusterDeployer.setCluster(this);
        if ( channel == null ) channel = new GroupChannel();
        if ( channel instanceof GroupChannel && !((GroupChannel)channel).getInterceptors().hasNext()) {
            channel.addInterceptor(new MessageDispatch15Interceptor());
            channel.addInterceptor(new TcpFailureDetector());
        }
    }
View Full Code Here

Examples of org.apache.catalina.tribes.group.GroupChannel

        if ( valves.size() == 0 ) {
            addValve(new JvmRouteBinderValve());
            addValve(new ReplicationValve());
        }
        if ( clusterDeployer != null ) clusterDeployer.setCluster(this);
        if ( channel == null ) channel = new GroupChannel();
        if ( channel instanceof GroupChannel && !((GroupChannel)channel).getInterceptors().hasNext()) {
            channel.addInterceptor(new MessageDispatch15Interceptor());
            channel.addInterceptor(new TcpFailureDetector());
        }
    }
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.