com.metamatrix.dqp.embedded.services
Class EmbeddedDataService

java.lang.Object
  extended by com.metamatrix.dqp.embedded.services.EmbeddedBaseDQPService
      extended by com.metamatrix.dqp.embedded.services.EmbeddedDataService
All Implemented Interfaces:
ApplicationService, DataService

public class EmbeddedDataService
extends EmbeddedBaseDQPService
implements DataService

A DataService implementation for the DQP.

Since:
4.3

Field Summary
 
Fields inherited from class com.metamatrix.dqp.embedded.services.EmbeddedBaseDQPService
SYSTEM_PHYSICAL_MODEL_NAME
 
Constructor Summary
EmbeddedDataService()
           
 
Method Summary
 void cancelRequest(AtomicRequestID request, com.metamatrix.dqp.internal.datamgr.ConnectorID connectorId)
           
 void clearConnectorBindingCache(java.lang.String connectorBindingName)
          Clear any caches for the connector binding.
 void closeRequest(AtomicRequestID request, com.metamatrix.dqp.internal.datamgr.ConnectorID connectorId)
           
protected  java.lang.String decryptProperty(java.lang.String value)
          Decrypt the given property using the Crypto libraries.
 void executeRequest(AtomicRequestMessage request, com.metamatrix.dqp.internal.datamgr.ConnectorID connector, ResultsReceiver<AtomicResultsMessage> resultListener)
          Execute the given request on a Connector.
 SourceCapabilities getCapabilities(RequestMessage request, org.teiid.dqp.internal.process.DQPWorkContext dqpWorkContext, com.metamatrix.dqp.internal.datamgr.ConnectorID connector)
          Find the capabilities of this source.
 java.util.Collection getConnectionPoolStatistics(java.lang.String connectorBindingName)
          Get connection pool statistics for connector binding
 ConnectorBinding getConnectorBinding(java.lang.String deployedConnectorBindingName)
          Get the connector binding specifed the name
 java.util.List getConnectorBindings()
          Get the list of connector bindings deployed in the system.
 java.lang.Boolean getConnectorBindingState(java.lang.String deployedConnectorBindingName)
          Get the State of the connector binding name
 java.util.Collection getConnectorBindingStatistics(java.lang.String connectorBindingName)
          Get connector bindings queue statistics
 void initializeService(java.util.Properties props)
          Initialize the service with the specified properties.
protected  boolean isMaskedProperty(java.lang.String propName, ComponentType type)
          Check to see if the property read is a masked/encoded property
 void requestBatch(AtomicRequestID request, com.metamatrix.dqp.internal.datamgr.ConnectorID connectorId)
           
 com.metamatrix.dqp.internal.datamgr.ConnectorID selectConnector(java.lang.String deployedConnectorBindingName)
          Select a connector to use for the given connector binding.
 void startConnectorBinding(java.lang.String deployedConnectorBindingName)
          Start the Connector Binding by the name given, if it is already added and not srarted.
 void startService(ApplicationEnvironment environment)
          Start the service with the specified environment.
 void stopConnectorBinding(java.lang.String deployedConnectorBindingName)
          Stop the Connector Binding by the given name
 void stopService()
          Stop the service.
 
Methods inherited from class com.metamatrix.dqp.embedded.services.EmbeddedBaseDQPService
getConfigurationService, initialize, isStarted, isValidVDB, lookupService, start, stop, vdbId, vdbId
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.metamatrix.common.application.ApplicationService
initialize, start, stop
 

Constructor Detail

EmbeddedDataService

public EmbeddedDataService()
Method Detail

selectConnector

public com.metamatrix.dqp.internal.datamgr.ConnectorID selectConnector(java.lang.String deployedConnectorBindingName)
                                                                throws MetaMatrixComponentException
Select a connector to use for the given connector binding.

Specified by:
selectConnector in interface DataService
Parameters:
deployedConnectorBindingName - Connector binding identifier
Returns:
ConnectorID identifying a connector instance
Throws:
MetaMatrixComponentException

executeRequest

public void executeRequest(AtomicRequestMessage request,
                           com.metamatrix.dqp.internal.datamgr.ConnectorID connector,
                           ResultsReceiver<AtomicResultsMessage> resultListener)
                    throws MetaMatrixComponentException
Execute the given request on a Connector. The results are passed in to the listener object.

Specified by:
executeRequest in interface DataService
Throws:
MetaMatrixComponentException
Since:
4.3
See Also:
com.metamatrix.dqp.service.DataService#executeRequest(com.metamatrix.dqp.message.AtomicRequestMessage, com.metamatrix.dqp.internal.datamgr.ConnectorID, com.metamatrix.common.comm.api.MessageListener)

cancelRequest

public void cancelRequest(AtomicRequestID request,
                          com.metamatrix.dqp.internal.datamgr.ConnectorID connectorId)
                   throws MetaMatrixComponentException
Specified by:
cancelRequest in interface DataService
Throws:
MetaMatrixComponentException

closeRequest

public void closeRequest(AtomicRequestID request,
                         com.metamatrix.dqp.internal.datamgr.ConnectorID connectorId)
                  throws MetaMatrixComponentException
Specified by:
closeRequest in interface DataService
Throws:
MetaMatrixComponentException

requestBatch

public void requestBatch(AtomicRequestID request,
                         com.metamatrix.dqp.internal.datamgr.ConnectorID connectorId)
                  throws MetaMatrixComponentException
Specified by:
requestBatch in interface DataService
Throws:
MetaMatrixComponentException

getCapabilities

