Interface ServiceProviderContainer<T extends Archive<T>>

Type Parameters:
T -
All Superinterfaces:
ClassContainer<T>, ManifestContainer<T>, ResourceContainer<T>
All Known Subinterfaces:
JavaArchive, WebArchive
All Known Implementing Classes:
ContainerBase, EnterpriseArchiveImpl, EnterpriseContainerBase, GenericArchiveImpl, JavaArchiveImpl, ResourceAdapterArchiveImpl, ResourceAdapterContainerBase, WebArchiveImpl, WebContainerBase

public interface ServiceProviderContainer<T extends Archive<T>> extends ManifestContainer<T>, ClassContainer<T>
Defines the contract for a component capable of storing service provider related resources.

The actual path to the service provider within the Archive is up to the implementations/specifications.
Version:
$Revision: $
  • Method Details

    • addAsServiceProviderAndClasses

      T addAsServiceProviderAndClasses(Class<?> serviceInterface, Class<?>... serviceImpls) throws IllegalArgumentException
      Adds a META-INF/services/ServiceInterfaceName Asset and the classes related to the service to the archive.
      Parameters:
      serviceInterface - The Service Interface class
      serviceImpls - The Service Interface Implementations
      Returns:
      This virtual archive
      Throws:
      IllegalArgumentException - if serviceInterface is null
      IllegalArgumentException - if serviceImpls is null or contain null values