use of org.wildfly.clustering.service.SimpleSupplierDependency in project wildfly by wildfly.
the class DistributableSingleSignOnManagerServiceConfigurator method configure.
@Override
public ServiceConfigurator configure(OperationContext context) {
String securityDomainName = this.configuration.getSecurityDomainName();
Supplier<String> generator = this.configuration.getIdentifierGenerator();
CapabilityServiceSupport support = context.getCapabilityServiceSupport();
SupplierDependency<DistributableSSOManagementProvider> provider = getProvider(context, securityDomainName);
ServiceName managerServiceName = this.getServiceName().append("manager");
this.manager = new ServiceSupplierDependency<>(managerServiceName);
this.provider = provider;
this.installer = new Consumer<ServiceTarget>() {
@Override
public void accept(ServiceTarget target) {
ServiceConfigurator factoryConfigurator = provider.get().getServiceConfigurator(securityDomainName).configure(support);
factoryConfigurator.build(target).install();
SupplierDependency<SSOManagerFactory<ElytronAuthentication, String, Map.Entry<String, URI>, Batch>> factoryDependency = new ServiceSupplierDependency<>(factoryConfigurator);
SupplierDependency<SessionIdGenerator> generatorDependency = new SimpleSupplierDependency<>(new SessionIdGeneratorAdapter(generator));
new SSOManagerServiceConfigurator<>(managerServiceName, factoryDependency, generatorDependency, new LocalSSOContextFactory()).configure(support).build(target).install();
}
};
return this;
}
use of org.wildfly.clustering.service.SimpleSupplierDependency in project wildfly by wildfly.
the class TransportConfigurationServiceConfigurator method configure.
@Override
public ServiceConfigurator configure(OperationContext context, ModelNode model) throws OperationFailedException {
this.socketBinding = new ServiceSupplierDependency<>(CommonUnaryRequirement.SOCKET_BINDING.getServiceName(context, SOCKET_BINDING.resolveModelAttribute(context, model).asString()));
String diagnosticsSocketBinding = DIAGNOSTICS_SOCKET_BINDING.resolveModelAttribute(context, model).asStringOrNull();
this.diagnosticsSocketBinding = (diagnosticsSocketBinding != null) ? new ServiceSupplierDependency<>(CommonUnaryRequirement.SOCKET_BINDING.getServiceName(context, diagnosticsSocketBinding)) : new SimpleSupplierDependency<>(null);
ModelNode machine = MACHINE.resolveModelAttribute(context, model);
ModelNode rack = RACK.resolveModelAttribute(context, model);
ModelNode site = SITE.resolveModelAttribute(context, model);
if (site.isDefined() || rack.isDefined() || machine.isDefined()) {
this.topology = new Topology() {
@Override
public String getMachine() {
return machine.asStringOrNull();
}
@Override
public String getRack() {
return rack.asStringOrNull();
}
@Override
public String getSite() {
return site.asStringOrNull();
}
};
}
return super.configure(context, model);
}
Aggregations