public void setRealm(Realm realm) {
        if (realm == null) {
            throw new IllegalArgumentException("Realm argument cannot be null");
        }
        Collection<Realm> realms = new ArrayList<Realm>(1);
        realms.add(realm);
        setRealms(realms);
    }
Convenience method for applications using a single realm that merely wraps the realm in a list and then invokes
the {@link #setRealms} method.

@param realm the realm to set for a single-realm application.
@since 0.2
core/src/main/java/org/apache/shiro/mgt/RealmSecurityManager.java