org.apache.catalina.tribes.group.interceptors.TcpFailureDetector Java Examples
The following examples show how to use
org.apache.catalina.tribes.group.interceptors.TcpFailureDetector.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: CoordinationDemo.java From Tomcat8-Source-Read with MIT License | 6 votes |
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 MessageDispatchInterceptor()); return channel; }
Example #2
Source File: CoordinationDemo.java From Tomcat7.0.67 with Apache License 2.0 | 6 votes |
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; }
Example #3
Source File: CoordinationDemo.java From tomcatsrc with Apache License 2.0 | 6 votes |
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; }