KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > avalon > phoenix > interfaces > Application


1 /*
2  * Copyright (C) The Apache Software Foundation. All rights reserved.
3  *
4  * This software is published under the terms of the Apache Software License
5  * version 1.1, a copy of which has been included with this distribution in
6  * the LICENSE.txt file.
7  */

8 package org.apache.avalon.phoenix.interfaces;
9
10 /**
11  * The Application is a self-contained component that performs a specific
12  * function.
13  *
14  * Example ServerApplications may be a Mail Server, File Server, Directory Server etc.
15  * Example JesktopApplications may be a Spreadsheet program, browser, mail client
16  * Example WebApplications may be a particular website or application within a website
17  *
18  * @author <a HREF="mailto:peter at apache.org">Peter Donald</a>
19  */

20 public interface Application
21 {
22     /** Role String for interface */
23     String JavaDoc ROLE = Application.class.getName();
24
25     /**
26      * Set the context in which the Application is "executed".
27      *
28      * @param context the applications context
29      */

30     void setApplicationContext( ApplicationContext context );
31
32     /**
33      * Retrieve names of Blocks contained in application.
34      *
35      * @return
36      */

37     String JavaDoc[] getBlockNames();
38
39     /**
40      * Retrieve Block with specified name.
41      * If no such block exists a null will be returned.
42      *
43      * @param name the name of block to retrieve
44      * @return the coresponding block or null if none
45      */

46     Object JavaDoc getBlock( String JavaDoc name );
47 }
48
Popular Tags