@Contract
@Singleton
public interface ArchiveDetector
ArchiveHandler
s are considered part of container implementation, hence are
not available until the corresponding container is setup. On the other hand,
ArchiveDetectors are pretty light weight and used for selecting the
appropriate ArchiveHandler. ArchiveDetectors are supposed to be part of the
connector module of a container. Each detector has a rank as returned by rank()
which can be used to order the detectors as archive detection.
This is a container pluggability interface.Modifier and Type | Method and Description |
---|---|
ArchiveHandler |
getArchiveHandler()
Return a ArchiveHandler that can handle the archive recognised by this ArchiveDetector.
|
ArchiveType |
getArchiveType()
Returns the type of the deployment unit or archive or module whichever way you want to call what's being
depoyed.
|
boolean |
handles(ReadableArchive archive)
This method is used to detect the archive type.
|
int |
rank()
Since archive detection logic is typically executed at a very early stage of deployment,
it is mainly heuristic.
|
int rank()
boolean handles(ReadableArchive archive) throws IOException
archive
- IOException
ArchiveHandler getArchiveHandler()
ArchiveType getArchiveType()
ArchiveType
.Copyright © 2019. All rights reserved.