Package org.apache.catalina.tribes.group

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


        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

    GroupChannel channel2;
    Listener listener1;
    int threadCounter = 0;
    protected void setUp() throws Exception {
        super.setUp();
        channel1 = new GroupChannel();
        channel1.addInterceptor(new MessageDispatch15Interceptor());
        channel2 = new GroupChannel();
        channel2.addInterceptor(new MessageDispatch15Interceptor());
        listener1 = new Listener();
        channel2.addChannelListener(listener1);
        channel1.start(GroupChannel.DEFAULT);
        channel2.start(GroupChannel.DEFAULT);
View Full Code Here

        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

        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

        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

        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

    private GroupChannel channel2;
    private Listener listener1;

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

    @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

                interceptor = null;
            }
        }
       
        public GroupChannel createChannel() {
            channel = new GroupChannel();
            ((ReceiverBase)channel.getChannelReceiver()).setAutoBind(100);
            interceptor = new NonBlockingCoordinator() {
                @Override
                public void fireInterceptorEvent(InterceptorEvent event) {
                    status = event.getEventTypeDesc();
View Full Code Here

TOP

Related Classes of org.apache.catalina.tribes.group.GroupChannel

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.