| java.lang.Object |
| ↳ |
org.mule.modules.mongohq.MongoHQConnector |
Known Direct Subclasses
|
Known Indirect Subclasses
|
Class Overview
This connector provides functionality to connect with MongoHQ
a mongoDB hosting provider.
{@sample.config INCLUDE_ERROR}
Summary
| Constants |
| int |
TIMEOUT |
Connection timeout
|
| Fields |
|
private
String |
apiKey |
API Key
|
|
[Expand]
Inherited Methods |
From class
java.lang.Object
|
Object
|
clone()
|
|
boolean
|
equals(Object arg0)
|
|
void
|
finalize()
|
|
final
Class<?>
|
getClass()
|
|
int
|
hashCode()
|
|
final
void
|
notify()
|
|
final
void
|
notifyAll()
|
|
String
|
toString()
|
|
final
void
|
wait()
|
|
final
void
|
wait(long arg0, int arg1)
|
|
final
void
|
wait(long arg0)
|
|
Constants
private
static
final
int
TIMEOUT
Constant Value:
7200
(0x00001c20)
Fields
Public Constructors
public
MongoHQConnector
()
Public Methods
public
abstract
void
createDatabase
(DatabaseRequest databaseRequest)
Parameters
| databaseRequest
| Data required to create a database (name and slug of the plan) |
Returns
- The status of the operation
Throws
| IOException
| if the connection fails
|
public
abstract
void
deleteDatabase
(String dbName)
Parameters
| dbName
| Name of the database to remove |
Returns
- The status of the operation
Throws
| IOException
| if the connection fails
|
public
String
getApiKey
()
public
abstract
List<Database>
listDatabases
()
Returns
- The list of the user databases
Throws
| IOException
| if the connection fails
|
public
abstract
Database
retrieveDatabaseInfo
(String dbName)
Retrieve information about a particular database
Parameters
| dbName
| Name of the database to retrieve |
Throws
| IOException
| if the connection fails
|
public
void
setApiKey
(String apiKey)
public
static
String
transformDatabaseRequestToJson
(DatabaseRequest databaseRequest)
Transform DatabaseRequest to JSON
Parameters
| databaseRequest
| Request to create a JSON database (name and slug) |
Returns
- string JSON representation of the request
Throws
| IOException
| if the connection fails
|
public
static
Database
transformJsonToDatabase
(String json)
Transform JSON to database
Parameters
| json
| JSON string to transform |
Throws
| IOException
| if the connection fails
|
public
static
List<Database>
transformJsonToDatabases
(String json)
Transform JSON to a list of databases
Parameters
| json
| JSON string to transform |
Throws
| IOException
| if the connection fails
|
Protected Methods
protected
static
List<T>
genericJsonToListTransformer
(String json)