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(java.lang.Class<?> serviceInterface, java.lang.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, 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(java.lang.Class<?> serviceInterface,
                                 java.lang.Class<?>... serviceImpls)
                                                    throws java.lang.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:
java.lang.IllegalArgumentException - if serviceInterface is null
java.lang.IllegalArgumentException - if serviceImpls is null or contain null values


Copyright © 2011 JBoss, a division of Red Hat, Inc.. All Rights Reserved.