org.jboss.jca.core.rar

## Class SimpleResourceAdapterRepository

- java.lang.Object
- - org.jboss.jca.core.rar.SimpleResourceAdapterRepository

- All Implemented Interfaces:
    org.jboss.jca.core.spi.rar.ResourceAdapterRepository

      public class SimpleResourceAdapterRepository
      extends java.lang.Object
      implements org.jboss.jca.core.spi.rar.ResourceAdapterRepository

  A simple implementation of the resource adapter repository
  Author:
    Jesper Pedersen

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `SimpleResourceAdapterRepository()` Constructor

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `org.jboss.jca.core.spi.rar.Endpoint` | `getEndpoint(java.lang.String uniqueId)` Get an endpoint representation for a resource adapter
    `java.util.List<org.jboss.jca.core.spi.rar.MessageListener>` | `getMessageListeners(java.lang.String uniqueId)` Get a list of message listeners supported for a resource adapter
    `javax.resource.spi.ResourceAdapter` | `getResourceAdapter(java.lang.String uniqueId)` Get the resource adapter instance based on the unique id
    `java.util.Set<java.lang.String>` | `getResourceAdapters()` Get the resource adapters unique ids registered
    `java.util.Set<java.lang.String>` | `getResourceAdapters(java.lang.Class<?> messageListenerType)` Get the resource adapters unique ids registered which has the specified message listener type
    `java.lang.String` | `registerResourceAdapter(javax.resource.spi.ResourceAdapter ra)` Register a resource adapter
    `void` | `setMetadataRepository(org.jboss.jca.core.spi.mdr.MetadataRepository v)` Set the metadata repository
    `void` | `setRecoveryForResourceAdapter(java.lang.String uniqueId, boolean isXA)` Set the recovery mode for a resource adapter
    `void` | `setTransactionIntegration(org.jboss.jca.core.spi.transaction.TransactionIntegration v)` Set the transaction integration
    `java.lang.String` | `toString()` String representation
    `void` | `unregisterResourceAdapter(java.lang.String key)` Unregister a resource adapter

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### SimpleResourceAdapterRepository

          public SimpleResourceAdapterRepository()

      Constructor

  - ### Method Detail

    - #### setMetadataRepository

          public void setMetadataRepository(org.jboss.jca.core.spi.mdr.MetadataRepository v)

      Set the metadata repository
      Parameters:
        `v` - The value

    - #### setTransactionIntegration

          public void setTransactionIntegration(org.jboss.jca.core.spi.transaction.TransactionIntegration v)

      Set the transaction integration
      Parameters:
        `v` - The value

    - #### registerResourceAdapter

          public java.lang.String registerResourceAdapter(javax.resource.spi.ResourceAdapter ra)

      Register a resource adapter
      Specified by:
        `registerResourceAdapter` in interface `org.jboss.jca.core.spi.rar.ResourceAdapterRepository`
      Parameters:
        `ra` - The resource adapter instance
      Returns:
        The unique id for the resource adapter

    - #### unregisterResourceAdapter

          public void unregisterResourceAdapter(java.lang.String key)
                                         throws org.jboss.jca.core.spi.rar.NotFoundException

      Unregister a resource adapter
      Specified by:
        `unregisterResourceAdapter` in interface `org.jboss.jca.core.spi.rar.ResourceAdapterRepository`
      Parameters:
        `key` - The key for the resource adapter instance
      Throws:
        `org.jboss.jca.core.spi.rar.NotFoundException` - Thrown if the unique id isn't registered

    - #### getResourceAdapter

          public javax.resource.spi.ResourceAdapter getResourceAdapter(java.lang.String uniqueId)
                                                                throws org.jboss.jca.core.spi.rar.NotFoundException

      Get the resource adapter instance based on the unique id
      Specified by:
        `getResourceAdapter` in interface `org.jboss.jca.core.spi.rar.ResourceAdapterRepository`
      Parameters:
        `uniqueId` - An unique id that represents the deployment
      Returns:
        The resource adapter
      Throws:
        `org.jboss.jca.core.spi.rar.NotFoundException` - Thrown if the unique id isn't registered

    - #### getResourceAdapters

          public java.util.Set<java.lang.String> getResourceAdapters()

      Get the resource adapters unique ids registered
      Specified by:
        `getResourceAdapters` in interface `org.jboss.jca.core.spi.rar.ResourceAdapterRepository`
      Returns:
        The unique ids

    - #### getResourceAdapters

          public java.util.Set<java.lang.String> getResourceAdapters(java.lang.Class<?> messageListenerType)

      Get the resource adapters unique ids registered which has the specified message listener type
      Specified by:
        `getResourceAdapters` in interface `org.jboss.jca.core.spi.rar.ResourceAdapterRepository`
      Parameters:
        `messageListenerType` - The message listener type
      Returns:
        The unique ids

    - #### getEndpoint

          public org.jboss.jca.core.spi.rar.Endpoint getEndpoint(java.lang.String uniqueId)
                                                          throws org.jboss.jca.core.spi.rar.NotFoundException

      Get an endpoint representation for a resource adapter
      Specified by:
        `getEndpoint` in interface `org.jboss.jca.core.spi.rar.ResourceAdapterRepository`
      Parameters:
        `uniqueId` - An unique id that represents the deployment
      Returns:
        The endpoint
      Throws:
        `org.jboss.jca.core.spi.rar.NotFoundException` - Thrown if the unique id isn't registered

    - #### getMessageListeners

          public java.util.List<org.jboss.jca.core.spi.rar.MessageListener> getMessageListeners(java.lang.String uniqueId)
                                                                                         throws org.jboss.jca.core.spi.rar.NotFoundException,
                                                                                                java.lang.InstantiationException,
                                                                                                java.lang.IllegalAccessException

      Get a list of message listeners supported for a resource adapter
      Specified by:
        `getMessageListeners` in interface `org.jboss.jca.core.spi.rar.ResourceAdapterRepository`
      Parameters:
        `uniqueId` - An unique id that represents the deployment
      Returns:
        The list of message listeners
      Throws:
        `org.jboss.jca.core.spi.rar.NotFoundException` - Thrown if the unique id isn't registered
        `java.lang.InstantiationException` - Thrown if an object couldn't created
        `java.lang.IllegalAccessException` - Thrown if object access is inaccessible

    - #### setRecoveryForResourceAdapter

          public void setRecoveryForResourceAdapter(java.lang.String uniqueId,
                                                    boolean isXA)
                                             throws org.jboss.jca.core.spi.rar.NotFoundException

      Set the recovery mode for a resource adapter
      Specified by:
        `setRecoveryForResourceAdapter` in interface `org.jboss.jca.core.spi.rar.ResourceAdapterRepository`
      Parameters:
        `uniqueId` - An unique id that represents the deployment
        `isXA` - Is the resource adapter instance XA capable
      Throws:
        `org.jboss.jca.core.spi.rar.NotFoundException` - Thrown if the unique id isn't registered

    - #### toString

          public java.lang.String toString()

      String representation
      Overrides:
        `toString` in class `java.lang.Object`
      Returns:
        The string

Copyright © 2014 IronJacamar (http://www.ironjacamar.org)