1   /*
2    * Copyright 2004-2005 Alvaro Gonzalez de Paz (kortsoft)
3    *
4    * Licensed under the Apache License, Version 2.0 (the "License")
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    *     http://www.apache.org/licenses/LICENSE-2.0
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  package kortsoft.kmx.deployer;
17  
18  import java.io.File;
19  import java.util.ArrayList;
20  import java.util.List;
21  
22  import javax.management.MBeanServer;
23  
24  /***
25   * <a href="MockDeployer.java.html"><b><i>View Source</i></b></a>
26   *
27   * @author  Alvaro
28   * @version $Revision: 1.2 $
29   *
30   */
31  public class MockDeployer implements Deployer {
32      protected static int numDeployCalled=0;
33      protected static List<File> files=new ArrayList<File>();
34      protected static ClassLoader parentClassLoader;
35      protected static MBeanServer mbeanServer;
36  
37      /* (non-Javadoc)
38       * @see kortsoft.kmx.deployer.Deployer#deployElement(java.io.File, java.io.File)
39       */
40      public void deployElement(File file) {
41          numDeployCalled++;
42          files.add(file);
43      }
44      /* (non-Javadoc)
45       * @see kortsoft.kmx.deployer.Deployer#setMBeanServer(javax.management.MBeanServer)
46       */
47      public void setMBeanServer(MBeanServer server) {
48          mbeanServer=server;
49  
50      }
51      /* (non-Javadoc)
52       * @see kortsoft.kmx.deployer.Deployer#setParent(java.lang.ClassLoader)
53       */
54      public void setParent(ClassLoader parent) {
55          parentClassLoader=parent;
56      }
57  }