public class ConnectorRegistry extends Object
Modifier and Type | Field and Description |
---|---|
protected Map<String,javax.validation.Validator> |
beanValidators |
protected static ConnectorRegistry |
connectorRegistryInstance |
protected Map<PoolInfo,PoolMetaData> |
factories |
protected Map<String,Object> |
locks |
protected Map<String,ConnectorApplication> |
rarModules |
protected Map<String,ResourceAdapterConfig> |
resourceAdapterConfig |
protected Map<String,ActiveResourceAdapter> |
resourceAdapters
resourceAdapters keeps track of all active resource
adapters in the connector runtime. |
protected Set<ResourceInfo> |
resourceInfos |
protected ConcurrentMap<ResourceInfo,AtomicLong> |
resourceInfoVersion |
protected Set<PoolInfo> |
transparentDynamicReconfigPools |
Modifier | Constructor and Description |
---|---|
protected |
ConnectorRegistry()
Protected constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addActiveResourceAdapter(String rarModuleName,
ActiveResourceAdapter rar)
Adds the object implementing ActiveResourceAdapter
interface to the registry.
|
void |
addBeanValidator(String rarModuleName,
javax.validation.Validator validator)
Adds the bean validator to the registry.
|
void |
addConnectorApplication(ConnectorApplication rarModule)
register a connector application (rarModule) with the registry
|
void |
addManagedConnectionFactory(PoolInfo poolInfo,
PoolMetaData pmd)
Add MCF instance pertaining to the poolName to the registry.
|
void |
addResourceAdapterConfig(String rarName,
ResourceAdapterConfig raConfig)
Add the resource adapter config properties object to registry
against the rarName.
|
void |
addResourceInfo(ResourceInfo resourceInfo)
Add resourceInfo that is deployed for book-keeping purposes.
|
void |
addTransparentDynamicReconfigPool(PoolInfo poolInfo)
Add PoolInfo that has transparent-dynamic-reconfiguration enabled .
|
ActiveResourceAdapter |
getActiveResourceAdapter(String rarModuleName)
Retrieves the object implementing ActiveResourceAdapter interface
from the registry.
|
ActiveResourceAdapter[] |
getAllActiveResourceAdapters()
Returns all Active Resource Adapters in the connector runtime.
|
javax.validation.Validator |
getBeanValidator(String rarModuleName)
Retrieves the bean validator of a resource-adapter
from the registry.
|
ConnectorApplication |
getConnectorApplication(String rarName)
retrieve a connector application (rarModule) from the registry
|
List<String> |
getConnectorsSupportingMessageListener(String messageListener)
get the list of resource-adapters that support this message-listener-type
|
ConnectorDescriptor |
getDescriptor(String rarModuleName)
Gets the connector descriptor pertaining the rar
|
static ConnectorRegistry |
getInstance()
Return the ConnectorRegistry instance
|
Object |
getLockObject(String rarName)
lock object that will be used by ResourceAdapterAdminService
to avoid multiple calls to create ActiveRA for same resource-adapter
|
javax.resource.spi.ManagedConnectionFactory |
getManagedConnectionFactory(PoolInfo poolInfo)
Retrieve MCF instance pertaining to the poolName from the registry.
|
PoolMetaData |
getPoolMetaData(PoolInfo poolInfo) |
ResourceAdapterConfig |
getResourceAdapterConfig(String rarName)
Get the resource adapter config properties object registered with
registry against the rarName.
|
long |
getResourceInfoVersion(ResourceInfo resourceInfo)
get the version counter of a resource info
|
RuntimeSecurityMap |
getRuntimeSecurityMap(PoolInfo poolInfo)
Gets the runtime equivalent of policies enforced by the Security Maps
pertaining to a pool from the Pool's Meta Data.
|
boolean |
isMCFCreated(PoolInfo poolInfo)
Checks if the MCF pertaining to the pool is instantiated and present
in the registry.
|
boolean |
isRegistered(String rarModuleName)
Checks whether the rar is already deployed i.e registered with
connector registry
|
boolean |
isResourceDeployed(ResourceInfo resourceInfo)
indicates whether the resource is deployed (enabled)
|
boolean |
isTransparentDynamicReconfigPool(PoolInfo poolInfo)
indicates whether the pool has transparent-dynamic-reconfiguration property enabled
|
boolean |
removeActiveResourceAdapter(String rarModuleName)
Removes the object implementing ActiveResourceAdapter
interface from the registry.
|
boolean |
removeBeanValidator(String rarModuleName)
Removes the bean validator of a resource-adapter
from the registry.
|
void |
removeConnectorApplication(String rarName)
remove a connector application (rarModule) from the registry
|
void |
removeLockObject(String rarName)
removes the lock-object used for creating the ActiveRA for a particular RAR
|
boolean |
removeManagedConnectionFactory(PoolInfo poolInfo)
Remove MCF instance pertaining to the poolName from the registry.
|
boolean |
removeResourceAdapterConfig(String rarName)
Remove the resource adapter config properties object from registry
|
boolean |
removeResourceFactories(ResourceInfo resourceInfo)
remove and invalidate factories (proxy to actual factory) using the resource.
|
boolean |
removeResourceInfo(ResourceInfo resourceInfo)
Remove ResourceInfo from registry.
|
boolean |
removeTransparentDynamicReconfigPool(PoolInfo poolInfo)
Remove ResourceInfo from registry.
|
long |
updateResourceInfoVersion(ResourceInfo resourceInfo)
Update version information for a resource.
|
protected static final ConnectorRegistry connectorRegistryInstance
protected final Map<String,ActiveResourceAdapter> resourceAdapters
resourceAdapters
keeps track of all active resource
adapters in the connector runtime.
String:resourceadapterName Vs ActiveResourceAdapterprotected final Map<PoolInfo,PoolMetaData> factories
protected final Map<String,ResourceAdapterConfig> resourceAdapterConfig
protected final Map<String,ConnectorApplication> rarModules
protected final ConcurrentMap<ResourceInfo,AtomicLong> resourceInfoVersion
protected final Set<ResourceInfo> resourceInfos
protected ConnectorRegistry()
public static ConnectorRegistry getInstance()
public void addActiveResourceAdapter(String rarModuleName, ActiveResourceAdapter rar)
rarModuleName
- RarName which is the keyrar
- ActiveResourceAdapter instance which is the value.public long getResourceInfoVersion(ResourceInfo resourceInfo)
resourceInfo
- resource-name-1L
if the resource is invalidpublic long updateResourceInfoVersion(ResourceInfo resourceInfo)
resourceInfo
- resource info to be updated.public boolean removeResourceFactories(ResourceInfo resourceInfo)
resourceInfo
- resource-namepublic void addResourceInfo(ResourceInfo resourceInfo)
resourceInfo
- Resource being deployed.public boolean removeResourceInfo(ResourceInfo resourceInfo)
resourceInfo
- ResourceInfopublic boolean isResourceDeployed(ResourceInfo resourceInfo)
resourceInfo
- resource-infopublic void addTransparentDynamicReconfigPool(PoolInfo poolInfo)
poolInfo
- Pool being deployed.public boolean removeTransparentDynamicReconfigPool(PoolInfo poolInfo)
poolInfo
- poolInfopublic boolean isTransparentDynamicReconfigPool(PoolInfo poolInfo)
poolInfo
- poolInfopublic boolean removeActiveResourceAdapter(String rarModuleName)
rarModuleName
- RarName which is the keypublic ActiveResourceAdapter getActiveResourceAdapter(String rarModuleName)
rarModuleName
- Rar name. It is the keypublic Object getLockObject(String rarName)
rarName
- resource-adapter namepublic void removeLockObject(String rarName)
rarName
- resource-adapterpublic void addBeanValidator(String rarModuleName, javax.validation.Validator validator)
rarModuleName
- RarName which is the keyvalidator
- to be added to registrypublic javax.validation.Validator getBeanValidator(String rarModuleName)
rarModuleName
- Rar name. It is the keypublic boolean removeBeanValidator(String rarModuleName)
rarModuleName
- RarName which is the keypublic boolean isMCFCreated(PoolInfo poolInfo)
poolInfo
- Name of the poolpublic boolean removeManagedConnectionFactory(PoolInfo poolInfo)
poolInfo
- Name of the poolpublic void addManagedConnectionFactory(PoolInfo poolInfo, PoolMetaData pmd)
poolInfo
- Name of the poolpmd
- MCF instance to be added.public javax.resource.spi.ManagedConnectionFactory getManagedConnectionFactory(PoolInfo poolInfo)
poolInfo
- Name of the poolpublic boolean isRegistered(String rarModuleName)
rarModuleName
- rar Name.public ConnectorDescriptor getDescriptor(String rarModuleName)
rarModuleName
- rarNamepublic RuntimeSecurityMap getRuntimeSecurityMap(PoolInfo poolInfo)
poolInfo
- pool informationSecurityMapUtils.processSecurityMaps( SecurityMap[])
public ResourceAdapterConfig getResourceAdapterConfig(String rarName)
rarName
- Name of the rarpublic void addResourceAdapterConfig(String rarName, ResourceAdapterConfig raConfig)
rarName
- Name of the rarraConfig
- ResourceAdapter configuration objectpublic boolean removeResourceAdapterConfig(String rarName)
rarName
- Name of the rarpublic ActiveResourceAdapter[] getAllActiveResourceAdapters()
public PoolMetaData getPoolMetaData(PoolInfo poolInfo)
public void addConnectorApplication(ConnectorApplication rarModule)
rarModule
- resource-adapter modulepublic ConnectorApplication getConnectorApplication(String rarName)
rarName
- resource-adapter namepublic void removeConnectorApplication(String rarName)
rarName
- resource-adapter moduleCopyright © 2018. All rights reserved.