org.apache.camel.component.jdbc
Class JdbcEndpoint

java.lang.Object
  extended by org.apache.camel.impl.DefaultEndpoint
      extended by org.apache.camel.component.jdbc.JdbcEndpoint
All Implemented Interfaces:
CamelContextAware, Endpoint, IsSingleton

public class JdbcEndpoint
extends DefaultEndpoint

Version:
$Revision:520964 $

Constructor Summary
JdbcEndpoint()
           
JdbcEndpoint(String endpointUri, Component component, DataSource dataSource)
           
 
Method Summary
 Consumer createConsumer(Processor processor)
          Creates a new Event Driven Consumer which consumes messages from the endpoint using the given processor
protected  String createEndpointUri()
          A factory method to lazily create the endpointUri if none is specified
 Producer createProducer()
          Creates a new producer which is used send messages into the endpoint
 DataSource getDataSource()
           
 Map<String,Object> getParameters()
           
 int getReadSize()
           
 boolean isSingleton()
          Whether this class supports being singleton or not.
 boolean isUseJDBC4ColumnNameAndLabelSemantics()
           
 void setDataSource(DataSource dataSource)
           
 void setParameters(Map<String,Object> parameters)
          Optional parameters to the Statement.
 void setReadSize(int readSize)
           
 void setUseJDBC4ColumnNameAndLabelSemantics(boolean useJDBC4ColumnNameAndLabelSemantics)
          Sets whether to use JDBC 4 or JDBC 3.0 or older semantic when retrieving column name.
 
Methods inherited from class org.apache.camel.impl.DefaultEndpoint
configureProperties, createExchange, createExchange, createExchange, createPollingConsumer, equals, getCamelContext, getComponent, getEndpointKey, getEndpointUri, getExchangePattern, getExchangeType, hashCode, isLenientProperties, setCamelContext, setEndpointUri, setEndpointUriIfNotSpecified, setExchangePattern, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JdbcEndpoint

public JdbcEndpoint()

JdbcEndpoint

public JdbcEndpoint(String endpointUri,
                    Component component,
                    DataSource dataSource)
Method Detail

isSingleton

public boolean isSingleton()
Description copied from interface: IsSingleton
Whether this class supports being singleton or not.

Returns:
true to be a single shared instance, false to create new instances.

createConsumer

public Consumer createConsumer(Processor processor)
                        throws Exception
Description copied from interface: Endpoint
Creates a new Event Driven Consumer which consumes messages from the endpoint using the given processor

Parameters:
processor - the given processor
Returns:
a newly created consumer
Throws:
Exception - can be thrown

createProducer

public Producer createProducer()
                        throws Exception
Description copied from interface: Endpoint
Creates a new producer which is used send messages into the endpoint

Returns:
a newly created producer
Throws:
Exception - can be thrown

getReadSize

public int getReadSize()

setReadSize

public void setReadSize(int readSize)

getDataSource

public DataSource getDataSource()

setDataSource

public void setDataSource(DataSource dataSource)

getParameters

public Map<String,Object> getParameters()

setParameters

public void setParameters(Map<String,Object> parameters)
Optional parameters to the Statement.

For example to set maxRows, fetchSize etc.

Parameters:
parameters - parameters which will be set using reflection

isUseJDBC4ColumnNameAndLabelSemantics

public boolean isUseJDBC4ColumnNameAndLabelSemantics()

setUseJDBC4ColumnNameAndLabelSemantics

public void setUseJDBC4ColumnNameAndLabelSemantics(boolean useJDBC4ColumnNameAndLabelSemantics)
Sets whether to use JDBC 4 or JDBC 3.0 or older semantic when retrieving column name.

JDBC 4.0 uses columnLabel to get the column name where as JDBC 3.0 uses both columnName or columnLabel. Unfortunately JDBC drivers behave differently so you can use this option to work out issues around your JDBC driver if you get problem using this component

This option is default true.

Parameters:
useJDBC4ColumnNameAndLabelSemantics - true to use JDBC 4.0 semantics, false to use JDBC 3.0.

createEndpointUri

protected String createEndpointUri()
Description copied from class: DefaultEndpoint
A factory method to lazily create the endpointUri if none is specified

Overrides:
createEndpointUri in class DefaultEndpoint


Copyright © 2007-2010 IONA Open Source Community. All Rights Reserved.