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)
           
 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)
           
 ConnectorBinding getConnectorBinding(java.lang.String deployedConnectorBindingName)
           
 java.util.List getConnectorBindings()
           
 java.lang.Boolean getConnectorBindingState(java.lang.String deployedConnectorBindingName)
           
 java.util.Collection getConnectorBindingStatistics(java.lang.String connectorBindingName)
           
 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)
           
 void startService(ApplicationEnvironment environment)
          Start the service with the specified environment.
 void stopConnectorBinding(java.lang.String deployedConnectorBindingName)
           
 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
Specified by:
getCapabilities in interface DataService
Throws:
MetaMatrixComponentException

getConnectorBindingStatistics

public java.util.Collection getConnectorBindingStatistics(java.lang.String connectorBindingName)
                                                   throws MetaMatrixComponentException
Specified by:
getConnectorBindingStatistics in interface DataService
Throws:
MetaMatrixComponentException
Since:
4.3
See Also:
DataService.getConnectorBindingStatistics(java.lang.String)

clearConnectorBindingCache

public void clearConnectorBindingCache(java.lang.String connectorBindingName)
                                throws MetaMatrixComponentException
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
Specified by:
startConnectorBinding in interface DataService
Throws:
ApplicationLifecycleException
MetaMatrixComponentException
Since:
4.3
See Also:
DataService.startConnectorBinding(java.lang.String)

stopConnectorBinding

public void stopConnectorBinding(java.lang.String deployedConnectorBindingName)
                          throws ApplicationLifecycleException,
                                 MetaMatrixComponentException
Specified by:
stopConnectorBinding in interface DataService
Throws:
ApplicationLifecycleException
MetaMatrixComponentException
Since:
4.3
See Also:
DataService.stopConnectorBinding(java.lang.String)

getConnectorBindings

public java.util.List getConnectorBindings()
                                    throws MetaMatrixComponentException
Specified by:
getConnectorBindings in interface DataService
Throws:
MetaMatrixComponentException
Since:
4.3
See Also:
DataService.getConnectorBindings()

getConnectorBindingState

public java.lang.Boolean getConnectorBindingState(java.lang.String deployedConnectorBindingName)
                                           throws MetaMatrixComponentException
Specified by:
getConnectorBindingState in interface DataService
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
Specified by:
getConnectorBinding in interface DataService
Throws:
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.