com.metamatrix.connector.metadata.adapter
Class ObjectConnector

java.lang.Object
  extended by org.teiid.connector.basic.BasicConnector
      extended by com.metamatrix.connector.metadata.adapter.ObjectConnector
All Implemented Interfaces:
Connector
Direct Known Subclasses:
IndexConnector

public abstract class ObjectConnector
extends BasicConnector

Adapter to expose the object processing logic via the standard connector API.


Constructor Summary
ObjectConnector()
           
 
Method Summary
 ConnectorCapabilities getCapabilities()
          Get the capabilities of this connector.
 Connection getConnection(ExecutionContext context)
          Obtain a connection with the connector.
protected  ConnectorEnvironment getEnvironment()
           
protected abstract  com.metamatrix.connector.metadata.internal.IObjectSource getMetadataObjectSource(ExecutionContext context)
          When a Metadata query is being executed, this method will be called to obtain the object source.
 void start(ConnectorEnvironment environment)
          Start the connector with the connector environment.
 void stop()
          Stop the connector.
 
Methods inherited from class org.teiid.connector.basic.BasicConnector
areAdminConnectionsAllowed, createIdentity, getConnectorName, setAdminConnectionsAllowed, setConnectorName, setUseCredentialMap, useCredentialMap
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ObjectConnector

public ObjectConnector()
Method Detail

getCapabilities

public ConnectorCapabilities getCapabilities()
Description copied from interface: Connector
Get the capabilities of this connector. The capabilities affect what kinds of queries (and other commands) will be sent to the connector.

Returns:
ConnectorCapabilities, may return null if the Connector provides User scoped capabilities Connection.getCapabilities()

start

public void start(ConnectorEnvironment environment)
           throws ConnectorException
Description copied from interface: Connector
Start the connector with the connector environment. The environment provides access to external resources the connector implementation may need to use.

Specified by:
start in interface Connector
Overrides:
start in class BasicConnector
Parameters:
environment - The connector environment, provided by the Connector Manager
Throws:
ConnectorException

stop

public void stop()
Description copied from interface: Connector
Stop the connector. No commands will be executed on the connector when it is stopped.


getConnection

public Connection getConnection(ExecutionContext context)
                         throws ConnectorException
Description copied from interface: Connector
Obtain a connection with the connector. The connection typically is associated with a particular security context. The connection is assumed to be pooled in the underlying source if pooling is necessary - the connection will be closed when execution has completed against it.

Parameters:
context - The context of the current user that will be using this connection, may be null if this connection is for an administrative operation.
Returns:
A Connection, created by the Connector
Throws:
ConnectorException - If an error occurred obtaining a connection

getEnvironment

protected ConnectorEnvironment getEnvironment()

getMetadataObjectSource

protected abstract com.metamatrix.connector.metadata.internal.IObjectSource getMetadataObjectSource(ExecutionContext context)
                                                                                             throws ConnectorException
When a Metadata query is being executed, this method will be called to obtain the object source. It is delayed until it is known if its a SystemAdmin query or a Metadata query.

Parameters:
environment -
context -
Returns:
Throws:
ConnectorException
Since:
4.3


Copyright © 2009. All Rights Reserved.