Class ExtensionIndexService
- java.lang.Object
-
- org.jboss.as.server.moduleservice.ExtensionIndexService
-
- All Implemented Interfaces:
ExtensionIndex,org.jboss.msc.Service,org.jboss.msc.service.Service<ExtensionIndex>,org.jboss.msc.value.Value<ExtensionIndex>
public final class ExtensionIndexService extends Object implements org.jboss.msc.service.Service<ExtensionIndex>, ExtensionIndex
- Author:
- David M. Lloyd, Stuart Douglas TODO: this needs to be updated when libraries are deployed the server with extension name in the manifest
-
-
Field Summary
Fields Modifier and Type Field Description static StringMODULE_PREFIX
-
Constructor Summary
Constructors Constructor Description ExtensionIndexService(File... roots)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidaddDeployedExtension(String identifier, ExtensionInfo extensionInfo)Adds an extension that has been deployed to the servervoidaddDeployedExtension(org.jboss.modules.ModuleIdentifier identifier, ExtensionInfo extensionInfo)Adds an extension that has been deployed to the serverorg.jboss.modules.ModuleIdentifierfindExtension(String name, String minSpecVersion, String minImplVersion, String requiredVendorId)Find the identifier of an extension module, returningnullif no matching extension is available.StringfindExtensionAsString(String name, String minSpecVersion, String minImplVersion, String requiredVendorId)Find the identifier of an extension module, returningnullif no matching extension is available.ExtensionIndexgetValue()static org.jboss.modules.ModuleIdentifiermoduleIdentifier(String name, String minSpecVersion, String minImplVersion, String requiredVendorId)Deprecated, for removal: This API element is subject to removal in a future version.booleanremoveDeployedExtension(String name, String identifier)Removes extension information that has been deployed to the serverbooleanremoveDeployedExtension(String name, org.jboss.modules.ModuleIdentifier identifier)Removes extension information that has been deployed to the servervoidstart(org.jboss.msc.service.StartContext context)voidstop(org.jboss.msc.service.StopContext context)
-
-
-
Field Detail
-
MODULE_PREFIX
public static final String MODULE_PREFIX
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ExtensionIndexService
public ExtensionIndexService(File... roots)
-
-
Method Detail
-
start
public void start(org.jboss.msc.service.StartContext context) throws org.jboss.msc.service.StartException- Specified by:
startin interfaceorg.jboss.msc.Service- Throws:
org.jboss.msc.service.StartException
-
stop
public void stop(org.jboss.msc.service.StopContext context)
- Specified by:
stopin interfaceorg.jboss.msc.Service
-
addDeployedExtension
public void addDeployedExtension(org.jboss.modules.ModuleIdentifier identifier, ExtensionInfo extensionInfo)Adds an extension that has been deployed to the server- Specified by:
addDeployedExtensionin interfaceExtensionIndex- Parameters:
identifier- The module identifier of the extensionextensionInfo- The extension data
-
addDeployedExtension
public void addDeployedExtension(String identifier, ExtensionInfo extensionInfo)
Description copied from interface:ExtensionIndexAdds an extension that has been deployed to the server- Specified by:
addDeployedExtensionin interfaceExtensionIndex- Parameters:
identifier- The module identifier of the extensionextensionInfo- The extension data
-
removeDeployedExtension
public boolean removeDeployedExtension(String name, org.jboss.modules.ModuleIdentifier identifier)
Removes extension information that has been deployed to the server- Specified by:
removeDeployedExtensionin interfaceExtensionIndex- Parameters:
name- The extension nameidentifier- The extension Identifier- Returns:
- true if the extension was found and removed
-
removeDeployedExtension
public boolean removeDeployedExtension(String name, String identifier)
Description copied from interface:ExtensionIndexRemoves extension information that has been deployed to the server- Specified by:
removeDeployedExtensionin interfaceExtensionIndex- Parameters:
name- The extension nameidentifier- The extension identifier to remove- Returns:
- true if the extension was found and removed
-
findExtension
public org.jboss.modules.ModuleIdentifier findExtension(String name, String minSpecVersion, String minImplVersion, String requiredVendorId)
Find the identifier of an extension module, returningnullif no matching extension is available.- Specified by:
findExtensionin interfaceExtensionIndex- Parameters:
name- the extension nameminSpecVersion- the minimum spec version to match, ornullto match anyminImplVersion- the minimum implementation version to match, ornullto match anyrequiredVendorId- the vendor ID to require, ornullto match any- Returns:
- the module identifier of the extension found.
-
findExtensionAsString
public String findExtensionAsString(String name, String minSpecVersion, String minImplVersion, String requiredVendorId)
Description copied from interface:ExtensionIndexFind the identifier of an extension module, returningnullif no matching extension is available.- Specified by:
findExtensionAsStringin interfaceExtensionIndex- Parameters:
name- the extension nameminSpecVersion- the minimum spec version to match, ornullto match anyminImplVersion- the minimum implementation version to match, ornullto match anyrequiredVendorId- the vendor ID to require, ornullto match any- Returns:
- the module identifier of the extension found.
-
moduleIdentifier
@Deprecated(forRemoval=true, since="28.0.0") public static org.jboss.modules.ModuleIdentifier moduleIdentifier(String name, String minSpecVersion, String minImplVersion, String requiredVendorId)
Deprecated, for removal: This API element is subject to removal in a future version.
-
getValue
public ExtensionIndex getValue() throws IllegalStateException, IllegalArgumentException
- Specified by:
getValuein interfaceorg.jboss.msc.value.Value<ExtensionIndex>- Throws:
IllegalStateExceptionIllegalArgumentException
-
-