Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.impl.protocol.sip
Class SipApplicationData

java.lang.Object
  extended by net.java.sip.communicator.impl.protocol.sip.SipApplicationData

public class SipApplicationData
extends Object

The only Object with should be used as parameter for any JAIN-SIP class setApplicationData() method (available for instance with Dialog-s and Transaction-s). Allows several parts of SC code to interact independently with setApplicationData(...)/getApplicationData() without stepping on eachother's toes. Utility functions are provided to set/get data from a supported object.

Author:
Sebastien Mazy

Field Summary
static String KEY_SERVICE
          Key service.
static String KEY_SUBSCRIPTIONS
          Key subscriptions.
 
Constructor Summary
SipApplicationData()
           
 
Method Summary
static Object getApplicationData(Object container, String key)
          Retrieves a value associated to the a key string in the container.
static void setApplicationData(Object container, String key, Object value)
          Stores a value associated to the a key string in the container.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

KEY_SERVICE

public static final String KEY_SERVICE
Key service.

See Also:
Constant Field Values

KEY_SUBSCRIPTIONS

public static final String KEY_SUBSCRIPTIONS
Key subscriptions.

See Also:
Constant Field Values
Constructor Detail

SipApplicationData

public SipApplicationData()
Method Detail

setApplicationData

public static void setApplicationData(Object container,
                                      String key,
                                      Object value)
Stores a value associated to the a key string in the container. Currently SIPMessage, Transaction and Dialog are supported as container.

Parameters:
container - the Object to attach the key/value pair to.
key - the key string to retrieve the value later with get()
value - the value to store

getApplicationData

public static Object getApplicationData(Object container,
                                        String key)
Retrieves a value associated to the a key string in the container. Currently SIPMessage, Transaction and Dialog are supported as container.

Parameters:
container - the Object to retrieve a value from.
key - the key string to identify the value to retrieve
Returns:
the returned value or null if it is not found

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

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