Search in sources :

Example 6 with ManagedChannel

use of org.apache.catalina.tribes.ManagedChannel in project tomcat by apache.

the class MembersWithProperties method main.

@SuppressWarnings("unused")
public static void main(String[] args) throws Exception {
    if (args.length == 0)
        usage();
    main = Thread.currentThread();
    ManagedChannel channel = (ManagedChannel) ChannelCreator.createChannel(args);
    Properties props = new Properties();
    props.setProperty("mydomainkey", "mydomainvalue");
    props.setProperty("someotherkey", Arrays.toString(UUIDGenerator.randomUUID(true)));
    new MembersWithProperties(channel, props);
    channel.start(Channel.DEFAULT);
    Runtime.getRuntime().addShutdownHook(new Shutdown(channel));
    try {
        Thread.sleep(Long.MAX_VALUE);
    } catch (InterruptedException ix) {
        //allow everything to shutdown
        Thread.sleep(5000);
    }
}
Also used : ManagedChannel(org.apache.catalina.tribes.ManagedChannel) Properties(java.util.Properties)

Aggregations

ManagedChannel (org.apache.catalina.tribes.ManagedChannel)6 Properties (java.util.Properties)2 ArrayList (java.util.ArrayList)1 Channel (org.apache.catalina.tribes.Channel)1 ChannelInterceptor (org.apache.catalina.tribes.ChannelInterceptor)1 ChannelReceiver (org.apache.catalina.tribes.ChannelReceiver)1 ChannelSender (org.apache.catalina.tribes.ChannelSender)1 Member (org.apache.catalina.tribes.Member)1 MembershipService (org.apache.catalina.tribes.MembershipService)1 GroupChannel (org.apache.catalina.tribes.group.GroupChannel)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 MessageDispatchInterceptor (org.apache.catalina.tribes.group.interceptors.MessageDispatchInterceptor)1 OrderInterceptor (org.apache.catalina.tribes.group.interceptors.OrderInterceptor)1 StaticMembershipInterceptor (org.apache.catalina.tribes.group.interceptors.StaticMembershipInterceptor)1 TcpFailureDetector (org.apache.catalina.tribes.group.interceptors.TcpFailureDetector)1 ThroughputInterceptor (org.apache.catalina.tribes.group.interceptors.ThroughputInterceptor)1 McastService (org.apache.catalina.tribes.membership.McastService)1 MemberImpl (org.apache.catalina.tribes.membership.MemberImpl)1