@Override public void initialize(Container.InitContext initContext) { initContext.socketBinding(new SocketBinding("txn-recovery-environment") .port(this.port)); initContext.socketBinding(new SocketBinding("txn-status-manager") .port(this.statusPort)); }
@SuppressWarnings("unchecked") default T addModule(String name, String slot) { getDescriptorAsset() .addModule(name, slot); return (T) this; }
/** * Start the container. * * @return The container. * @throws Exception if an error occurs. */ public Container start() throws Exception { return start(false); }
public static void main(String[] args) { new Interface(); } public Interface2() { // ..
/** * Construct a new, un-started container. * * @param debugBootstrap - flag to indicate if the module layer should be put into bootstrap debug mode. Same as * the jboss-module -debuglog mode which enables trace logging to System.out during the * initial bootstrap of the module layer. * @throws Exception If an error occurs performing classloading and initialization magic. */ public Container(boolean debugBootstrap) throws Exception { createServer(debugBootstrap); createShrinkWrapDomain(); }
/** * @return The default deployment or null */ private Archive<?> getDefaultDeployment() { if (defaultDeployment == null) { try { defaultDeployment = createDefaultDeployment(); } catch (RuntimeException ex) { // ignore } } return defaultDeployment; }
@Override public Swarm socketBindingGroup(SocketBindingGroup group) { return (Swarm) super.socketBindingGroup(group); }
@SuppressWarnings("unchecked") default T excludeModule(String name, String slot) { getDescriptorAsset() .excludeModule(name, slot); return (T) this; }
@Override public void stop() throws Exception { if (container != null) { container.stop(); } } }
/** * Stop the container, undeploying all deployments. * * @return THe container. * @throws Exception If an error occurs. */ public Container stop() throws Exception { this.server.stop(); return this; }
/** * Start the container. * * @return The container. * @throws Exception if an error occurs. */ public Container start() throws Exception { this.deployer = this.server.start(this); return this; }
/** * Deploy an archive. * * @param deployment The ShrinkWrap archive to deploy. * @return The container. * @throws Exception if an error occurs. */ public Container deploy(Archive deployment) throws Exception { this.deployer.deploy(deployment); return this; }
@Override public Swarm withStageConfig(URL url) { return (Swarm) super.withStageConfig(url); }
@Override public void initialize(Container.InitContext initContext) { initContext.socketBinding( new SocketBinding("http") .port(SwarmProperties.propertyVar(UndertowProperties.HTTP_PORT, "8080"))); initContext.socketBinding( new SocketBinding("https") .port(SwarmProperties.propertyVar(UndertowProperties.HTTPS_PORT, "8443"))); }
@Override public Swarm start() throws Exception { return (Swarm) super.start(); }
@Override public void initialize(Container.InitContext initContext) { initContext.socketBinding( new SocketBinding("management-http") .port(SwarmProperties.propertyVar(ManagementProperties.HTTP_PORT, "9990"))); initContext.socketBinding( new SocketBinding("management-https") .port(SwarmProperties.propertyVar(ManagementProperties.HTTPS_PORT, "9993"))); }
@Override public Swarm start(Archive<?> deployment) throws Exception { return (Swarm) super.start(deployment); }
@Override public Swarm start(boolean eagerlyOpen) throws Exception { return (Swarm) super.start(eagerlyOpen); }