public static boolean canAccess(String subdomain) {
        // By default there is no permission defined for the XMPP entity
        Permission permission = null;

        ExternalComponentConfiguration config = getConfiguration(subdomain, true);
        if (config != null) {
            permission = config.getPermission();
        }

        if (PermissionPolicy.blacklist == getPermissionPolicy()) {
            // Anyone can access except those entities listed in the blacklist
            return Permission.blocked != permission;
        }
        else {
            // Access is limited to those present in the whitelist
            return Permission.allowed == permission;
        }
    }
Returns true if the external component with the specified subdomain can connect to the
local server.

@param subdomain the subdomain of the external component.
@return true if the external component with the specified subdomain can connect to the
        local server.
xmppserver/src/main/java/org/jivesoftware/openfire/component/ExternalComponentManager.java