buildListenerSet | R Documentation |
This method builds a ListenerSet
for an engine.
In particular, the config
is list which come from reading a
JSON file (see fromJSON
) which contains the rules for
building the Listener
s in the set.
buildListenerSet(sender, config, appid, lscol, dbname, dburi,
sslops, registrycol, registrydbname,
mongoverbose = FALSE)
sender |
A character scalar identifying the message sender. |
config |
A named list providing details of the contained listeners. |
appid |
A character scalar giving the application ID for the application being built. |
lscol |
A character scalar giving the name of the collection used for logging messages by the message set. |
dbname |
A character scalar giving the name of the database for the message log, as well as the default database for listeners. |
dburi |
A character scalar giving the URI of the mongo collection. |
sslops |
A list giving options for a SSL connection. See |
registrycol |
A character scalar giving the name of the colleciton for registering output. |
registrydbname |
A character scalar giving the name of the database in which the output registriation collection |
mongoverbose |
A flag for adding debugging information to Mongo
calls (see |
This method builds the listener set starting by calling
buildListener(config[[i]])
for each element of the
config
list. This then becomes the listeners
to the
ListenerSet
constructor.
Note that the appid
, dburi
, dbnmae
(mapped to
defaultDB
), and sslops
are passed to
buildListeners
to use for defaults.
An object of class ListenerSet
.
Russell Almond
ListenerSet
, buildListener
## Not run:
jspecs <- '{
"listeners":[
{
"name":"ToAS",
"type":"InjectionListener",
"dbname":"ASRecords",
"colname":"Statistics",
"messages":["Statistics"]
},
{
"name":"PPStats",
"type":"UpdateListener",
"dbname":"Proc4",
"colname":"Statistics",
"targetField":"data",
"jsonEncoder":"stats2json",
"messages":["Statistics"]
}
]}'
speclist <- jsonlite::fromJSON(jspecs,FALSE)
lset <- buildListenerSet("TestEngine",speclist$listeners,
"ecd://pluto.coe.fsu.edu/P4Test",
lscol="Messages",dbname="test",
dburi="", sslops=mongolite::ssl_options(),
registrycol="OutputFiles",
registrydbname="test")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.