|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jboss.shrinkwrap.api.ShrinkWrap
public final class ShrinkWrap
Main entry point into the ShrinkWrap system. Each Archive
has an associated Configuration
provided at construction by the Domain
under which
the archive was created. ShrinkWrap
provides static access to the
default Domain
(and by extension the default
Configuration
), as well as a shortcut mechanism to create
Archive
s under these defaults by way of
create(String, Class)
. Additionally, this class is
the hook to create new Domain
s via
createDomain()
, createDomain(ConfigurationBuilder)
or
createDomain(Configuration)
.
Method Summary | ||
---|---|---|
static
|
create(String archiveName,
Class<T> type)
Creates a new archive of the specified type. |
|
static Domain |
createDomain()
Creates a new Domain containing a default
Configuration . |
|
static Domain |
createDomain(Configuration configuration)
Creates a new Domain containing configuration properties
from the supplied Configuration . |
|
static Domain |
createDomain(ConfigurationBuilder builder)
Creates a new Domain containing configuration properties
from the supplied ConfigurationBuilder . |
|
static Domain |
getDefaultDomain()
Returns a single domain with default configuration for use in applications with no explicit configuration or isolation requirements. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static Domain createDomain()
Domain
containing a default
Configuration
. ArchiveFactory
s created from this
domain will have isolated configuration from archive factories created from
other domains. Likewise, all ArchiveFactory
s and Archive
s created
from the returned domain will share the same configuration.
Domain
with default configurationpublic static Domain createDomain(ConfigurationBuilder builder) throws IllegalArgumentException
Domain
containing configuration properties
from the supplied ConfigurationBuilder
. ArchiveFactory
s
created from this domain will have isolated configuration from archive
factories created from other domains. Likewise, all
ArchiveFactory
s and Archive
s created
from the returned domain will share the same configuration.
builder
- Builder with which we should create a Configuration
for this Domain
Domain
with default configuration
IllegalArgumentException
- If the builder is not suppliedpublic static Domain createDomain(Configuration configuration) throws IllegalArgumentException
Domain
containing configuration properties
from the supplied Configuration
. ArchiveFactory
s
created from this domain will have isolated configuration from archive
factories created from other domains. Likewise, all
ArchiveFactory
s and Archive
s created
from the returned domain will share the same configuration.
configuration
- Configuration
for this Domain
Domain
with default configuration
IllegalArgumentException
- If the configuration is not suppliedpublic static Domain getDefaultDomain()
public static <T extends Assignable> T create(String archiveName, Class<T> type) throws IllegalArgumentException
Configuration
.
Invoking this method is functionally equivalent to calling
ArchiveFactory.create(String, Class)
upon
Domain.getArchiveFactory()
upon the domain returned
by getDefaultDomain()
.
archiveName
- The name of the archive
Assignable
archive base
IllegalArgumentException
- If either argument is not specified
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |