The following is a typical process for developing and deploying an application that uses the FMS event gateway:
- Design your application.
- Configure an FMS event gateway instance to use the Flash Media Server.
- Write your ColdFusion CFCs, CFM pages, and any other application elements.
- Create or identify a Flash client that manipulates a Flash Media Server shared object to test your ColdFusion application.
- Test your application using Flash Media Server and the Flash client.
- Make the application publicly available.
Configuring an FMS event gateway
You provide FMS event gateway-specific configuration information to the FMS event gateway in a configuration file. You specify the configuration file location when you configure the FMS event gateway instance in the ColdFusion Administrator. The configuration file contains the URL of the Flash Media Server application and the name of the Flash Media Server shared object. The following example is a sample configuration file:
# |
FMS event gateway GatewayHelper class methods
The following table lists the FMS event gateway GatewayHelper class methods:
Method |
Description |
---|---|
setProperty |
Sets the property of the Flash Media Server shared object. The following parameters are valid:name: The string that contains the name of the shared object.value: The shared object. |
getProperty |
Gets the property of the Flash Media Server shared object. The following parameters are valid:name: The string that contains the name of the shared object. |
Data translation
ColdFusion and Flash Media Server use different data types; therefore, data translation is required to pass data from one to the other. In addition to basic data types such as numeric, String, and Boolean, you can pass ColdFusion queries, structures, and arrays to Flash Media Server. You pass a ColdFusion query object to Flash Media Server as an array of java.util.HashMap. Each HashMap object in the array contains a key-value pair for column names and values for each row in the query. When you pass a ColdFusion array to Flash Media Server, the FMS event gateway converts it to a Java array of objects. When you pass a ColdFusion structure, no conversion is required.
The FMS event gateway does not support passing CFCs in shared objects.