Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.util.launchutils
Class ArgDelegator

java.lang.Object
  extended by net.java.sip.communicator.util.launchutils.ArgDelegator

 class ArgDelegator
extends Object

The ArgDelegator implements an utility for handling args that have been passed as command line arguments but that need the OSGi environment and SIP Communicator to be fully loaded. The class maintains a list of registered delegates (ArgDelegationPeers) that do the actual arg handling. The ArgDelegator is previewed for use with the SIP Communicator argdelegation service. It would therefore record all args until the corresponding DelegationPeer has registered here.

Author:
Emil Ivov

Constructor Summary
ArgDelegator()
           
 
Method Summary
 void handleConcurrentInvocationRequest()
          Called when the user has tried to launch a second instance of SIP Communicator while a first one was already running.
protected  void handleUri(String uriArg)
          Passes the uriArg to the uri delegation peer or, in case no peer is currently registered, stores it and keeps it until one appears.
 void setDelegationPeer(ArgDelegationPeer delegationPeer)
          Sets a delegation peer that we can now use to pass arguments to and makes it handle all arguments that have been already registered.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ArgDelegator

ArgDelegator()
Method Detail

handleUri

protected void handleUri(String uriArg)
Passes the uriArg to the uri delegation peer or, in case no peer is currently registered, stores it and keeps it until one appears.

Parameters:
uriArg - the uri argument that we'd like to delegate to our peer.

setDelegationPeer

public void setDelegationPeer(ArgDelegationPeer delegationPeer)
Sets a delegation peer that we can now use to pass arguments to and makes it handle all arguments that have been already registered.

Parameters:
delegationPeer - the delegation peer that we can use to deliver command line URIs to.

handleConcurrentInvocationRequest

public void handleConcurrentInvocationRequest()
Called when the user has tried to launch a second instance of SIP Communicator while a first one was already running. This method simply calls its peer method from the ArgDelegationPeer and does nothing if no peer is currently registered.


Jitsi: the OpenSource Java VoIP and Instant Messaging client.

Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under LGPL license.