KickJava   Java API By Example, From Geeks To Geeks.

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


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
25 /**
26  * Callback interface for events will occur during the launching of an
27  * application.
28  *
29  * @author Brett Smith <a HREF="mailto: brett@3sp.com">&lt;brett@3sp.com&gt;</a>
30  */

31 public interface ApplicationLauncherEvents {
32
33     /**
34      * Application is starting to launch
35      *
36      * @param application
37      */

38     public void startingLaunch(String JavaDoc application);
39
40     /**
41      * Processing the application extension descriptor
42      */

43     public void processingDescriptor();
44
45     /**
46      * Starting to download all files.
47      *
48      * @param totalNumBytes total number of bytes to download
49      */

50     public void startDownload(long totalNumBytes);
51
52     /**
53      * Download is progressing.
54      *
55      * @param bytesSoFar bytes downloaded so far
56      */

57     public void progressedDownload(long bytesSoFar);
58
59     /**
60      * Download is complete.
61      */

62     public void completedDownload();
63
64     /**
65      * Starting to execute application.
66      *
67      * @param name application name
68      * @param cmdline command line arguments
69      */

70     public void executingApplication(String JavaDoc name, String JavaDoc cmdline);
71
72     /**
73      * Completed launching the application.
74      */

75     public void finishedLaunch();
76
77     /**
78      * Create an application tunnel for the application to use.
79      *
80      * @param name name
81      * @param hostToConnect host to connect
82      * @param portToConnect port to connect
83      * @param usePreferredPort use preferred port
84      * @param singleConnection accept only a single connection then exit
85      * @param sourceInterface source interface
86      * @return tunnel configuration
87      * @throws IOException
88      */

89     public TunnelConfiguration createTunnel(String JavaDoc name, String JavaDoc hostToConnect, int portToConnect, boolean usePreferredPort,
90                                boolean singleConnection, String JavaDoc sourceInterface) throws IOException JavaDoc;
91
92     /**
93      * Write message to debug log.
94      *
95      * @param msg message
96      */

97     public void debug(String JavaDoc msg);
98     
99     /**
100      * Process the msg.
101      * @param msg message
102      */

103     public void error(String JavaDoc msg);
104 }
Popular Tags