MapConnectionFactoryLookup
instead.@Deprecated public class MapConnectionFactoryLookup extends Object implements ConnectionFactoryLookup
ConnectionFactoryLookup
implementation that relies on a map for doing lookups.
Useful for testing environments or applications that need to match arbitrary String
names to target
ConnectionFactory
objects.
Constructor and Description |
---|
MapConnectionFactoryLookup()
Deprecated.
Create a new instance of the
MapConnectionFactoryLookup class. |
MapConnectionFactoryLookup(Map<String,ConnectionFactory> connectionFactories)
Deprecated.
Create a new instance of the
MapConnectionFactoryLookup class. |
MapConnectionFactoryLookup(String connectionFactoryName,
ConnectionFactory connectionFactory)
Deprecated.
Create a new instance of the
MapConnectionFactoryLookup class. |
Modifier and Type | Method and Description |
---|---|
void |
addConnectionFactory(String connectionFactoryName,
ConnectionFactory connectionFactory)
Deprecated.
Add the supplied
ConnectionFactory to the map of ConnectionFactorys maintained by
this object. |
Map<String,ConnectionFactory> |
getConnectionFactories()
Deprecated.
Get the
Map of ConnectionFactories maintained by this object. |
ConnectionFactory |
getConnectionFactory(String connectionFactoryName)
Deprecated.
Retrieve the
ConnectionFactory identified by the given name. |
void |
setConnectionFactories(Map<String,ConnectionFactory> connectionFactories)
Deprecated.
Set the
Map of ConnectionFactories . |
public MapConnectionFactoryLookup()
MapConnectionFactoryLookup
class.public MapConnectionFactoryLookup(Map<String,ConnectionFactory> connectionFactories)
MapConnectionFactoryLookup
class.connectionFactories
- the Map
of ConnectionFactory
. The keys are Strings
, the
values are actual ConnectionFactory
instances.public MapConnectionFactoryLookup(String connectionFactoryName, ConnectionFactory connectionFactory)
MapConnectionFactoryLookup
class.connectionFactoryName
- the name under which the supplied ConnectionFactory
is to be addedconnectionFactory
- the ConnectionFactory
to be addedpublic void setConnectionFactories(Map<String,ConnectionFactory> connectionFactories)
Map
of ConnectionFactories
. The keys are Strings
, the
values are actual ConnectionFactory
instances.
If the supplied Map
is null, then this method call effectively has no effect.
connectionFactories
- said Map
of connectionFactories
public Map<String,ConnectionFactory> getConnectionFactories()
Map
of connectionFactory
(never null).public void addConnectionFactory(String connectionFactoryName, ConnectionFactory connectionFactory)
ConnectionFactory
to the map of ConnectionFactorys
maintained by
this object.connectionFactoryName
- the name under which the supplied ConnectionFactory
is to be addedconnectionFactory
- the ConnectionFactory
to be so addedpublic ConnectionFactory getConnectionFactory(String connectionFactoryName) throws ConnectionFactoryLookupFailureException
ConnectionFactoryLookup
ConnectionFactory
identified by the given name.getConnectionFactory
in interface ConnectionFactoryLookup
connectionFactoryName
- the name of the ConnectionFactory
.ConnectionFactory
(never null).ConnectionFactoryLookupFailureException
- if the lookup failed.Copyright © 2018–2022 Pivotal Software, Inc.. All rights reserved.