public class MongoDBMessenger extends MongoDBConnector
ACTION_COUNT, ACTION_FIND, ACTION_FINDANDMODIFY, ACTION_FINDANDREMOVE, ACTION_FINDONE, ACTION_GROUP, ACTION_INSERT, ACTION_LIST, ACTION_MAPREDUCE, ACTION_REMOVE, ACTION_UPDATE, ACTION_UPDATEMULTI, dbName, hostname, isConnected, isSlaveOK, password, port, uri, username
Constructor and Description |
---|
MongoDBMessenger(java.util.Map props) |
Modifier and Type | Method and Description |
---|---|
void |
find(XQueue xq)
It listens to an XQueue for incoming JMS messages and extracts the
query JSON statement and data from each message.
|
void |
findone(XQueue xq)
It executes the predfined query on the default collection and finds the
only one doc.
|
java.lang.String |
getOperation() |
static java.lang.StringBuffer |
getResult(int type,
com.mongodb.DBCursor cursor) |
java.lang.StringBuffer |
getResult(int type,
java.lang.String[] list) |
void |
list(XQueue xq)
It lists all collections in the db
|
void |
update(XQueue xq)
It listens to the XQueue for incoming JMS messages and extracts the
collection name and JSON data from each message.
|
close, count, find, find, findOne, findOne, getCollection, getCommandID, getURI, insert, isConnected, list, main, parse, reconnect, remove, update, updateMulti
public void findone(XQueue xq) throws NonSQLException, javax.jms.JMSException
NonSQLException
javax.jms.JMSException
public void list(XQueue xq) throws NonSQLException, TimeoutException
NonSQLException
TimeoutException
public void find(XQueue xq) throws NonSQLException, TimeoutException
NonSQLException
TimeoutException
public void update(XQueue xq) throws NonSQLException, TimeoutException
NonSQLException
TimeoutException
public static java.lang.StringBuffer getResult(int type, com.mongodb.DBCursor cursor)
public java.lang.StringBuffer getResult(int type, java.lang.String[] list) throws com.mongodb.MongoException
com.mongodb.MongoException
public java.lang.String getOperation()