public class Container extends Object
| Modifier and Type | Class and Description |
|---|---|
class |
Container.InitContext
Initialization Context to be passed to Fractions to allow them to provide
additional functionality into the Container.
|
class |
Container.PostInitContext |
| Constructor and Description |
|---|
Container()
Construct a new, un-started container.
|
Container(boolean debugBootstrap)
Construct a new, un-started container.
|
Container(boolean debugBootstrap,
URL xmlConfig) |
| Modifier and Type | Method and Description |
|---|---|
void |
applyFractionDefaults(Server server) |
org.jboss.shrinkwrap.api.Archive |
createDefaultDeployment()
Provides access to the default ShrinkWrap deployment.
|
Container.PostInitContext |
createPostInitContext() |
Container |
deploy()
Deploy the default WAR deployment.
|
Container |
deploy(org.jboss.shrinkwrap.api.Archive<?> deployment)
Deploy an archive.
|
protected String |
determineDeploymentType() |
Container |
fraction(Fraction fraction)
Add a fraction to the container.
|
Container |
fraction(Supplier<Fraction> supplier) |
List<Fraction> |
fractions() |
String[] |
getArgs()
Get the possibly null container main method arguments.
|
SocketBindingGroup |
getSocketBindingGroup(String name) |
Container |
iface(String name,
String expression)
Configure a network interface.
|
List<Interface> |
ifaces() |
static boolean |
isFatJar() |
Map<String,List<OutboundSocketBinding>> |
outboundSocketBindings() |
void |
setArgs(String[] args)
Set the main method arguments.
|
Container |
socketBindingGroup(SocketBindingGroup group)
Configure a socket-binding-group.
|
List<SocketBindingGroup> |
socketBindingGroups() |
Map<String,List<SocketBinding>> |
socketBindings() |
Container |
start()
Start the container.
|
Container |
start(org.jboss.shrinkwrap.api.Archive<?> deployment)
Start the container with a deployment.
|
Container |
stop()
Stop the container, undeploying all deployments.
|
public static final String VERSION
public Container()
throws Exception
Exception - If an error occurs performing classloading and initialization magic.public Container(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 static boolean isFatJar()
throws IOException
IOExceptionpublic void applyFractionDefaults(Server server) throws Exception
Exceptionpublic Container fraction(Fraction fraction)
fraction - The fraction to add.public Container iface(String name, String expression)
name - The name of the interface.expression - The expression to define the interface.public Container socketBindingGroup(SocketBindingGroup group)
group - The socket-binding group to add.public List<SocketBindingGroup> socketBindingGroups()
public SocketBindingGroup getSocketBindingGroup(String name)
public Map<String,List<SocketBinding>> socketBindings()
public Map<String,List<OutboundSocketBinding>> outboundSocketBindings()
public Container start() throws Exception
Exception - if an error occurs.public Container stop() throws Exception
Exception - If an error occurs.public Container 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 Container deploy() throws DeploymentException
For WAR-based applications, the primary WAR artifact iwll be deployed.
DeploymentException - if an error occurs.public Container deploy(org.jboss.shrinkwrap.api.Archive<?> deployment) throws DeploymentException
deployment - The ShrinkWrap archive to deploy.DeploymentException - if an error occurs.public String[] getArgs()
public void setArgs(String[] args)
args - arguments passed to the main(String[]) method.public Container.PostInitContext createPostInitContext()
public org.jboss.shrinkwrap.api.Archive createDefaultDeployment()
protected String determineDeploymentType() throws IOException
IOExceptionCopyright © 2016 JBoss by Red Hat. All rights reserved.