org.mule.transport.jdbc
Class JdbcMessageDispatcher

java.lang.Object
  extended by org.mule.transport.AbstractConnectable
      extended by org.mule.transport.AbstractMessageDispatcher
          extended by org.mule.transport.jdbc.JdbcMessageDispatcher
All Implemented Interfaces:
ExceptionListener, Disposable, Connectable, MessageDispatcher, MessageDispatching

public class JdbcMessageDispatcher
extends AbstractMessageDispatcher

The Jdbc Message dispatcher is responsible for executing SQL queries against a database.


Field Summary
protected  JdbcConnector connector
           
protected static Log staticLogger
           
protected static String STORED_PROCEDURE_PREFIX
           
protected static String STORED_PROCEDURE_SUFFIX
           
 
Fields inherited from class org.mule.transport.AbstractConnectable
connected, connecting, connectionStrategy, disposed, endpoint, logger
 
Fields inherited from interface org.mule.api.lifecycle.Disposable
PHASE_NAME
 
Fields inherited from interface org.mule.api.transport.MessageDispatching
RECEIVE_NO_WAIT, RECEIVE_WAIT_INDEFINITELY
 
Constructor Summary
JdbcMessageDispatcher(OutboundEndpoint endpoint)
           
 
Method Summary
protected  void doConnect()
           
protected  void doDisconnect()
           
protected  void doDispatch(MuleEvent event)
           
protected  void doDispose()
           
protected  MuleMessage doSend(MuleEvent event)
           
protected static MuleMessage executeRequest(long timeout, MuleEvent event, JdbcConnector connector, ImmutableEndpoint endpoint)
          This does work for both dispatcher and requester
protected  Object executeWriteStatement(MuleEvent event, String writeStmt)
           
protected  String getStatement(ImmutableEndpoint endpoint)
           
protected  boolean isWriteStatement(String writeStmt)
           
 
Methods inherited from class org.mule.transport.AbstractMessageDispatcher
dispatch, isTransactionRollback, send, useRemoteSync
 
Methods inherited from class org.mule.transport.AbstractConnectable
activate, connect, disconnect, dispose, disposeAndLogException, exceptionThrown, getConnectEventId, getConnectionDescription, getConnector, getEndpoint, isConnected, isDoThreading, passivate, reconnect, toString, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.mule.api.transport.MessageDispatcher
activate, getConnector, passivate, validate
 
Methods inherited from interface org.mule.api.lifecycle.Disposable
dispose
 
Methods inherited from interface org.mule.api.transport.Connectable
connect, disconnect, getConnectionDescription, isConnected
 

Field Detail

staticLogger

protected static Log staticLogger

connector

protected JdbcConnector connector

STORED_PROCEDURE_PREFIX

protected static final String STORED_PROCEDURE_PREFIX
See Also:
Constant Field Values

STORED_PROCEDURE_SUFFIX

protected static final String STORED_PROCEDURE_SUFFIX
See Also:
Constant Field Values
Constructor Detail

JdbcMessageDispatcher

public JdbcMessageDispatcher(OutboundEndpoint endpoint)
Method Detail

doDispose

protected void doDispose()
Specified by:
doDispose in class AbstractConnectable

executeWriteStatement

protected Object executeWriteStatement(MuleEvent event,
                                       String writeStmt)
                                throws Exception
Throws:
Exception

getStatement

protected String getStatement(ImmutableEndpoint endpoint)

isWriteStatement

protected boolean isWriteStatement(String writeStmt)

doDispatch

protected void doDispatch(MuleEvent event)
                   throws Exception
Specified by:
doDispatch in class AbstractMessageDispatcher
Throws:
Exception

doSend

protected MuleMessage doSend(MuleEvent event)
                      throws Exception
Specified by:
doSend in class AbstractMessageDispatcher
Throws:
Exception

executeRequest

protected static MuleMessage executeRequest(long timeout,
                                            MuleEvent event,
                                            JdbcConnector connector,
                                            ImmutableEndpoint endpoint)
                                     throws Exception
This does work for both dispatcher and requester

Parameters:
timeout -
event -
connector -
endpoint -
Returns:
Throws:
Exception

doConnect

protected void doConnect()
                  throws Exception
Specified by:
doConnect in class AbstractConnectable
Throws:
Exception

doDisconnect

protected void doDisconnect()
                     throws Exception
Specified by:
doDisconnect in class AbstractConnectable
Throws:
Exception


Copyright © 2003-2008 MuleSource, Inc.. All Rights Reserved.