Search in sources :

Example 6 with MessageDispatchInterceptor

use of org.apache.catalina.tribes.group.interceptors.MessageDispatchInterceptor in project tomcat by apache.

the class SimpleTcpCluster method checkDefaults.

protected void checkDefaults() {
    if (clusterListeners.size() == 0 && managerTemplate instanceof DeltaManager) {
        addClusterListener(new ClusterSessionListener());
    }
    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 MessageDispatchInterceptor());
        channel.addInterceptor(new TcpFailureDetector());
    }
    if (heartbeatBackgroundEnabled)
        channel.setHeartbeat(false);
}
Also used : JvmRouteBinderValve(org.apache.catalina.ha.session.JvmRouteBinderValve) MessageDispatchInterceptor(org.apache.catalina.tribes.group.interceptors.MessageDispatchInterceptor) GroupChannel(org.apache.catalina.tribes.group.GroupChannel) TcpFailureDetector(org.apache.catalina.tribes.group.interceptors.TcpFailureDetector) DeltaManager(org.apache.catalina.ha.session.DeltaManager) ClusterSessionListener(org.apache.catalina.ha.session.ClusterSessionListener)

Aggregations

MessageDispatchInterceptor (org.apache.catalina.tribes.group.interceptors.MessageDispatchInterceptor)6 GroupChannel (org.apache.catalina.tribes.group.GroupChannel)5 ChannelListener (org.apache.catalina.tribes.ChannelListener)3 ThroughputInterceptor (org.apache.catalina.tribes.group.interceptors.ThroughputInterceptor)3 ReceiverBase (org.apache.catalina.tribes.transport.ReceiverBase)3 Before (org.junit.Before)3 TcpFailureDetector (org.apache.catalina.tribes.group.interceptors.TcpFailureDetector)2 ArrayList (java.util.ArrayList)1 Properties (java.util.Properties)1 ClusterSessionListener (org.apache.catalina.ha.session.ClusterSessionListener)1 DeltaManager (org.apache.catalina.ha.session.DeltaManager)1 JvmRouteBinderValve (org.apache.catalina.ha.session.JvmRouteBinderValve)1 ChannelInterceptor (org.apache.catalina.tribes.ChannelInterceptor)1 ManagedChannel (org.apache.catalina.tribes.ManagedChannel)1 Member (org.apache.catalina.tribes.Member)1 DomainFilterInterceptor (org.apache.catalina.tribes.group.interceptors.DomainFilterInterceptor)1 FragmentationInterceptor (org.apache.catalina.tribes.group.interceptors.FragmentationInterceptor)1 GzipInterceptor (org.apache.catalina.tribes.group.interceptors.GzipInterceptor)1 OrderInterceptor (org.apache.catalina.tribes.group.interceptors.OrderInterceptor)1 StaticMembershipInterceptor (org.apache.catalina.tribes.group.interceptors.StaticMembershipInterceptor)1