由于FluorineFx是Flex Data Service的.net替代品(如果你用Java写服务器端程序,则可以直接用Flex Data Service),FluorineFx提供了和Flex Data Service相同的功能—即在services-config.xml配置文件的
部分配置Remoting Service, Message Service ,Data Management Service。
Includes files by reference that contain service definitions
services/service
Definition for a service (Remoting Service, Message Service, Data Management Service)
services/service/properties
Service-level properties
services/service/adapters
Definitions for service adapters that are referenced in destinations
services/service/adapters/adapter-definition
Service adapter definition
services/service/default-channels
References to a service's default channels (when a channel is not explicitly referenced in a destination)
services/service/default-channels/channel
References to the id of a channel definition
services/service/destination
Destination definition
services/service/destination/adapter
A reference to a service adapter
services/service/destination/properties
Destination properties
services/service/destination/channels
References to the channels that the service can use for data transport
services/service/destination/channels/channel
References to the id of a channel definition
services/service/destination/security
Complete security constraint definitions or references to security constraint definitions and login command definitions that are used for authentication and authorization
在FluorineFx中,默认的 Message Service adapter就是FluorineFx.Messaging.Services.Messaging.MessagingAdapter 类。所以配置文件如下设置:
如果编写MessagingAdapter类的子类,你就可以自己定义Adapter 。
3.Network properties
Property element
Description
session-timeout
超过这个时间(单位:分钟),a subscriber is unsubscribed。 (如果没有或者值为 0 ,则表明不会自动unsubscribe)
4.Server properties
Property element
Description
allow-subtopics
Destination是否支持subtopics (true/false)
subtopic-separator
不支持。所以总是"." (点)
三、配置 Data Management Service
Data Management Service destination 是一个终端。这个终端可以接收数据,或者发送数据到客户机。它提供了将数据分布到多个Data Management Service destination和 在这些destination之间进行同步(synchronization)的能力。 在Flex中使用DataService 组件或ActionScript API可以连接到Data Management Service destination。
FluorineFx中的 Data adapter是由 FluorineFx.DotNetAdapter 类实现的:
3.Destination properties
Property element
描述
source
Fully qualified type name of the Data Assembler
scope
Valid values are request, application, and session. The default value is request.
cache-items
不支持, 总设置成true
auto-sync-enabled
不支持, 总设置成true
4.Network properties
Property element
描述
session-timeout
Idle time in minutes before a subscriber is unsubscribed (Missing element or the value 0 means do not unsubscribe automatically)
paging
Optional element specifying data paging settings. The enabled attribute (true/false) indicates whether data paging is enabled for the destination, the pageSize attribute indicates the number of records in a page.
5.Metadata properties
Property element
描述
identity
Specifies data properties that provide object identity. The property attribute identifies the property name.
6.Server properties
Property element
描述
allow-subtopics
Specifies whether subtopics are allowed for a destination (true/false)
subtopic-separator
Not supported. In FluorineFx the subtopic separator is always "." (period)