org.apache.catalina.tribes.group.interceptors.DomainFilterInterceptor Java Examples

The following examples show how to use org.apache.catalina.tribes.group.interceptors.DomainFilterInterceptor. 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: TesterUtil.java    From Tomcat8-Source-Read with MIT License 5 votes vote down vote up
public static void addRandomDomain(ManagedChannel[] channels) {
    if (channels == null) {
        return;
    }

    byte[] domain = UUIDGenerator.randomUUID(false);

    for (ManagedChannel channel : channels) {
        channel.getMembershipService().setDomain(domain);
        DomainFilterInterceptor filter = new DomainFilterInterceptor();
        filter.setDomain(domain);
        channel.addInterceptor(filter);
    }
}
 
Example #2
Source File: TesterUtil.java    From Tomcat7.0.67 with Apache License 2.0 5 votes vote down vote up
/**
 * Configures a set of channels to use a random domain. Use to ensure that
 * multiple instance of the test suite do not interfere when running on the
 * same machine. This may happen in a CI system or when a developer is
 * running tests for multiple branches in parallel.
 */
public static void addRandomDomain(ManagedChannel[] channels) {
    if (channels == null) {
        return;
    }

    byte[] domain = UUIDGenerator.randomUUID(false);

    for (ManagedChannel channel : channels) {
        channel.getMembershipService().setDomain(domain);
        DomainFilterInterceptor filter = new DomainFilterInterceptor();
        filter.setDomain(domain);
        channel.addInterceptor(filter);
    }
}
 
Example #3
Source File: TesterUtil.java    From tomcatsrc with Apache License 2.0 5 votes vote down vote up
/**
 * Configures a set of channels to use a random domain. Use to ensure that
 * multiple instance of the test suite do not interfere when running on the
 * same machine. This may happen in a CI system or when a developer is
 * running tests for multiple branches in parallel.
 */
public static void addRandomDomain(ManagedChannel[] channels) {
    if (channels == null) {
        return;
    }

    byte[] domain = UUIDGenerator.randomUUID(false);

    for (ManagedChannel channel : channels) {
        channel.getMembershipService().setDomain(domain);
        DomainFilterInterceptor filter = new DomainFilterInterceptor();
        filter.setDomain(domain);
        channel.addInterceptor(filter);
    }
}