public class SipCommunicatorLock
extends java.lang.Thread
Modifier and Type | Field and Description |
---|---|
static int |
ALREADY_STARTED
Returned by the soft start method to indicate that an instance of Jitsi
has been already started and we should exit.
|
static int |
LOCK_ERROR
Indicates that something went wrong.
|
static int |
SUCCESS
Returned by the soft start method to indicate that we have successfully
started and locked the configuration directory.
|
Constructor and Description |
---|
SipCommunicatorLock() |
Modifier and Type | Method and Description |
---|---|
int |
tryLock(java.lang.String[] args)
Tries to lock the configuration directory.
|
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, run, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
public static final int LOCK_ERROR
public static final int SUCCESS
public static final int ALREADY_STARTED
public int tryLock(java.lang.String[] args)
There are three possible outcomes of this method. 1. We lock successfully; 2. We fail to lock because another instance of Jitsi is already running; 3. We fail to lock for some unknown error. Each of these cases is represented by an error code returned as a result.
args
- the array of arguments that we are to submit in case an
instance of Jitsi has already been started.
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.