public SourceCapabilities getCapabilities(RequestMessage request,
                                          org.teiid.dqp.internal.process.DQPWorkContext dqpWorkContext,
                                          com.metamatrix.dqp.internal.datamgr.ConnectorID connector)
                                   throws MetaMatrixComponentException
Description copied from interface: DataService
Find the capabilities of this source.

Specified by:
getCapabilities in interface DataService
Parameters:
request - Original request message, used to extract security information
connector - Connector to retrieve capabilities from
Returns:
All capability information as key-value pairs
Throws:
MetaMatrixComponentException

getConnectorBindingStatistics

public java.util.Collection getConnectorBindingStatistics(java.lang.String connectorBindingName)
                                                   throws MetaMatrixComponentException
Description copied from interface: DataService
Get connector bindings queue statistics

Specified by:
getConnectorBindingStatistics in interface DataService
Parameters:
connectorBindingName - - Name of the connector binding
Returns:
a list of WorkerPoolStats
Throws:
MetaMatrixComponentException
Since:
4.3
See Also:
DataService.getConnectorBindingStatistics(java.lang.String)

getConnectionPoolStatistics

public java.util.Collection getConnectionPoolStatistics(java.lang.String connectorBindingName)
                                                 throws MetaMatrixComponentException
Description copied from interface: DataService
Get connection pool statistics for connector binding

Specified by:
getConnectionPoolStatistics in interface DataService
Parameters:
connectorBindingName - - Name of the connector binding
Returns:
a list of ConnectionPoolStats
Throws:
MetaMatrixComponentException
Since:
6.1
See Also:
DataService.getConnectionPoolStatistics(java.lang.String)

clearConnectorBindingCache

public void clearConnectorBindingCache(java.lang.String connectorBindingName)
                                throws MetaMatrixComponentException
Description copied from interface: DataService
Clear any caches for the connector binding. Incase of the JDBC Connector clear the result set cache.

Specified by:
clearConnectorBindingCache in interface DataService
Throws:
MetaMatrixComponentException
Since:
4.3
See Also:
DataService.clearConnectorBindingCache(java.lang.String)

startConnectorBinding

public void startConnectorBinding(java.lang.String deployedConnectorBindingName)
                           throws ApplicationLifecycleException,
                                  MetaMatrixComponentException
Description copied from interface: DataService
Start the Connector Binding by the name given, if it is already added and not srarted.

Specified by:
startConnectorBinding in interface DataService
Throws:
ApplicationLifecycleException
ComponentNotFoundException
MetaMatrixComponentException
Since:
4.3
See Also:
DataService.startConnectorBinding(java.lang.String)

stopConnectorBinding

public void stopConnectorBinding(java.lang.String deployedConnectorBindingName)
                          throws ApplicationLifecycleException,
                                 MetaMatrixComponentException
Description copied from interface: DataService
Stop the Connector Binding by the given name

Specified by:
stopConnectorBinding in interface DataService
Throws:
ApplicationLifecycleException
ComponentNotFoundException
MetaMatrixComponentException
Since:
4.3
See Also:
DataService.stopConnectorBinding(java.lang.String)

getConnectorBindings

public java.util.List getConnectorBindings()
                                    throws MetaMatrixComponentException
Description copied from interface: DataService
Get the list of connector bindings deployed in the system.

Specified by:
getConnectorBindings in interface DataService
Returns:
list ConnectorBinding
Throws:
ComponentNotFoundException
MetaMatrixComponentException
Since:
4.3
See Also:
DataService.getConnectorBindings()

getConnectorBindingState

public java.lang.Boolean getConnectorBindingState(java.lang.String deployedConnectorBindingName)
                                           throws MetaMatrixComponentException
Description copied from interface: DataService
Get the State of the connector binding name

Specified by:
getConnectorBindingState in interface DataService
Returns:
com.metamatrix.connector.monitor.AliveStatus
Throws:
MetaMatrixComponentException
Since:
4.3
See Also:
DataService.getConnectorBindingState(java.lang.String)

initializeService

public void initializeService(java.util.Properties props)
                       throws ApplicationInitializationException
Initialize the service with the specified properties.

Specified by:
initializeService in class EmbeddedBaseDQPService
Parameters:
props - Initialialization properties
Throws:
ApplicationInitializationException - If an error occurs during initialization

startService

public void startService(ApplicationEnvironment environment)
                  throws ApplicationLifecycleException
Start the service with the specified environment. The environment can be used to find other services or resources.

Specified by:
startService in class EmbeddedBaseDQPService
Parameters:
environment - Environment
Throws:
ApplicationLifecycleException - If an error occurs while starting

stopService

public void stopService()
                 throws ApplicationLifecycleException
Stop the service.

Specified by:
stopService in class EmbeddedBaseDQPService
Throws:
ApplicationLifecycleException - If an error occurs while starting

getConnectorBinding

public ConnectorBinding getConnectorBinding(java.lang.String deployedConnectorBindingName)
                                     throws MetaMatrixComponentException
Description copied from interface: DataService
Get the connector binding specifed the name

Specified by:
getConnectorBinding in interface DataService
Returns:
ConnectorBinding
Throws:
ComponentNotFoundException
MetaMatrixComponentException

isMaskedProperty

protected boolean isMaskedProperty(java.lang.String propName,
                                   ComponentType type)
Check to see if the property read is a masked/encoded property

Parameters:
propName -
type -
Returns:
Since:
4.3

decryptProperty

protected java.lang.String decryptProperty(java.lang.String value)
                                    throws CryptoException
Decrypt the given property using the Crypto libraries.

Parameters:
value -
Returns:
decrypted property.
Throws:
CryptoException
Since:
4.3


Copyright © 2009. All Rights Reserved.