org.mule.transport.jdbc
Class JdbcConnector
java.lang.Object
org.mule.transport.AbstractConnector
org.mule.transport.jdbc.JdbcConnector
- All Implemented Interfaces:
- ExceptionListener, EventListener, javax.resource.spi.work.WorkListener, MuleContextAware, Disposable, Initialisable, Lifecycle, Startable, Stoppable, NamedObject, Connectable, Connector
public class JdbcConnector
- extends AbstractConnector
Fields inherited from class org.mule.transport.AbstractConnector |
connected, connecting, connectionStrategy, createMultipleTransactedReceivers, DEFAULT_NUM_CONCURRENT_TX_RECEIVERS, dispatcherFactory, dispatchers, disposed, disposing, exceptionListener, initialised, logger, muleContext, name, numberOfConcurrentTransactedReceivers, receivers, requesterFactory, requesters, serviceDescriptor, serviceOverrides, sessionHandler, started, startOnConnect |
Methods inherited from class org.mule.transport.AbstractConnector |
checkDisposed, connect, destroyReceiver, disconnect, dispatch, dispose, disposeDispatchers, disposeReceivers, disposeRequesters, disposeWorkManagers, exceptionThrown, fireNotification, getConnectEventId, getConnectionDescription, getConnectionStrategy, getDefaultInboundTransformers, getDefaultOutboundTransformers, getDefaultResponseTransformers, getDispatcherFactory, getDispatcherThreadingProfile, getDispatcherWorkManager, getExceptionListener, getMaxDispatchersActive, getMaxRequestersActive, getMessageAdapter, getMuleContext, getName, getNumberOfConcurrentTransactedReceivers, getOutputStream, getReceiver, getReceiverKey, getReceivers, getReceivers, getReceiverThreadingProfile, getReceiverWorkManager, getReplyToHandler, getRequesterFactory, getRequesterThreadingProfile, getRequesterWorkManager, getScheduler, getServiceDescriptor, getServiceOverrides, getSessionHandler, getSupportedProtocols, handleException, handleWorkException, initFromServiceDescriptor, initialise, initialiseFromUrl, initWorkManagers, isConnected, isCreateMultipleTransactedReceivers, isDisposed, isDisposing, isEnableMessageEvents, isRemoteSyncEnabled, isStarted, isSyncEnabled, lookupReceiver, registerListener, registerSupportedProtocol, registerSupportedProtocolWithoutPrefix, request, request, send, setConnectionStrategy, setCreateMultipleTransactedReceivers, setDispatcherFactory, setDispatcherThreadingProfile, setDynamicNotification, setExceptionListener, setMaxDispatchersActive, setMaxRequestersActive, setMuleContext, setName, setNumberOfConcurrentTransactedReceivers, setReceiverThreadingProfile, setRequesterFactory, setRequesterThreadingProfile, setServiceOverrides, setSessionHandler, setSupportedProtocols, setupDispatchReturn, setupRequestReturn, start, stop, supportsProtocol, toString, unregisterListener, unregisterSupportedProtocol, updateCachedNotificationHandler, workAccepted, workCompleted, workRejected, workStarted |
JDBC
public static final String JDBC
- See Also:
- Constant Field Values
PROPERTY_POLLING_FREQUENCY
public static final String PROPERTY_POLLING_FREQUENCY
- See Also:
- Constant Field Values
DEFAULT_POLLING_FREQUENCY
public static final long DEFAULT_POLLING_FREQUENCY
- See Also:
- Constant Field Values
pollingFrequency
protected long pollingFrequency
queries
protected Map queries
transactionPerMessage
protected boolean transactionPerMessage
JdbcConnector
public JdbcConnector()
doInitialise
protected void doInitialise()
throws InitialisationException
- Specified by:
doInitialise
in class AbstractConnector
- Throws:
InitialisationException
createReceiver
public MessageReceiver createReceiver(Service service,
InboundEndpoint endpoint)
throws Exception
- Description copied from class:
AbstractConnector
- Create a Message receiver for this connector
- Overrides:
createReceiver
in class AbstractConnector
- Parameters:
service
- the service that will receive events from this receiver,
the listenerendpoint
- the endpoint that defies this inbound communication
- Returns:
- an instance of the message receiver defined in this connectors'
TransportServiceDescriptor
initialised using the service and endpoint.
- Throws:
Exception
- if there is a problem creating the receiver. This exception
really depends on the underlying transport, thus any exception
could be thrown
getReadAndAckStatements
public String[] getReadAndAckStatements(ImmutableEndpoint endpoint)
getQuery
public String getQuery(ImmutableEndpoint endpoint,
String stmt)
getConnection
public Connection getConnection()
throws Exception
- Throws:
Exception
isTransactionPerMessage
public boolean isTransactionPerMessage()
setTransactionPerMessage
public void setTransactionPerMessage(boolean transactionPerMessage)
parseStatement
public String parseStatement(String stmt,
List params)
- Parse the given statement filling the parameter list and return the ready to
use statement.
- Parameters:
stmt
- params
-
- Returns:
getParams
public Object[] getParams(ImmutableEndpoint endpoint,
List paramNames,
Object message,
String query)
throws Exception
- Throws:
Exception
doDispose
protected void doDispose()
- Description copied from class:
AbstractConnector
- Template method to perform any work when destroying the connectoe
- Specified by:
doDispose
in class AbstractConnector
doConnect
protected void doConnect()
throws Exception
- Description copied from class:
AbstractConnector
- Template method where any connections should be made for the connector
- Specified by:
doConnect
in class AbstractConnector
- Throws:
Exception
doDisconnect
protected void doDisconnect()
throws Exception
- Description copied from class:
AbstractConnector
- Template method where any connected resources used by the connector should be
disconnected
- Specified by:
doDisconnect
in class AbstractConnector
- Throws:
Exception
doStart
protected void doStart()
throws MuleException
- Description copied from class:
AbstractConnector
- Template method to perform any work when starting the connectoe
- Specified by:
doStart
in class AbstractConnector
- Throws:
MuleException
- if the method fails
doStop
protected void doStop()
throws MuleException
- Description copied from class:
AbstractConnector
- Template method to perform any work when stopping the connectoe
- Specified by:
doStop
in class AbstractConnector
- Throws:
MuleException
- if the method fails
getProtocol
public String getProtocol()
- Returns:
- the primary protocol name for endpoints of this connector
getDataSource
public DataSource getDataSource()
setDataSource
public void setDataSource(DataSource dataSource)
getResultSetHandler
public org.apache.commons.dbutils.ResultSetHandler getResultSetHandler()
setResultSetHandler
public void setResultSetHandler(org.apache.commons.dbutils.ResultSetHandler resultSetHandler)
getQueryRunner
public org.apache.commons.dbutils.QueryRunner getQueryRunner()
setQueryRunner
public void setQueryRunner(org.apache.commons.dbutils.QueryRunner queryRunner)
getPollingFrequency
public long getPollingFrequency()
- Returns:
- Returns the pollingFrequency.
setPollingFrequency
public void setPollingFrequency(long pollingFrequency)
- Parameters:
pollingFrequency
- The pollingFrequency to set.
getQueries
public Map getQueries()
- Returns:
- Returns the queries.
setQueries
public void setQueries(Map queries)
- Parameters:
queries
- The queries to set.
Copyright © 2003-2008 MuleSource, Inc.. All Rights Reserved.