本文整理了Java中org.wildfly.swarm.spi.runtime.annotations.Post.<init>()
方法的一些代码示例,展示了Post.<init>()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Post.<init>()
方法的具体详情如下:
包路径:org.wildfly.swarm.spi.runtime.annotations.Post
类名称:Post
方法名:<init>
暂无
代码示例来源:origin: org.wildfly.swarm/ejb-remote
@Post
@ApplicationScoped
public class RemoteNamingCustomizer implements Customizer {
@Inject
@Any
Instance<NamingFraction> namingInstance;
@Override
public void customize() {
if (!namingInstance.isUnsatisfied()) {
namingInstance.get().remoteNamingService();
}
}
}
代码示例来源:origin: org.wildfly.swarm/ejb-remote
@Post
@ApplicationScoped
public class RemoteMessagingCustomizer implements Customizer {
@Inject
@Any
Instance<MessagingFraction> messagingInstance;
@Override
public void customize() {
if (!messagingInstance.isUnsatisfied()) {
messagingInstance.get().defaultServer(EnhancedServer::enableRemote);
}
}
}
代码示例来源:origin: io.thorntail/transactions
@Post
@ApplicationScoped
public class TransactionClientElytronCustomizer implements Customizer {
@Inject
private Instance<Elytron> elytron;
@Override
public void customize() {
if (!this.elytron.isUnsatisfied()) {
elytron.get()
.subresources()
.permissionSet("default-permissions")
.permission(new HashMap() {{
put("class-name", "org.wildfly.transaction.client.RemoteTransactionPermission");
put("module", "org.wildfly.transaction.client");
}});
}
}
}
代码示例来源:origin: org.teiid/thorntail-odata-api
@Post
@ApplicationScoped
public class ODataWarDeploymentProducer {
@Inject
@Any
ODataFraction fraction;
@Produces
public Archive odataWar() throws Exception {
WARArchive war = ShrinkWrap.create(WARArchive.class, "odata.war")
.setContextRoot(this.fraction.getContext())
.setWebXML(this.getClass().getResource("/web.xml"));
war.addModule("org.jboss.teiid.olingo");
if (this.fraction.isSecure()) {
war.as(Secured.class).protect().withRole(fraction.getRole());
}
return war;
}
}
代码示例来源:origin: io.thorntail/datasources
/**
* @author Ken Finnigan
*/
@Post
@ApplicationScoped
public class DefaultDatasourceCustomizer implements Customizer {
@Inject
@DefaultDatasource
String defaultDatasourceJndiName;
@Inject
Instance<EE> eeInstance;
@Override
public void customize() {
if (!eeInstance.isUnsatisfied() && defaultDatasourceJndiName != null) {
eeInstance.get().subresources().defaultBindingsService()
.datasource(defaultDatasourceJndiName);
}
}
}
代码示例来源:origin: org.wildfly.swarm/logging
/**
* @author Bob McWhirter
*/
@Post
@ApplicationScoped
public class EarlyLoggingCustomizer implements Customizer {
@Inject
@Any
private LoggingFraction fraction;
@Override
public void customize() {
for (Logger logger : fraction.subresources().loggers()) {
java.util.logging.Logger l = LogManager.getLogManager().getLogger(logger.getKey());
l.setLevel(java.util.logging.Level.parse(logger.level().toString()));
}
}
}
代码示例来源:origin: io.thorntail/webservices
/**
* @author Bob McWhirter
*/
@Post
@ApplicationScoped
public class WSDLHostCustomizer implements Customizer {
@Inject
@Named(Interface.PUBLIC)
Interface iface;
@Inject
WebServicesFraction fraction;
@Override
public void customize() {
if (fraction.wsdlHost() == null) {
fraction.wsdlHost(this.iface.getExpression());
}
}
}
代码示例来源:origin: io.thorntail/undertow
@Post
@ApplicationScoped
public class WebSecurityCustomizer implements Customizer {
@Inject
private Instance<Security> securityInstance;
@Override
public void customize() {
if (!securityInstance.isUnsatisfied()) {
Security security = securityInstance.get();
SecurityDomain webPolicy = security.subresources().securityDomains().stream().filter((e) -> e.getKey().equals("jboss-web-policy")).findFirst().orElse(null);
if (webPolicy == null) {
webPolicy = new SecurityDomain("jboss-web-policy")
.cacheType(SecurityDomain.CacheType.DEFAULT)
.classicAuthorization(new ClassicAuthorization()
.policyModule(new PolicyModule("Delegating")
.code("Delegating")
.flag(Flag.REQUIRED)));
security.securityDomain(webPolicy);
}
}
}
}
代码示例来源:origin: org.wildfly.swarm/datasources
/**
* @author Ken Finnigan
*/
@Post
@ApplicationScoped
public class DefaultDatasourceCustomizer implements Customizer {
@Inject
@DefaultDatasource
String defaultDatasourceJndiName;
@Inject
Instance<EE> eeInstance;
@Override
public void customize() {
if (!eeInstance.isUnsatisfied() && defaultDatasourceJndiName != null) {
eeInstance.get().subresources().defaultBindingsService()
.datasource(defaultDatasourceJndiName);
}
}
}
代码示例来源:origin: io.thorntail/microprofile-health
@Post
@ApplicationScoped
public class UndertowFilterCustomizer implements Customizer {
代码示例来源:origin: org.wildfly.swarm/logging
/**
* @author Bob McWhirter
*/
@Post
@ApplicationScoped
public class LoggingCustomizer implements Customizer {
@Inject
@Any
private LoggingFraction fraction;
@Override
public void customize() {
LevelNode root = InitialLoggerManager.INSTANCE.getRoot();
apply(root);
}
private void apply(LevelNode node) {
if (!node.getName().equals("")) {
this.fraction.logger(node.getName(), (l) -> {
l.level(Level.valueOf(node.getLevel().toString()));
});
}
for (LevelNode each : node.getChildren()) {
apply(each);
}
}
}
代码示例来源:origin: org.wildfly.swarm/ejb
/**
* @author Ken Finnigan
*/
@Post
@ApplicationScoped
public class EJBSecurityCustomizer implements Customizer {
@Inject
private SecurityFraction security;
@Override
public void customize() {
if (security.subresources().securityDomains().stream().anyMatch((e) -> e.getKey().equals("jboss-ejb-policy"))) {
return;
}
this.security.securityDomain("jboss-ejb-policy", (policy) -> {
policy.cacheType(SecurityDomain.CacheType.DEFAULT);
policy.classicAuthorization((auth) -> {
auth.policyModule("Delegating", (module) -> {
module.code("Delegating");
module.flag(Flag.REQUIRED);
});
});
});
}
}
代码示例来源:origin: org.wildfly.swarm/messaging
@Post
@ApplicationScoped
public class RemoteConnectionCustomizer implements Customizer {
代码示例来源:origin: io.thorntail/microprofile-openapi
@Post
@ApplicationScoped
public class OpenApiUndertowFilterCustomizer implements Customizer {
代码示例来源:origin: io.thorntail/monitor
@Post
@ApplicationScoped
public class UndertowFilterCustomizer implements Customizer {
代码示例来源:origin: io.thorntail/keycloak-server
@Post
@ApplicationScoped
public class KeycloakDatasourceCustomizer implements Customizer {
代码示例来源:origin: io.thorntail/logstash
@Post
@ApplicationScoped
public class LogstashCustomizer implements Customizer {
代码示例来源:origin: org.wildfly.swarm/logstash
@Post
@ApplicationScoped
public class LogstashCustomizer implements Customizer {
代码示例来源:origin: io.thorntail/topology-webapp
@Post
@ApplicationScoped
public class TopologyProxiedServiceCustomizer implements Customizer {
代码示例来源:origin: org.wildfly.swarm/mail
@Post
@ApplicationScoped
public class SocketBindingCustomizer implements Customizer {
内容来源于网络,如有侵权,请联系作者删除!