org.apache.activemq.store.jdbc
Class DataSourceServiceSupport

java.lang.Object
  extended by org.apache.activemq.util.ServiceSupport
      extended by org.apache.activemq.broker.LockableServiceSupport
          extended by org.apache.activemq.store.jdbc.DataSourceServiceSupport
All Implemented Interfaces:
BrokerServiceAware, Lockable, Service
Direct Known Subclasses:
JDBCPersistenceAdapter, JournalPersistenceAdapterFactory

public abstract class DataSourceServiceSupport
extends LockableServiceSupport

A helper class which provides a factory method to create a default {@link DataSource) if one is not provided.


Field Summary
 
Fields inherited from class org.apache.activemq.broker.LockableServiceSupport
brokerService
 
Constructor Summary
DataSourceServiceSupport()
           
DataSourceServiceSupport(DataSource dataSource)
           
 
Method Summary
static DataSource createDataSource(String homeDir)
           
 String getDataDirectory()
           
 File getDataDirectoryFile()
           
 DataSource getDataSource()
           
 void setDataDirectory(String dataDirectory)
           
 void setDataDirectoryFile(File dataDirectory)
           
 void setDataSource(DataSource dataSource)
           
 String toString()
           
 
Methods inherited from class org.apache.activemq.broker.LockableServiceSupport
getLocker, getScheduledThreadPoolExecutor, init, keepLockAlive, postStop, preStart, setBrokerService, setLocker, setLockKeepAlivePeriod, setUseLock, stopBroker
 
Methods inherited from class org.apache.activemq.util.ServiceSupport
addServiceListener, dispose, doStart, doStop, isStarted, isStopped, isStopping, removeServiceListener, start, stop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.activemq.broker.Lockable
createDefaultLocker
 

Constructor Detail

DataSourceServiceSupport

public DataSourceServiceSupport()

DataSourceServiceSupport

public DataSourceServiceSupport(DataSource dataSource)
Method Detail

getDataDirectoryFile

public File getDataDirectoryFile()

setDataDirectoryFile

public void setDataDirectoryFile(File dataDirectory)

getDataDirectory

public String getDataDirectory()

setDataDirectory

public void setDataDirectory(String dataDirectory)

getDataSource

public DataSource getDataSource()
                         throws IOException
Throws:
IOException

setDataSource

public void setDataSource(DataSource dataSource)

createDataSource

public static DataSource createDataSource(String homeDir)
                                   throws IOException
Throws:
IOException

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2005-2013 The Apache Software Foundation. All Rights Reserved.