|
Jitsi: the OpenSource Java VoIP and Instant Messaging client. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.java.sip.communicator.util.launchutils.LaunchArgHandler
public class LaunchArgHandler
The LauncherArgHandler class handles invocation arguments that have been passed to us when running SIP Communicator. The class supports a fixed set of options and also allows for registration of delegates.
| Field Summary | |
|---|---|
static int |
ACTION_CONTINUE
Returned by the handleArgs methods when all arguments have been parsed and the SIP Communicator launch can continue. |
static int |
ACTION_CONTINUE_LOCK_DISABLED
Returned by the handleArgs methods when all arguments have been successfully parsed and one of them indicates that the user has requested a multi instance launch. |
static int |
ACTION_ERROR
Returned by the handleArgs method when parsing the arguments has failed or if no arguments were passed and an instance of SC was already launched. |
static int |
ACTION_EXIT
Returned by the handleArgs methods when the arguments that have been parsed do not require for SIP Communicator to be started and the Launcher is supposed to exit. |
static int |
ERROR_CODE_ALREADY_STARTED
The error code returned when we try to launch SIP Communicator while there is already a running instance and there were no arguments that we forward to that instance. |
static int |
ERROR_CODE_CREATE_DIR_FAILED
The error code that we return when we fail to create a directory that has been specified with the -c|--config option. |
static int |
ERROR_CODE_UNKNOWN_ARG
The error code returned when we couldn't parse one of the options. |
| Method Summary | |
|---|---|
int |
getErrorCode()
Returns an error code that could help identify an error when handleArgs returns ACTION_ERROR or 0 if everything went fine. |
static LaunchArgHandler |
getInstance()
Creates a singleton instance of the LauncherArgHandler if necessary and returns a reference to it. |
int |
handleArgs(String[] args)
Does the actual argument handling. |
void |
handleConcurrentInvocationRequestArgs(String[] args)
Called when the user has tried to launch a second instance of SIP Communicator while a first one was already running. |
void |
handleHelpArg()
Prints a help message containing usage instructions and descriptions of all options currently supported by Jitsi. |
void |
handleUnknownArg(String arg)
Prints an error message and then prints the help message. |
void |
setDelegationPeer(ArgDelegationPeer delegationPeer)
Sets the delegationPeer that would be handling all URIs passed as command line arguments to SIP Communicator. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int ACTION_EXIT
public static final int ACTION_CONTINUE
public static final int ACTION_ERROR
public static final int ACTION_CONTINUE_LOCK_DISABLED
public static final int ERROR_CODE_UNKNOWN_ARG
public static final int ERROR_CODE_ALREADY_STARTED
public static final int ERROR_CODE_CREATE_DIR_FAILED
| Method Detail |
|---|
public static LaunchArgHandler getInstance()
public int handleArgs(String[] args)
args - the arguments the way we have received them from the main()
method.
public void handleUnknownArg(String arg)
arg - the unknown argument we need to printpublic void handleHelpArg()
public int getErrorCode()
public void setDelegationPeer(ArgDelegationPeer delegationPeer)
delegationPeer - the delegationPeer that should handle URIs
or null if we'd like to unset a previously set peer.public void handleConcurrentInvocationRequestArgs(String[] args)
args - the args that we need to handle.
|
Jitsi: the OpenSource Java VoIP and Instant Messaging client. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||