@Override
  public void valueBound(HttpSessionBindingEvent httpSessionBindingEvent) {
    if (_httpSessionBindingListeners == null) {
      return;
    }

    for (HttpSessionBindingListener httpSessionBindingListener : _httpSessionBindingListeners) {

      httpSessionBindingListener.valueBound(httpSessionBindingEvent);
    }
  }
  public void setAttribute(@Nonnull final String sName, @Nullable final Object aValue) {
    ValueEnforcer.notNull(sName, "Name");

    if (aValue != null) {
      m_aAttributes.put(sName, aValue);
      if (aValue instanceof HttpSessionBindingListener)
        ((HttpSessionBindingListener) aValue)
            .valueBound(new HttpSessionBindingEvent(this, sName, aValue));
    } else {
      removeAttribute(sName);
    }
  }
Esempio n. 3
0
 private synchronized void callValueBoundMethod(String key, Object value) {
   if (value instanceof HttpSessionBindingListener) {
     HttpSessionBindingEvent event = new HttpSessionBindingEvent(this, key, value);
     ((HttpSessionBindingListener) value).valueBound(event);
   }
 }