org.jboss.shrinkwrap.api.container
Interface ServiceProviderContainer<T extends Archive<T>>

Type Parameters:
T -
All Superinterfaces:
ClassContainer<T>, ManifestContainer<T>, ResourceContainer<T>
All Known Subinterfaces:
JavaArchive, WebArchive

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: $
Author:
Davide D'Alto

Field Summary
 
Fields inherited from interface org.jboss.shrinkwrap.api.container.ManifestContainer
DEFAULT_MANIFEST_NAME
 
Method Summary
 T addAsServiceProviderAndClasses(Class<?> serviceInterface, Class<?>... serviceImpls)
          Adds a META-INF/services/ServiceInterfaceName Asset and the classes related to the service to the archive.
 
Methods inherited from interface org.jboss.shrinkwrap.api.container.ManifestContainer
addAsManifestResource, addAsManifestResource, addAsManifestResource, addAsManifestResource, addAsManifestResource, addAsManifestResource, addAsManifestResource, addAsManifestResource, addAsManifestResource, addAsManifestResource, addAsManifestResource, addAsManifestResource, addAsManifestResource, addAsManifestResources, addAsServiceProvider, addAsServiceProvider, addManifest, setManifest, setManifest, setManifest, setManifest, setManifest
 
Methods inherited from interface org.jboss.shrinkwrap.api.container.ClassContainer
addClass, addClass, addClass, addClasses, addDefaultPackage, addPackage, addPackage, addPackages, addPackages, addPackages, addPackages
 
Methods inherited from interface org.jboss.shrinkwrap.api.container.ResourceContainer
addAsResource, addAsResource, addAsResource, addAsResource, addAsResource, addAsResource, addAsResource, addAsResource, addAsResource, addAsResource, addAsResource, addAsResource, addAsResource, addAsResource, addAsResources
 

Method Detail

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


Copyright © 2012 JBoss by Red Hat. All Rights Reserved.