KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sslexplorer > agent > client > util > ApplicationType


1 /*
2  * SSL-Explorer
3  *
4  * Copyright (C) 2003-2006 3SP LTD. All Rights Reserved
5  *
6  * This program is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU General Public License
8  * as published by the Free Software Foundation; either version 2 of
9  * the License, or (at your option) any later version.
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public
16  * License along with this program; if not, write to the Free Software
17  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18  */

19             
20 package com.sslexplorer.agent.client.util;
21
22 import java.io.IOException JavaDoc;
23
24 import com.sslexplorer.agent.client.util.types.JavaApplicationType;
25
26 /**
27  * The application launching classes are capable of launching applicaitons of
28  * different types.
29  * <p>
30  * Implementatiosn of this interface are responsible for accepting configuration
31  * information from the launching classes and performing the actual launch.
32  * <p>
33  * For example, the {@link JavaApplicationType} must locate Java, create a
34  * classpath for the application and launch it in a way appropriate for the
35  * current platform.
36  *
37  * @author Brett Smith <a HREF="mailto: brett@3sp.com">&lt;brett@3sp.com&gt;</a>
38  */

39 public interface ApplicationType {
40     /**
41      * Prepare the application for launch.
42      *
43      * @param launcher launcher
44      * @param events events callback
45      * @param element configuration element
46      * @throws IOException on any error
47      */

48     public void prepare(AbstractApplicationLauncher launcher, ApplicationLauncherEvents events, XMLElement element) throws IOException JavaDoc;
49
50     /**
51      * Start the application
52      */

53     public void start();
54
55     /**
56      * Get the process monitor that is watch the applications output or <code>null</code>
57      * if this type doesn't have one/
58      *
59      * @return process monitor
60      */

61     public ProcessMonitor getProcessMonitor();
62
63     /**
64      * Get any parameters to add to the redirect when running from the SSL-Explorer
65      * web interface. Parameters must be encoded name value pairs separated by '&'.
66      *
67      * @return redirect parameters
68      */

69     public String JavaDoc getRedirectParameters();
70     
71     /**
72      * Get the type name. This is used to determine the element name
73      * to look for in the descriptor for the type specific options.
74      *
75      * @return type name
76      */

77     public String JavaDoc getTypeName();
78
79 }
80
Popular Tags