Package net.sourceforge.jnlp.services
Class XSingleInstanceService
java.lang.Object
net.sourceforge.jnlp.services.XSingleInstanceService
- All Implemented Interfaces:
SingleInstanceService
This class implements SingleInstanceService
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
Create a new XSingleInstanceService -
Method Summary
Modifier and TypeMethodDescriptionvoid
Add the specified SingleInstanceListenervoid
checkSingleInstanceRunning
(JNLPFile jnlpFile) Check if another instance of this application is already runningvoid
Initialize the new SingleInstanceServicevoid
Remove the specified SingleInstanceListener
-
Constructor Details
-
XSingleInstanceService
protected XSingleInstanceService()Create a new XSingleInstanceService
-
-
Method Details
-
initializeSingleInstance
public void initializeSingleInstance()Initialize the new SingleInstanceService- Throws:
InstanceExistsException
- if the instance already exists
-
checkSingleInstanceRunning
Check if another instance of this application is already running- Parameters:
jnlpFile
- TheJNLPFile
that specifies the application- Throws:
InstanceExistsException
- if an instance of this application already exists
-
addSingleInstanceListener
Add the specified SingleInstanceListener- Specified by:
addSingleInstanceListener
in interfaceSingleInstanceService
- Parameters:
sil
- the single instance listener to be added. No action is performed if it is null.- Throws:
InstanceExistsException
- which is likely to terminate the application but not guaranteed to
-
removeSingleInstanceListener
Remove the specified SingleInstanceListener- Specified by:
removeSingleInstanceListener
in interfaceSingleInstanceService
- Parameters:
sil
- the single instance listener to be removed. No action is performed if it is null or not in the notification list.- Throws:
InstanceExistsException
- if an instance of this single instance application already exists
-