/*
(non-Javadoc)

@see
com.ibm.websphere.servlet.session.IBMApplicationSession#getAttribute(java
.lang.String)
978136
public Object getAttribute(String name) {
        if (!_iSess.isValid())
            throw new IllegalStateException();
        Object value = null;
        if (_iSess != null) {
            value = _iSess.getAttribute(name);
        }
        return value;
    }
1200157
@Override
	public String getAttributeValue(String namespace, String name) {
		for (int i = (attributeCount * 4) - 4; i >= 0; i -= 4) {
			if (attributes[i + 2].equals(name) && (namespace == null || attributes[i].equals(namespace))) {
				return attributes[i + 3];
			}
		}

		return null;
	}
305970
@SuppressWarnings("unchecked")
   public <T> Attribute<T> attribute(String name) {
      return (Attribute<T>) this.attributes.get(name);
   }
75092
@SuppressWarnings("unchecked")
	static <T> T getAttribute(ObjectName name, String attribute) throws JMException {
		return (T) MBEAN_SERVER.getAttribute(name, attribute);
	}
1346815
@SuppressWarnings("unchecked")
    private <A> A getRequestAttribute(String name) {

        Object attribute = m_request.getAttribute(name);

        return attribute != null ? (A)attribute : null;
    }
519831
@Override
    public Object getAttribute(String name) {
        if (name == null) {
            logger.logp(Level.SEVERE, CLASS_NAME, "getAttribute", servlet40NLS.getString("name.is.null"));
            throw new java.lang.NullPointerException(servlet40NLS.getString("name.is.null"));
        }

        return super.getAttribute(name);
    }
149653
public <T> T getAttribute(final CIAttribute _attribute)
        throws EFapsException
    {
        return this.<T>getAttribute(_attribute.name);
    }
1042647
@Override
    public Object getAttribute(String arg0) {
        try {
            collaborator.preInvoke(componentMetaData);
            return request.getAttribute(arg0);
        } finally {
            collaborator.postInvoke();
        }
    }
252908
@Override
    public Object getAttribute(final String name) {
        return ProfileHelper.getInternalAttributeHandler().restore(this.attributes.get(name));
    }
751932
public Object getSessionAttr(final String attrName) {
    final HttpSession sess = request.getSession(false);

    if (sess == null) {
      return null;
    }

    return sess.getAttribute(attrName);
  }
254992
static String getAttributeValue(Element element, String name) {
        Attr attribute = element.getAttributeNode(name);
        if (attribute == null) {
            return null;
        } else {
            return attribute.getValue();
        }
    }
672448
public Object getAttribute(String arg0) {
        // 321485
        if (TraceComponent.isAnyTracingEnabled()&&logger.isLoggable (Level.FINE)) {  //306998.15
            logger.logp(Level.FINE, CLASS_NAME,"getAttribute", "this->"+this+": "+" name --> " + arg0);
        }

        if (WCCustomProperties.CHECK_REQUEST_OBJECT_IN_USE){
            checkRequestObjectInUse();
        }

        Object obj = _srtRequestHelper._attributes.get(arg0);
        if (obj == null) {
            if (((WebAppDispatcherContext)getDispatchContext()).isSecurityEnabledForApplication()) {
                if (arg0.equalsIgnoreCase(JAVAX_NET_SSL_PEER_CERTS) ||
                                arg0.equalsIgnoreCase(JAVAX_SERVLET_REQUEST_X509CERTIFICATE)) {
                    obj = getPeerCertificates();
                } else if (arg0.equalsIgnoreCase(JAVAX_NET_SSL_CIPHER_SUITE)) {
                    obj = getCipherSuite();
                } else if (arg0.equalsIgnoreCase(DIRECT_CONNECTION_PEER_CERTS)){
                    obj = getDirectConnectionPeerCertificates();
                } else if (arg0.equalsIgnoreCase(DIRECT_CONNECTION_CIPHER_SUITE)){
                    obj = getDirectConnectionCipherSuite();
                } else if (arg0.equalsIgnoreCase(IS_DIRECT_CONNECTION)){
                    obj = isDirectConnection();
                } else if (arg0.equals(WebContainerConstants.JAVAX_SERVLET_REQUEST_SSL_SESSION_ID)){
                    obj = this.getSSLSessionId();
                }
            }
        }
        return obj;
    }
28459
public String getAttribute(final String name) {
        for(AttributeInfo item : attributes) {
            if(item.name.equals(name)) {
                return item.value;
            }
        }
        
        return null;
    }
1192761
public Object getAttribute(String key) {

        if (m_attributes == null) {
            return null;
        }
        return m_attributes.get(key);
    }
450478
public Attribute getAttributeByName(String name) {
		for (Attribute a : attributes)
			if (name.equals(a.getName()))
				return a;
		return null;
	}
498680
public Object getAttribute(String arg0) {
        //321485
    	if (_attributes==null)
    		return null;
        if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled()&&logger.isLoggable (Level.FINE)) {  //306998.15
            logger.logp(Level.FINE, CLASS_NAME,"getAttribute", " name --> " + arg0);
        }
    	Object obj = _attributes.get(arg0);
        return obj;
    }
1297262
public <T> T getAttribute(String attrName, Class<T> clazz) {
        Lock lock = lockForRead();
        try {
            return MapUtils.getValue(attributes, attrName, clazz);
        } finally {
            lock.unlock();
        }
    }