KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > javax > jnlp > SingleInstanceService


1 /*
2  * @(#)SingleInstanceService.java 1.4 04/03/12
3  *
4  * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
5  * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
6  */

7
8 package javax.jnlp;
9
10 /**
11  * <code>SingleInstanceService</code> allow applications launched under Java
12  * Web Start to register themselves as singletons, and to be passed in new
13  * parameter sets when user attempts to launch new instances of them.
14  *
15  * @since 1.5
16  */

17
18
19 public interface SingleInstanceService {
20  /**
21    * Adds the specified SingleInstanceListener to handle how the application/applet
22    * should behave when another instance of the same application/applet is invoked.
23    *
24    * If SingleInstanceListener sil is null, no exception is thrown and no
25    * action is performed.
26    *
27    * @param sil the SingleInstanceListener object to be added
28    *
29    */

30
31     public void addSingleInstanceListener(javax.jnlp.SingleInstanceListener sil);
32
33  /**
34    * Removes the specified SingleInstanceListener. This method performs
35    * no function, nor does it throw an exception, if the listener specified
36    * by the argument was not previously added to the application/applet.
37    * If listener sil is null, no exception is thrown and no action is
38    * performed.
39    *
40    * It is recommended that if an application/applet registered any
41    * SingleInstanceListener(s), it should call this method to remove all
42    * listeners upon exit of the application/applet.
43    *
44    * @param sil the SingleInstanceListener object to be removed
45    *
46    */

47     public void removeSingleInstanceListener(javax.jnlp.SingleInstanceListener sil);
48
49 }
50
Popular Tags