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

Type Parameters:
T -
All Known Subinterfaces:
ResourceAdapterArchive

public interface ResourceAdapterContainer<T extends Archive<T>>

Defines the contract for a component capable of storing Resource adapter resources.

Version:
$Revision: $
Author:
John Bailey, Aslak Knutsen

Method Summary
 T setResourceAdapterXML(Asset resource)
          Adds the Asset as ra.xml to the container, returning the container itself.
 T setResourceAdapterXML(java.io.File resource)
          Adds the File as ra.xml to the container, returning the container itself.
 T setResourceAdapterXML(java.lang.Package resourcePackage, java.lang.String resourceName)
          Adds the resource inside the package as ra.xml to the container, returning the container itself.
 T setResourceAdapterXML(java.lang.String resourceName)
          Adds the resource as ra.xml to the container, returning the container itself.
 T setResourceAdapterXML(java.net.URL resource)
          Adds the URL as ra.xml to the container, returning the container itself.
 

Method Detail

setResourceAdapterXML

T setResourceAdapterXML(java.lang.String resourceName)
                                           throws java.lang.IllegalArgumentException
Adds the resource as ra.xml to the container, returning the container itself.
The ClassLoader used to obtain the resource is up to the implementation.

Parameters:
resourceName - resource to add
Returns:
This virtual archive
Throws:
java.lang.IllegalArgumentException - if resourceName is null
See Also:
setResourceAdapterXML(Asset)

setResourceAdapterXML

T setResourceAdapterXML(java.io.File resource)
                                           throws java.lang.IllegalArgumentException
Adds the File as ra.xml to the container, returning the container itself.

Parameters:
resource - File resource to add
Returns:
This virtual archive
Throws:
java.lang.IllegalArgumentException - if resource is null
See Also:
setResourceAdapterXML(Asset)

setResourceAdapterXML

T setResourceAdapterXML(java.net.URL resource)
                                           throws java.lang.IllegalArgumentException
Adds the URL as ra.xml to the container, returning the container itself.

Parameters:
resource - URL resource to add
Returns:
This virtual archive
Throws:
java.lang.IllegalArgumentException - if resource is null
See Also:
setResourceAdapterXML(Asset)

setResourceAdapterXML

T setResourceAdapterXML(Asset resource)
                                           throws java.lang.IllegalArgumentException
Adds the Asset as ra.xml to the container, returning the container itself.

Parameters:
resource - Asset resource to add
Returns:
This virtual archive
Throws:
java.lang.IllegalArgumentException - if resource is null

setResourceAdapterXML

T setResourceAdapterXML(java.lang.Package resourcePackage,
                        java.lang.String resourceName)
                                           throws java.lang.IllegalArgumentException
Adds the resource inside the package as ra.xml to the container, returning the container itself.

The ClassLoader used to obtain the resource is up to the implementation.

Parameters:
resourcePackage - The package of the resources
resourceName - The name of the resource inside resourcePackage
Returns:
This virtual archive
Throws:
java.lang.IllegalArgumentException - if resourcePackage is null
java.lang.IllegalArgumentException - if resourceName is null
See Also:
setResourceAdapterXML(String)


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