Universal Messaging 10.1 | Administration Guide | Universal Messaging Enterprise Manager | Administration Using Enterprise Manager | Plugins | File Plugin
 
File Plugin
The file plugin enables the Universal Messaging realm server to serve static web pages. This can be used for example to have the realm server serve applets and supported files without the need for a dedicated web server. For example, if you are running a file plugin on your realm server host called webhost, on an nhp interface running on port 80, you could type in a URL within a web browser http://webhost:80/index.html which will return the index page defined within the file plugin's base path directory.
This enables the realm server to act as a web server and can even be used to serve applets to client browsers that may directly communicate with the realm server and publish and consume events from channels.
Important:
The root file directory that the file plugin points to using the BasePath parameter can be any disk location. All files under that location are potentially visible to any HTTP client that can connect to the Universal Messaging realm server. We would recommend that you do not point the file plugin to a directory that contains any sensitive data, without also configuring suitable access controls. These could be at the network level (restricting network access to the server), in the file plugin configuration (it supports HTTP basic authentication with a username/password file) or by using file permissions at the Operating System level (so that sensitive data cannot be read by the realm server process). Or of course a combination of these.
Configuration
Once you have created the file plugin on the interface you require it on, you can then select it from the Plugins panel for the selected interface and enter values as you wish for the configuration parameters.
The file plugin requires configuration information defining its behavior as well as the location of the files it is required to serve to the clients. Below is a table that shows each configuration parameter and describes what it is used for.
Parameter Name
Description
Default Value
BufferSize
Size of the internal buffer to use to send the data.
1024
BasePath
Path used to locate the files.
The UniversalMessaging/doc directory under the product installation directory.
DefaultName
If no file name is specified which file should be returned.
index.html
FileNotFoundPage
Name of the file to send when file cannot be located
None.
UserFile
Name of the file containing the usernames and passwords.
None.
Security Realm
Name of the authentication realm
None.
MimeType
Name of the file to load the mime type information from. The format of this file is : <mimetype> <fileExtension>
Built in types used.
CachedObjects
Number of objects to store in the cache
100
CacheObjectSize
Size in bytes that can be stored in the cache
20K
SeparateAccessandErrorLogs
Choose true to have separate log files for the access and error logs.
FALSE
The image below shows the Enterprise Manager Interfaces panel with an nhp interface running on port 9000. This interface has a file plugin configured with the default settings and its URL path is /. The default BasePath setting is the UniversalMessaging/doc directory in the file hierarchy for your local product installation, which is where the default product installation places the Universal Messaging API docs. Once the plugin is created, you can click the Apply button which will restart the interface and enable the new file plugin.
From a browser, it is now possible to enter the URL http://localhost:9000/ which will then render the default index.html page from the UniversalMessaging/doc directory for the API docs. The image below demonstrates the browser view from a realm that has a file plugin on an nhp interface on port 9000, and displaying the default API docs found in the UniversalMessaging/doc directory.