KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > inversoft > junit > internal > MediatorFactory


1 /*
2  * Copyright (c) 2003, Inversoft
3  *
4  * This software is distribuable under the GNU Lesser General Public License.
5  * For more information visit gnu.org.
6  */

7 package com.inversoft.junit.internal;
8
9
10 /**
11  * This class is used to construct the mediators
12  *
13  * @author Brian Pontarelli
14  * @since 2.0
15  * @version 2.0
16  */

17 public class MediatorFactory {
18
19     /**
20      * This is a static toolkit
21      */

22     private MediatorFactory() {
23         // EMPTY
24
}
25
26     /**
27      * Constructs the appropriate Mediator implementation depending on the value
28      * of the isLocal parameter. Since the Mediators dictate whether or not the
29      * test is run locally or remotely.
30      */

31     public static final Mediator buildMediator(boolean isLocal) {
32
33         if (isLocal) {
34             return new LocalMediator();
35         }
36
37         return new RemoteMediator();
38     }
39 }
40
Popular Tags