org.teiid.connector.api
Interface ConnectorEnvironment

All Superinterfaces:
java.util.concurrent.Executor

public interface ConnectorEnvironment
extends java.util.concurrent.Executor

The environment provided to a connector by the Connector Manager. The environment provides access to external resources the Connector writer may need.


Method Summary
 java.lang.String getConnectorName()
          Get the name of the connector binding, as exposed in the console.
 java.lang.Object getFromCache(CacheScope scope, java.lang.Object key)
          Get the item from cache based on the scope provided; The required information like session-id, or vdb-name etc are gleaned from runtime context.
 ILanguageFactory getLanguageFactory()
          Obtain a reference to the default LanguageFactory that can be used to construct new language interface objects.
 ConnectorLogger getLogger()
          Obtain a reference to the logger that can be used to add messages to the MetaMatrix log files for debugging and error recovery.
 java.util.Properties getProperties()
          Get all configuration properties provided in the Connector Binding for this connector instance.
 TypeFacility getTypeFacility()
          Obtain a reference to the type facility, which can be used to perform many type conversions supplied by the Connector API.
 java.util.concurrent.ScheduledFuture<?> scheduleAtFixedRate(java.lang.Runnable command, long initialDelay, long period, java.util.concurrent.TimeUnit unit)
          Schedule a command for repeated execution with the same contract as ScheduledThreadPoolExecutor.scheduleAtFixedRate(Runnable, long, long, TimeUnit) Executions will not happen concurrently.
 void storeInCache(CacheScope scope, java.lang.Object key, java.lang.Object value)
          Store the item in the cache based on the scope provided.The required information like session-id, or vdb-name etc are gleaned from runtime context.
 
Methods inherited from interface java.util.concurrent.Executor
execute
 

Method Detail

getProperties

java.util.Properties getProperties()
Get all configuration properties provided in the Connector Binding for this connector instance.

Returns:
Properties for initializing the connector

getConnectorName

java.lang.String getConnectorName()
Get the name of the connector binding, as exposed in the console.

Returns:
Connector binding name

getLogger

ConnectorLogger getLogger()
Obtain a reference to the logger that can be used to add messages to the MetaMatrix log files for debugging and error recovery.

Returns:
The ConnectorLogger

getLanguageFactory

ILanguageFactory getLanguageFactory()
Obtain a reference to the default LanguageFactory that can be used to construct new language interface objects. This is typically needed when modifying the language objects passed to the connector or for testing when objects need to be created.


getTypeFacility

TypeFacility getTypeFacility()
Obtain a reference to the type facility, which can be used to perform many type conversions supplied by the Connector API.


scheduleAtFixedRate

java.util.concurrent.ScheduledFuture<?> scheduleAtFixedRate(java.lang.Runnable command,
                                                            long initialDelay,
                                                            long period,
                                                            java.util.concurrent.TimeUnit unit)
Schedule a command for repeated execution with the same contract as ScheduledThreadPoolExecutor.scheduleAtFixedRate(Runnable, long, long, TimeUnit) Executions will not happen concurrently. If an execution takes longer than a period, the next execution will take place on the first period interval after completion.

Parameters:
command -
initialDelay -
period -
unit -
Returns:

getFromCache

java.lang.Object getFromCache(CacheScope scope,
                              java.lang.Object key)
Get the item from cache based on the scope provided; The required information like session-id, or vdb-name etc are gleaned from runtime context. If such information is not available then error will be raised.

Parameters:
scope - - scope of the cache; CacheScope.REQUEST, scope is not supported, as request information is not visible. use ExecutionContext. on ExecutionContext
key -
Returns:

storeInCache

void storeInCache(CacheScope scope,
                  java.lang.Object key,
                  java.lang.Object value)
Store the item in the cache based on the scope provided.The required information like session-id, or vdb-name etc are gleaned from runtime context. If such information is not available then error will be raised.

Parameters:
scope - - scope of the cache; CacheScope.REQUEST, scope is not supported. on ExecutionContext
key -
value -


Copyright © 2009. All Rights Reserved.