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, updateMultipublic void findone(XQueue xq) throws NonSQLException, javax.jms.JMSException
NonSQLExceptionjavax.jms.JMSExceptionpublic void list(XQueue xq) throws NonSQLException, TimeoutException
NonSQLExceptionTimeoutExceptionpublic void find(XQueue xq) throws NonSQLException, TimeoutException
NonSQLExceptionTimeoutExceptionpublic void update(XQueue xq) throws NonSQLException, TimeoutException
NonSQLExceptionTimeoutExceptionpublic 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.MongoExceptionpublic java.lang.String getOperation()