1   package org.apache.fulcrum.yaafi;
2   
3   /*
4    * Licensed to the Apache Software Foundation (ASF) under one
5    * or more contributor license agreements.  See the NOTICE file
6    * distributed with this work for additional information
7    * regarding copyright ownership.  The ASF licenses this file
8    * to you under the Apache License, Version 2.0 (the
9    * "License"); you may not use this file except in compliance
10   * with the License.  You may obtain a copy of the License at
11   *
12   *   http://www.apache.org/licenses/LICENSE-2.0
13   *
14   * Unless required by applicable law or agreed to in writing,
15   * software distributed under the License is distributed on an
16   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17   * KIND, either express or implied.  See the License for the
18   * specific language governing permissions and limitations
19   * under the License.
20   */
21  
22  
23  import java.io.File;
24  
25  /**
26   * This is a simple component that is only used to test the avalon component
27   * service.
28   *
29   * @author <a href="mailto:quintonm@bellsouth.net">Quinton McCombs</a>
30   */
31  public interface TestComponent
32  {
33      /** the role name of the service */
34      static final String ROLE = "org.apache.fulcrum.yaafi.TestComponent";
35  
36      /** the service method to be called during testing */
37      void test();
38  
39      /**
40       * @return Returns the bar.
41       */
42      String getBar();
43  
44      /**
45       * @return Returns the componentName.
46       */
47      String getComponentName();
48  
49      /**
50       * @return Returns the decomissioned.
51       */
52      boolean isDecomissioned();
53  
54      /**
55       * @return Returns the foo.
56       */
57      String getFoo();
58  
59      /**
60       * @return Returns the urnAvalonClassLoader.
61       */
62      ClassLoader getUrnAvalonClassLoader();
63  
64      /**
65       * @return Returns the urnAvaloneHome.
66       */
67      File getUrnAvaloneHome();
68  
69      /**
70       * @return Returns the urnAvaloneTemp.
71       */
72      File getUrnAvaloneTemp();
73  
74      /**
75       * @return Returns the urnAvalonName.
76       */
77      String getUrnAvalonName();
78  
79      /**
80       * @return Returns the urnAvalonPartition.
81       */
82      String getUrnAvalonPartition();
83  
84      /**
85       * Alwayas throws an exception
86       */
87      void createException(String reason, Object caller);
88  
89      /**
90       * Do something for the given time
91       * @param millis
92       */
93      public void doSomething(long millis, Object arg);
94  }