Source:
public SaslServer build() throws IOException { if (securityDomain == null) { securityDomain = createSecurityDomain(); } if (securityDomainReference != null) { securityDomainReference.setReference(securityDomain); } SaslServerFactory factory = obtainSaslServerFactory(serverFactoryClass); if (providerSupplier != null) { factory = new SecurityProviderSaslServerFactory(providerSupplier); } if (properties != null && properties.size() > 0) { if (properties.containsKey(WildFlySasl.REALM_LIST)) { factory = new AvailableRealmsSaslServerFactory(factory); } factory = new PropertiesSaslServerFactory(factory, properties); } if (bindingTypeAndData != null) { factory = new ChannelBindingSaslServerFactory(factory, bindingTypeAndData.key, bindingTypeAndData.value); } if (protocol != null) { factory = new ProtocolSaslServerFactory(factory, protocol); } if (serverName != null) { factory = new ServerNameSaslServerFactory(factory, serverName); } if (trustManager != null) { factory = new TrustManagerSaslServerFactory(factory, trustManager); } if (keyManager != null) { factory = new KeyManagerCredentialSaslServerFactory(factory, keyManager); } if (credential != null) { factory = new CredentialSaslServerFactory(factory, credential); } final SaslAuthenticationFactory.Builder builder = SaslAuthenticationFactory.builder(); builder.setFactory(factory); builder.setSecurityDomain(securityDomain); if (scheduledExecutorService != null) { builder.setScheduledExecutorService(scheduledExecutorService); } final MechanismConfiguration.Builder mechBuilder = MechanismConfiguration.builder(); for (MechanismRealmConfiguration realmConfiguration : mechanismRealms.values()) { mechBuilder.addMechanismRealm(realmConfiguration); } builder.setMechanismConfigurationSelector(MechanismConfigurationSelector.constantSelector(mechBuilder.build())); final SaslServer server = builder.build().createMechanism(mechanismName); if (!dontAssertBuiltServer) { Assert.assertNotNull(server); } return server; }

Target:
public SaslServer build() throws IOException { if (securityDomain == null) { securityDomain = createSecurityDomain(); } if (securityDomainReference != null) { securityDomainReference.setReference(securityDomain); } SaslServerFactory factory = obtainSaslServerFactory(serverFactoryClass); if (factory == null && providerSupplier != null) { factory = new SecurityProviderSaslServerFactory(providerSupplier); } if (properties != null && properties.size() > 0) { if (properties.containsKey(WildFlySasl.REALM_LIST)) { factory = new AvailableRealmsSaslServerFactory(factory); } factory = new PropertiesSaslServerFactory(factory, properties); } if (bindingTypeAndData != null) { factory = new ChannelBindingSaslServerFactory(factory, bindingTypeAndData.key, bindingTypeAndData.value); } if (protocol != null) { factory = new ProtocolSaslServerFactory(factory, protocol); } if (serverName != null) { factory = new ServerNameSaslServerFactory(factory, serverName); } if (trustManager != null) { factory = new TrustManagerSaslServerFactory(factory, trustManager); } if (keyManager != null) { factory = new KeyManagerCredentialSaslServerFactory(factory, keyManager); } if (credential != null) { factory = new CredentialSaslServerFactory(factory, credential); } final SaslAuthenticationFactory.Builder builder = SaslAuthenticationFactory.builder(); builder.setFactory(factory); builder.setSecurityDomain(securityDomain); if (scheduledExecutorService != null) { builder.setScheduledExecutorService(scheduledExecutorService); } final MechanismConfiguration.Builder mechBuilder = MechanismConfiguration.builder(); for (MechanismRealmConfiguration realmConfiguration : mechanismRealms.values()) { mechBuilder.addMechanismRealm(realmConfiguration); } builder.setMechanismConfigurationSelector(MechanismConfigurationSelector.constantSelector(mechBuilder.build())); final SaslServer server = builder.build().createMechanism(mechanismName); if (!dontAssertBuiltServer) { Assert.assertNotNull(server); } return server; }