/** * Sets the realms managed by this <tt>SecurityManager</tt> instance. * * @param realms the realms managed by this <tt>SecurityManager</tt> instance. * @throws IllegalArgumentException if the realms collection is null or empty. */ public void setRealms(Collection<Realm> realms) { if (realms == null) { throw new IllegalArgumentException("Realms collection argument cannot be null."); } if (realms.isEmpty()) { throw new IllegalArgumentException("Realms collection argument cannot be empty."); } this.realms = realms; afterRealmsSet(); }
/** * Passes on the {@link #getRealms() realms} to the internal delegate <code>Authenticator</code> instance so * that it may use them during authentication attempts. */ protected void afterRealmsSet() { super.afterRealmsSet(); if (this.authenticator instanceof ModularRealmAuthenticator) { ((ModularRealmAuthenticator) this.authenticator).setRealms(getRealms()); } }
/** * Sets the realms managed by this <tt>SecurityManager</tt> instance. * * @param realms the realms managed by this <tt>SecurityManager</tt> instance. * @throws IllegalArgumentException if the realms collection is null or empty. */ public void setRealms(Collection<Realm> realms) { if (realms == null) { throw new IllegalArgumentException("Realms collection argument cannot be null."); } if (realms.isEmpty()) { throw new IllegalArgumentException("Realms collection argument cannot be empty."); } this.realms = realms; afterRealmsSet(); }
/** * Passes on the {@link #getRealms() realms} to the internal delegate <code>Authenticator</code> instance so * that it may use them during authentication attempts. */ protected void afterRealmsSet() { super.afterRealmsSet(); if (this.authenticator instanceof ModularRealmAuthenticator) { ((ModularRealmAuthenticator) this.authenticator).setRealms(getRealms()); } }
/** * Sets the realms managed by this <tt>SecurityManager</tt> instance. * * @param realms the realms managed by this <tt>SecurityManager</tt> instance. * @throws IllegalArgumentException if the realms collection is null or empty. */ public void setRealms(Collection<Realm> realms) { if (realms == null) { throw new IllegalArgumentException("Realms collection argument cannot be null."); } if (realms.isEmpty()) { throw new IllegalArgumentException("Realms collection argument cannot be empty."); } this.realms = realms; afterRealmsSet(); }
/** * Passes on the {@link #getRealms() realms} to the internal delegate <code>Authenticator</code> instance so * that it may use them during authentication attempts. */ protected void afterRealmsSet() { super.afterRealmsSet(); if (this.authenticator instanceof ModularRealmAuthenticator) { ((ModularRealmAuthenticator) this.authenticator).setRealms(getRealms()); } }