|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.metamatrix.jdbc.EmbeddedConnectionFactoryImpl
public class EmbeddedConnectionFactoryImpl
A factory class which creates the connections to the embedded DQP instance. This is also responsible for initializing the DQP if the DQP instance is not already alive.
Constructor Summary | |
---|---|
EmbeddedConnectionFactoryImpl()
|
Method Summary | |
---|---|
ServerConnection |
createConnection(java.util.Properties connectionProperties)
Establish a connection to the server. |
ApplicationService |
findService(java.lang.String type)
|
java.net.InetAddress |
getAddress()
|
org.teiid.dqp.internal.process.DQPCore |
getDQP()
|
JMXUtil |
getJMXServer()
|
MMProcess |
getProcess()
|
long |
getStartTime()
|
void |
initialize(java.util.Properties props)
When the DQP is restarted using the admin API, it only shuts it down, it gets restarted when the next time connection is made, however this factory may be holding on to a previous transport handler, so we need to check if the DQP is still alive and create a new one if necessary. |
boolean |
isAlive()
Is the connection factory alive |
boolean |
shouldRestart()
|
void |
shutdown(boolean restart)
A shutdown could happen when somebody calls stop/restart on DQP or in normal course of process, we may have just closed the last connection in both cases we want to handle the situation of graceful/proper shutdown. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public EmbeddedConnectionFactoryImpl()
Method Detail |
---|
public ServerConnection createConnection(java.util.Properties connectionProperties) throws CommunicationException, ConnectionException
ServerConnectionFactory
createConnection
in interface ServerConnectionFactory
CommunicationException
- If an error occurs in connecting, typically due to
problems with the connection properties (bad user name, bad password, bad host name, etc)
ConnectionException
- If an error occurs communicating between client and serverpublic void initialize(java.util.Properties props) throws MetaMatrixCoreException
initialize
in interface ServerConnectionFactory
props
-
ApplicationInitializationException
MetaMatrixCoreException
public java.net.InetAddress getAddress()
public boolean isAlive()
ServerConnectionFactory
isAlive
in interface ServerConnectionFactory
public long getStartTime()
public org.teiid.dqp.internal.process.DQPCore getDQP()
public ApplicationService findService(java.lang.String type)
public void shutdown(boolean restart)
shutdown
in interface ServerConnectionFactory
com.metamatrix.jdbc.EmbeddedConnectionFactory#shutdown()
public JMXUtil getJMXServer()
public MMProcess getProcess()
public boolean shouldRestart()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |