@Service(name="osgi") @Singleton public class OSGiArchiveDetector extends Object implements ArchiveDetector
handles(ReadableArchive)
.
It's rank can be set using system property OSGI_ARCHIVE_DETECTOR_RANK_PROP
.
Default rank is DEFAULT_OSGI_ARCHIVE_DETECTOR_RANK
.Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_OSGI_ARCHIVE_DETECTOR_RANK |
static String |
OSGI_ARCHIVE_DETECTOR_RANK_PROP |
static String |
OSGI_ARCHIVE_TYPE |
Constructor and Description |
---|
OSGiArchiveDetector() |
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.
|
public static final String OSGI_ARCHIVE_DETECTOR_RANK_PROP
public static final int DEFAULT_OSGI_ARCHIVE_DETECTOR_RANK
public static final String OSGI_ARCHIVE_TYPE
public int rank()
ArchiveDetector
rank
in interface ArchiveDetector
public boolean handles(ReadableArchive archive) throws IOException
ArchiveDetector
handles
in interface ArchiveDetector
IOException
public ArchiveHandler getArchiveHandler()
ArchiveDetector
getArchiveHandler
in interface ArchiveDetector
public ArchiveType getArchiveType()
ArchiveDetector
ArchiveType
.getArchiveType
in interface ArchiveDetector
Copyright © 2019. All rights reserved.