1 /*
2 * Copyright 2006-2016 The JGUIraffe Team.
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 net.sf.jguiraffe.gui.app;
17
18 /**
19 * <p>
20 * Definition of an interface for objects that need a reference to the central
21 * {@link Application} object.
22 * </p>
23 * <p>
24 * This interface can be implemented by objects that are automatically created
25 * by the dependency injection framework during the initialization phase of an
26 * application. It indicates that the implementing object needs access to the
27 * global {@link Application} object. The framework will recognize this and pass
28 * a reference to the {@link Application} to the object after its creation.
29 * </p>
30 *
31 * @see Application
32 * @author Oliver Heger
33 * @version $Id: ApplicationClient.java 205 2012-01-29 18:29:57Z oheger $
34 */
35 public interface ApplicationClient
36 {
37 /**
38 * Sets a reference to the global {@code Application} object. This method is
39 * automatically invoked by the framework.
40 *
41 * @param app the reference to the global application
42 */
43 void setApplication(Application app);
44 }