RhttpdApp-class(Rook)
RhttpdApp-class()所属R语言包:Rook
Class RhttpdApp
类RhttpdApp
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Creates a Rook application ready to add to an Rhttpd server.
创建一个鲁克应用程序添加到Rhttpd服务器。
Details
详细信息----------Details----------
The internal web server allows dispatching to user-defined closures located in tools:::.httpd.handlers.env. For instance, if a handler named 'foo' is placed there, then the url path to that handler is /custom/foo.
内部Web服务器允许调度的工具用户自定义关闭位于:::。httpd.handlers.env。例如,如果命名为foo的处理程序是放在那里,然后该处理程序的URL路径是/自定义/ foo的。
RhttpdApp along with Rhttpd hide these details by allowing a user to create application objects specifying only their name and the application. There is currently a limit of 63 characters or less for application names.
RhttpdAppRhttpd隐藏这些细节,允许用户创建应用程序对象仅指定其名称和应用程序。目前有63个字符或更少的应用程序名称的限制。
NOTE: When a file is given as the value of the app argument to new(), it is monitored for timestamp changes. If a change occurs in the modification time as returned by file.info, then the file is sourced prior to handling subsequent requests.
注:当一个文件被给定的作为appnew()参数的值,监控其时间戳改变。修改时间返回file.info如果发生变化,那么该文件来源之前,处理后续的请求。
方法----------Methods----------
new(app, name): Creates an object of class RhttpdApp. Argument app can be any Rook aware object or it can be a location to a file whose source creates a Rook aware object. That object must be named either 'app' or the value of name. name is a character vector.
new(app, name):创建对象的类RhttpdApp。参数app可以是任何Rook感知对象或它可以是一个文件,其源创建一个鲁克知道对象的位置。该对象必须命名为'app'或name。 name是一个字符向量。
参见----------See Also----------
Rhttpd.
Rhttpd。
实例----------Examples----------
s <- Rhttpd$new()
s$add(RhttpdApp$new(
name='summary',
app=system.file('exampleApps/summary.R',package='Rook')
))
## Not run: [#不运行:]
s$start(quiet=TRUE)
s$browse(1)
## End(Not run)[#(不执行)]
s$remove(all=TRUE)
# Stops the server but doesn't uninstall the app[停止服务器,但不卸载的应用程序]
## Not run: [#不运行:]
s$stop()
## End(Not run)[#(不执行)]
s$remove(all=TRUE)
rm(s)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|