Java 类org.apache.catalina.tribes.group.interceptors.MessageDispatch15Interceptor 实例源码

项目:tomcat7    文件:CoordinationDemo.java   
public GroupChannel createChannel() {
    channel = new GroupChannel();
    ((ReceiverBase)channel.getChannelReceiver()).setAutoBind(100);
    interceptor = new NonBlockingCoordinator() {
        @Override
        public void fireInterceptorEvent(InterceptorEvent event) {
            status = event.getEventTypeDesc();
            int type = event.getEventType();
            boolean display = VIEW_EVENTS[type];
            if ( display ) parent.printScreen();
            try { Thread.sleep(SLEEP_TIME); }catch ( Exception x){
                // Ignore
            }
        }
    };
    channel.addInterceptor(interceptor);
    channel.addInterceptor(new TcpFailureDetector());
    channel.addInterceptor(new MessageDispatch15Interceptor());
    return channel;
}
项目:tomcat7    文件:TestMulticastPackages.java   
@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);
    //channel1.addInterceptor(tint);
    channel2.addInterceptor(tint2);
    listener1 = new Listener();
    ReceiverBase rb1 = (ReceiverBase)channel1.getChannelReceiver();
    ReceiverBase rb2 = (ReceiverBase)channel2.getChannelReceiver();
    rb1.setUdpPort(50000);
    rb2.setUdpPort(50000);
    channel2.addChannelListener(listener1);
    TesterUtil.addRandomDomain(new ManagedChannel[] {channel1, channel2});
    channel1.start(Channel.DEFAULT);
    channel2.start(Channel.DEFAULT);
}
项目:tomcat7    文件:TestUdpPackages.java   
@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);
    //channel1.addInterceptor(tint);
    channel2.addInterceptor(tint2);
    listener1 = new Listener();
    ReceiverBase rb1 = (ReceiverBase)channel1.getChannelReceiver();
    ReceiverBase rb2 = (ReceiverBase)channel2.getChannelReceiver();
    rb1.setUdpPort(50000);
    rb2.setUdpPort(50000);
    channel2.addChannelListener(listener1);
    TesterUtil.addRandomDomain(new ManagedChannel[] {channel1, channel2});
    channel1.start(Channel.DEFAULT);
    channel2.start(Channel.DEFAULT);
}
项目:apache-tomcat-7.0.73-with-comment    文件:CoordinationDemo.java   
public GroupChannel createChannel() {
    channel = new GroupChannel();
    ((ReceiverBase)channel.getChannelReceiver()).setAutoBind(100);
    interceptor = new NonBlockingCoordinator() {
        @Override
        public void fireInterceptorEvent(InterceptorEvent event) {
            status = event.getEventTypeDesc();
            int type = event.getEventType();
            boolean display = VIEW_EVENTS[type];
            if ( display ) parent.printScreen();
            try { Thread.sleep(SLEEP_TIME); }catch ( Exception x){
                // Ignore
            }
        }
    };
    channel.addInterceptor(interceptor);
    channel.addInterceptor(new TcpFailureDetector());
    channel.addInterceptor(new MessageDispatch15Interceptor());
    return channel;
}
项目:apache-tomcat-7.0.73-with-comment    文件:TestMulticastPackages.java   
@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);
    //channel1.addInterceptor(tint);
    channel2.addInterceptor(tint2);
    listener1 = new Listener();
    ReceiverBase rb1 = (ReceiverBase)channel1.getChannelReceiver();
    ReceiverBase rb2 = (ReceiverBase)channel2.getChannelReceiver();
    rb1.setUdpPort(50000);
    rb2.setUdpPort(50000);
    channel2.addChannelListener(listener1);
    TesterUtil.addRandomDomain(new ManagedChannel[] {channel1, channel2});
    channel1.start(Channel.DEFAULT);
    channel2.start(Channel.DEFAULT);
}
项目:apache-tomcat-7.0.73-with-comment    文件:TestUdpPackages.java   
@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);
    //channel1.addInterceptor(tint);
    channel2.addInterceptor(tint2);
    listener1 = new Listener();
    ReceiverBase rb1 = (ReceiverBase)channel1.getChannelReceiver();
    ReceiverBase rb2 = (ReceiverBase)channel2.getChannelReceiver();
    rb1.setUdpPort(50000);
    rb2.setUdpPort(50000);
    channel2.addChannelListener(listener1);
    TesterUtil.addRandomDomain(new ManagedChannel[] {channel1, channel2});
    channel1.start(Channel.DEFAULT);
    channel2.start(Channel.DEFAULT);
}
项目:class-guard    文件:CoordinationDemo.java   
public GroupChannel createChannel() {
    channel = new GroupChannel();
    ((ReceiverBase)channel.getChannelReceiver()).setAutoBind(100);
    interceptor = new NonBlockingCoordinator() {
        @Override
        public void fireInterceptorEvent(InterceptorEvent event) {
            status = event.getEventTypeDesc();
            int type = event.getEventType();
            boolean display = VIEW_EVENTS[type];
            if ( display ) parent.printScreen();
            try { Thread.sleep(SLEEP_TIME); }catch ( Exception x){
                // Ignore
            }
        }
    };
    channel.addInterceptor(interceptor);
    channel.addInterceptor(new TcpFailureDetector());
    channel.addInterceptor(new MessageDispatch15Interceptor());
    return channel;
}
项目:class-guard    文件:TestMulticastPackages.java   
@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);
    //channel1.addInterceptor(tint);
    channel2.addInterceptor(tint2);
    listener1 = new Listener();
    ReceiverBase rb1 = (ReceiverBase)channel1.getChannelReceiver();
    ReceiverBase rb2 = (ReceiverBase)channel2.getChannelReceiver();
    rb1.setUdpPort(50000);
    rb2.setUdpPort(50000);
    channel2.addChannelListener(listener1);
    TesterUtil.addRandomDomain(new ManagedChannel[] {channel1, channel2});
    channel1.start(Channel.DEFAULT);
    channel2.start(Channel.DEFAULT);
}
项目:class-guard    文件:TestUdpPackages.java   
@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);
    //channel1.addInterceptor(tint);
    channel2.addInterceptor(tint2);
    listener1 = new Listener();
    ReceiverBase rb1 = (ReceiverBase)channel1.getChannelReceiver();
    ReceiverBase rb2 = (ReceiverBase)channel2.getChannelReceiver();
    rb1.setUdpPort(50000);
    rb2.setUdpPort(50000);
    channel2.addChannelListener(listener1);
    TesterUtil.addRandomDomain(new ManagedChannel[] {channel1, channel2});
    channel1.start(Channel.DEFAULT);
    channel2.start(Channel.DEFAULT);
}
项目:apache-tomcat-7.0.57    文件:CoordinationDemo.java   
public GroupChannel createChannel() {
    channel = new GroupChannel();
    ((ReceiverBase)channel.getChannelReceiver()).setAutoBind(100);
    interceptor = new NonBlockingCoordinator() {
        @Override
        public void fireInterceptorEvent(InterceptorEvent event) {
            status = event.getEventTypeDesc();
            int type = event.getEventType();
            boolean display = VIEW_EVENTS[type];
            if ( display ) parent.printScreen();
            try { Thread.sleep(SLEEP_TIME); }catch ( Exception x){
                // Ignore
            }
        }
    };
    channel.addInterceptor(interceptor);
    channel.addInterceptor(new TcpFailureDetector());
    channel.addInterceptor(new MessageDispatch15Interceptor());
    return channel;
}
项目:apache-tomcat-7.0.57    文件:TestMulticastPackages.java   
@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);
    //channel1.addInterceptor(tint);
    channel2.addInterceptor(tint2);
    listener1 = new Listener();
    ReceiverBase rb1 = (ReceiverBase)channel1.getChannelReceiver();
    ReceiverBase rb2 = (ReceiverBase)channel2.getChannelReceiver();
    rb1.setUdpPort(50000);
    rb2.setUdpPort(50000);
    channel2.addChannelListener(listener1);
    TesterUtil.addRandomDomain(new ManagedChannel[] {channel1, channel2});
    channel1.start(Channel.DEFAULT);
    channel2.start(Channel.DEFAULT);
}
项目:apache-tomcat-7.0.57    文件:TestUdpPackages.java   
@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);
    //channel1.addInterceptor(tint);
    channel2.addInterceptor(tint2);
    listener1 = new Listener();
    ReceiverBase rb1 = (ReceiverBase)channel1.getChannelReceiver();
    ReceiverBase rb2 = (ReceiverBase)channel2.getChannelReceiver();
    rb1.setUdpPort(50000);
    rb2.setUdpPort(50000);
    channel2.addChannelListener(listener1);
    TesterUtil.addRandomDomain(new ManagedChannel[] {channel1, channel2});
    channel1.start(Channel.DEFAULT);
    channel2.start(Channel.DEFAULT);
}
项目:apache-tomcat-7.0.57    文件:CoordinationDemo.java   
public GroupChannel createChannel() {
    channel = new GroupChannel();
    ((ReceiverBase)channel.getChannelReceiver()).setAutoBind(100);
    interceptor = new NonBlockingCoordinator() {
        @Override
        public void fireInterceptorEvent(InterceptorEvent event) {
            status = event.getEventTypeDesc();
            int type = event.getEventType();
            boolean display = VIEW_EVENTS[type];
            if ( display ) parent.printScreen();
            try { Thread.sleep(SLEEP_TIME); }catch ( Exception x){
                // Ignore
            }
        }
    };
    channel.addInterceptor(interceptor);
    channel.addInterceptor(new TcpFailureDetector());
    channel.addInterceptor(new MessageDispatch15Interceptor());
    return channel;
}
项目:apache-tomcat-7.0.57    文件:TestMulticastPackages.java   
@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);
    //channel1.addInterceptor(tint);
    channel2.addInterceptor(tint2);
    listener1 = new Listener();
    ReceiverBase rb1 = (ReceiverBase)channel1.getChannelReceiver();
    ReceiverBase rb2 = (ReceiverBase)channel2.getChannelReceiver();
    rb1.setUdpPort(50000);
    rb2.setUdpPort(50000);
    channel2.addChannelListener(listener1);
    TesterUtil.addRandomDomain(new ManagedChannel[] {channel1, channel2});
    channel1.start(Channel.DEFAULT);
    channel2.start(Channel.DEFAULT);
}
项目:apache-tomcat-7.0.57    文件:TestUdpPackages.java   
@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);
    //channel1.addInterceptor(tint);
    channel2.addInterceptor(tint2);
    listener1 = new Listener();
    ReceiverBase rb1 = (ReceiverBase)channel1.getChannelReceiver();
    ReceiverBase rb2 = (ReceiverBase)channel2.getChannelReceiver();
    rb1.setUdpPort(50000);
    rb2.setUdpPort(50000);
    channel2.addChannelListener(listener1);
    TesterUtil.addRandomDomain(new ManagedChannel[] {channel1, channel2});
    channel1.start(Channel.DEFAULT);
    channel2.start(Channel.DEFAULT);
}
项目:WBSAirback    文件:CoordinationDemo.java   
public GroupChannel createChannel() {
    channel = new GroupChannel();
    ((ReceiverBase)channel.getChannelReceiver()).setAutoBind(100);
    interceptor = new NonBlockingCoordinator() {
        @Override
        public void fireInterceptorEvent(InterceptorEvent event) {
            status = event.getEventTypeDesc();
            int type = event.getEventType();
            boolean display = VIEW_EVENTS[type];
            if ( display ) parent.printScreen();
            try { Thread.sleep(SLEEP_TIME); }catch ( Exception x){
                // Ignore
            }
        }
    };
    channel.addInterceptor(interceptor);
    channel.addInterceptor(new TcpFailureDetector());
    channel.addInterceptor(new MessageDispatch15Interceptor());
    return channel;
}
项目:WBSAirback    文件:TestMulticastPackages.java   
@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);
    //channel1.addInterceptor(tint);
    channel2.addInterceptor(tint2);
    listener1 = new Listener();
    ReceiverBase rb1 = (ReceiverBase)channel1.getChannelReceiver();
    ReceiverBase rb2 = (ReceiverBase)channel2.getChannelReceiver();
    rb1.setUdpPort(50000);
    rb2.setUdpPort(50000);
    channel2.addChannelListener(listener1);
    channel1.start(Channel.DEFAULT);
    channel2.start(Channel.DEFAULT);
}
项目:WBSAirback    文件:TestUdpPackages.java   
@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);
    //channel1.addInterceptor(tint);
    channel2.addInterceptor(tint2);
    listener1 = new Listener();
    ReceiverBase rb1 = (ReceiverBase)channel1.getChannelReceiver();
    ReceiverBase rb2 = (ReceiverBase)channel2.getChannelReceiver();
    rb1.setUdpPort(50000);
    rb2.setUdpPort(50000);
    channel2.addChannelListener(listener1);
    channel1.start(Channel.DEFAULT);
    channel2.start(Channel.DEFAULT);
}
项目:tomcat7    文件:TestDataIntegrity.java   
@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);
    TesterUtil.addRandomDomain(new ManagedChannel[] {channel1, channel2});
    channel1.start(Channel.DEFAULT);
    channel2.start(Channel.DEFAULT);
}
项目:apache-tomcat-7.0.73-with-comment    文件:TestDataIntegrity.java   
@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);
    TesterUtil.addRandomDomain(new ManagedChannel[] {channel1, channel2});
    channel1.start(Channel.DEFAULT);
    channel2.start(Channel.DEFAULT);
}
项目:class-guard    文件:TestDataIntegrity.java   
@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);
    TesterUtil.addRandomDomain(new ManagedChannel[] {channel1, channel2});
    channel1.start(Channel.DEFAULT);
    channel2.start(Channel.DEFAULT);
}
项目:apache-tomcat-7.0.57    文件:TestDataIntegrity.java   
@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);
    TesterUtil.addRandomDomain(new ManagedChannel[] {channel1, channel2});
    channel1.start(Channel.DEFAULT);
    channel2.start(Channel.DEFAULT);
}
项目:apache-tomcat-7.0.57    文件:TestDataIntegrity.java   
@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);
    TesterUtil.addRandomDomain(new ManagedChannel[] {channel1, channel2});
    channel1.start(Channel.DEFAULT);
    channel2.start(Channel.DEFAULT);
}
项目:WBSAirback    文件:TestDataIntegrity.java   
@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);
}