Class MongoDBManagedConnectionFactory
- java.lang.Object
-
- org.teiid.resource.spi.BasicManagedConnectionFactory
-
- org.teiid.resource.adapter.mongodb.MongoDBManagedConnectionFactory
-
- All Implemented Interfaces:
Serializable
,javax.resource.spi.ManagedConnectionFactory
,javax.resource.spi.ResourceAdapterAssociation
,javax.resource.spi.ValidatingManagedConnectionFactory
,MongoDBConfiguration
public class MongoDBManagedConnectionFactory extends BasicManagedConnectionFactory implements MongoDBConfiguration
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.teiid.mongodb.MongoDBConfiguration
MongoDBConfiguration.SecurityType
-
-
Field Summary
Fields Modifier and Type Field Description static BundleUtil
UTIL
-
Fields inherited from interface org.teiid.mongodb.MongoDBConfiguration
SEEDLIST_PREFIX, STANDARD_PREFIX
-
-
Constructor Summary
Constructors Constructor Description MongoDBManagedConnectionFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BasicConnectionFactory<MongoDBConnectionImpl>
createConnectionFactory()
boolean
equals(Object obj)
String
getAuthDatabase()
protected com.mongodb.MongoClientURI
getConnectionURI()
String
getDatabase()
String
getPassword()
String
getRemoteServerList()
Returns thehost:port[;host:port...]
list that identifies the remote servers to include in this cluster;String
getSecurityType()
Boolean
getSsl()
String
getUsername()
int
hashCode()
void
setAuthDatabase(String database)
void
setDatabase(String database)
void
setPassword(String googlePassword)
void
setRemoteServerList(String remoteServerList)
Set the list of remote servers that make up the MongoDB cluster.void
setSecurityType(String securityType)
void
setSsl(Boolean ssl)
void
setUsername(String username)
-
Methods inherited from class org.teiid.resource.spi.BasicManagedConnectionFactory
checkEquals, createConnectionFactory, createManagedConnection, getInstance, getInvalidConnections, getLogWriter, getResourceAdapter, matchManagedConnections, setLogWriter, setResourceAdapter
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.teiid.mongodb.MongoDBConfiguration
getCredential, getOptions, getServers
-
-
-
-
Field Detail
-
UTIL
public static final BundleUtil UTIL
-
-
Method Detail
-
createConnectionFactory
public BasicConnectionFactory<MongoDBConnectionImpl> createConnectionFactory() throws javax.resource.ResourceException
- Specified by:
createConnectionFactory
in interfacejavax.resource.spi.ManagedConnectionFactory
- Specified by:
createConnectionFactory
in classBasicManagedConnectionFactory
- Throws:
javax.resource.ResourceException
-
getRemoteServerList
public String getRemoteServerList()
Returns thehost:port[;host:port...]
list that identifies the remote servers to include in this cluster;- Specified by:
getRemoteServerList
in interfaceMongoDBConfiguration
- Returns:
host:port[;host:port...]
list
-
setRemoteServerList
public void setRemoteServerList(String remoteServerList)
Set the list of remote servers that make up the MongoDB cluster.- Parameters:
remoteServerList
- the server list in appropriateserver:port;server2:port2
format.
-
getUsername
public String getUsername()
- Specified by:
getUsername
in interfaceMongoDBConfiguration
-
setUsername
public void setUsername(String username)
-
getPassword
public String getPassword()
- Specified by:
getPassword
in interfaceMongoDBConfiguration
-
setPassword
public void setPassword(String googlePassword)
-
getSsl
public Boolean getSsl()
- Specified by:
getSsl
in interfaceMongoDBConfiguration
-
setSsl
public void setSsl(Boolean ssl)
-
getDatabase
public String getDatabase()
- Specified by:
getDatabase
in interfaceMongoDBConfiguration
-
setDatabase
public void setDatabase(String database)
-
getSecurityType
public String getSecurityType()
Description copied from interface:MongoDBConfiguration
TheMongoDBConfiguration.SecurityType
. Can be one of SCRAM_SHA_256, SCRAM_SHA_1, MONGODB_CR, Kerberos, X509, None.
Any other value will be treated as MONGODB_CR- Specified by:
getSecurityType
in interfaceMongoDBConfiguration
- Returns:
-
setSecurityType
public void setSecurityType(String securityType)
-
getAuthDatabase
public String getAuthDatabase()
- Specified by:
getAuthDatabase
in interfaceMongoDBConfiguration
-
setAuthDatabase
public void setAuthDatabase(String database)
-
getConnectionURI
protected com.mongodb.MongoClientURI getConnectionURI()
-
hashCode
public int hashCode()
-
-