|
![]() |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.lang.Thread | +--uk.org.iscream.cms.server.dbinterface.DBInserter
A class containing a method to accept a String containing XML. This string is then parsed and the contents are added to the database. IMPORTANT: This method obtains the database user and database connection password from a seperate configuration file. As such, this class may be safely placed in a public CVS repository.
Field Summary | |
private Logger |
_logger
This holds a reference to the system logger that is being used. |
private String |
_mySQLDatabase
The SQL database name |
private String |
_mySQLHost
The SQL Host |
private String |
_mySQLPassword
The SQL password |
private String |
_mySQLUser
The SQL username |
private String |
_name
This is the friendly identifier of the component this class is running in. |
private Queue |
_queue
A reference to our Queue |
String |
REVISION
The current CVS revision of this class |
Fields inherited from class java.lang.Thread |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
DBInserter(Queue queue)
|
Method Summary | |
private void |
addToDatabase(XMLPacketWrapper xpw)
Inserts the data into the database |
void |
run()
Main run Thread of this class |
String |
toString()
Overrides the Object.toString()
method to provide clean logging (every class should have this). |
Methods inherited from class java.lang.Thread |
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, yield |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public final String REVISION
private String _mySQLUser
private String _mySQLPassword
private String _mySQLDatabase
private String _mySQLHost
private String _name
private Logger _logger
private Queue _queue
Constructor Detail |
public DBInserter(Queue queue) throws ComponentStartException
Method Detail |
public void run()
run
in interface Runnable
run
in class Thread
public String toString()
Object.toString()
method to provide clean logging (every class should have this).
This uses the uk.org.iscream.cms.util.NameFormat class
to format the toString()
toString
in class Thread
private void addToDatabase(XMLPacketWrapper xpw)
xpw
- the XML data to be inserted
|
![]() |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |