@Vetoed public class Swarm extends Object
main(...) if an application does not provide one.
This simply constructs a default container, starts it and performs a default deployment. Typically only useful for barren WAR applications.
| Modifier and Type | Field and Description |
|---|---|
static ArtifactManager |
ARTIFACT_MANAGER |
static String |
VERSION |
| Constructor and Description |
|---|
Swarm()
Construct a new, un-started container.
|
Swarm(boolean debugBootstrap)
Construct a new, un-started container.
|
Swarm(boolean debugBootstrap,
String... args)
Construct a new, un-started container, configured using command-line arguments.
|
Swarm(String... args)
Construct a new, un-started container, configured using command-line arguments.
|
| Modifier and Type | Method and Description |
|---|---|
static List<org.jboss.shrinkwrap.api.spec.JavaArchive> |
allArtifacts() |
static org.jboss.shrinkwrap.api.spec.JavaArchive |
artifact(String gav) |
static org.jboss.shrinkwrap.api.spec.JavaArchive |
artifact(String gav,
String asName) |
static ArtifactManager |
artifactManager() |
Swarm |
component(Class<?> cls) |
org.jboss.shrinkwrap.api.Archive<?> |
createDefaultDeployment()
Provides access to the default ShrinkWrap deployment.
|
Swarm |
deploy()
Deploy the default WAR deployment.
|
Swarm |
deploy(org.jboss.shrinkwrap.api.Archive<?> deployment)
Deploy an archive.
|
Swarm |
fraction(Fraction fraction)
Add a fraction to the container.
|
CommandLine |
getCommandLine() |
boolean |
hasStageConfig() |
static void |
main(String... args)
Main entry-point.
|
Swarm |
outboundSocketBinding(String socketBindingGroup,
OutboundSocketBinding binding) |
void |
setArgs(String... args) |
Swarm |
socketBinding(String socketBindingGroup,
SocketBinding binding) |
StageConfig |
stageConfig() |
Swarm |
start()
Start the container.
|
Swarm |
start(org.jboss.shrinkwrap.api.Archive<?> deployment)
Start the container with a deployment.
|
Swarm |
start(boolean eagerlyOpen) |
Swarm |
stop()
Stop the container, undeploying all deployments.
|
Swarm |
withStageConfig(URL url) |
Swarm |
withXmlConfig(URL url) |
public static final String VERSION
public static ArtifactManager ARTIFACT_MANAGER
public Swarm()
throws Exception
Exception - If an error occurs performing classloading and initialization magic.public Swarm(boolean debugBootstrap)
throws Exception
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.Exception - If an error occurs performing classloading and initialization magic.public Swarm(String... args) throws Exception
args - The command-line arguments argumentsException - If an error occurs performing classloading and initialization magic.public Swarm(boolean debugBootstrap,
String... args)
throws Exception
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.args - The command-line arguments argumentsException - If an error occurs performing classloading and initialization magic.public CommandLine getCommandLine()
public void setArgs(String... args)
public StageConfig stageConfig()
public boolean hasStageConfig()
public Swarm fraction(Fraction fraction)
fraction - The fraction to add.public Swarm outboundSocketBinding(String socketBindingGroup, OutboundSocketBinding binding)
public Swarm socketBinding(String socketBindingGroup, SocketBinding binding)
public Swarm start() throws Exception
Exception - if an error occurs.public Swarm start(org.jboss.shrinkwrap.api.Archive<?> deployment) throws Exception
Effectively calls start().deploy(deployment)
deployment - The deployment to deploy.Exception - if an error occurs.start(),
deploy(Archive)public Swarm stop() throws Exception
Exception - If an error occurs.public Swarm deploy() throws Exception
For WAR-based applications, the primary WAR artifact will be deployed.
DeploymentException - if an error occurs.Exceptionpublic Swarm deploy(org.jboss.shrinkwrap.api.Archive<?> deployment) throws Exception
deployment - The ShrinkWrap archive to deploy.DeploymentException - if an error occurs.Exceptionpublic org.jboss.shrinkwrap.api.Archive<?> createDefaultDeployment()
throws Exception
Exceptionpublic static void main(String... args) throws Exception
args - Ignored.Exception - if an error occurs.public static ArtifactManager artifactManager() throws IOException
IOExceptionpublic static org.jboss.shrinkwrap.api.spec.JavaArchive artifact(String gav) throws Exception
Exceptionpublic static org.jboss.shrinkwrap.api.spec.JavaArchive artifact(String gav, String asName) throws Exception
ExceptionCopyright © 2016 JBoss by Red Hat. All rights reserved.