HttpRequest.getAttribute

Returns the value of user defined attribute associated with the specified key. If there's no such attribute, the specified default value is associated with the specified key, and the default value is returned. This method is same with the following code except that the operation is performed atomically. <pre> if (containsAttribute(key)) { return getAttribute(key); } else { setAttribute(key, defaultValue); return defaultValue; } </pre>

@param key the key of the attribute we want to retreive @param defaultValue the default value of the attribute @return The retrieved attribute or <tt>null</tt> if not found

  1. Object getAttribute(string key)
  2. Object getAttribute(string key, Object defaultValue)
    class HttpRequest
    Object
    getAttribute
    (
    string key
    ,)

Meta