패키지 | mx.data |
클래스 | public class ManualSyncConfiguration |
상속 | ManualSyncConfiguration Object |
언어 버전: | ActionScript 3.0 |
제품 버전: | Adobe Digital Enterprise Platform Data Services for Java EE 3 |
런타임 버전: | Flash Player 9, AIR 1.1 |
autoSyncEnabled
feature.
When autoSyncEnabled
is true
,
the server automatically routes messages by tracking
precisely which objects are being managed on each client. This is not a fully
scalable system as each server maintains a store of (at least) the ids of all
objects managed by its connected clients. Also, all data messages are routed
to all servers.
You can improve the efficiency of that process or restrict synchronizing of data by manually matching producers (either other clients or server code) and client consumers. LCDS provides a flexible mechanism for matching producers and consumers. You can either do this simply by matching topics published by producers and subscribed to by consumers. Each producer can specify a list of subtopics and each consumer can subscribe to a list of subtopics (note: delivery is always relative to the parent destination which can be considered the parent topic).
For advanced usage, producers send an arbitrary set of name/value pairs. Consumers subscribe using a selector expression (using JMS's selector language - similar to a primitive SQL where clause). Each message gets the producer's name/value pairs set as message headers. These headers are matched against the Consumer's selector expression on the server and only if there is a match is the message routed. You can use these mechanisms in combination as well.
Note that the manual sync configuration only routes changes to the client. The
client still must execute the fill()
, getItem()
,
or other method so that it has a place to receive
those changes. If a client receives a pushed message for an item which is not
managed on that client, it will be ignored. You can see the debug logging information
on the client to detect when this is happening. Also, the debug logging on the
server can be used to diagnose subscription problems on the server.
속성 | 정의 주체 | ||
---|---|---|---|
constructor : Object
지정된 객체 인스턴스의 클래스 객체 또는 생성자 함수에 대한 참조입니다. | Object | ||
consumerSubscriptions : ArrayCollection
This property specifies the current set of subscriptions for this manualSync
configuration. | ManualSyncConfiguration | ||
producerDefaultHeaders : Object
This property specifies a set of name/value pairs which are added
to any changes made subsequently by this data service. | ManualSyncConfiguration | ||
producerSubtopics : ArrayCollection
This property specifies the list of topics which any subsequent changes
are sent to. | ManualSyncConfiguration |
메서드 | 정의 주체 | ||
---|---|---|---|
Constructor. | ManualSyncConfiguration | ||
This is a convenience method to add a subscription to this client. | ManualSyncConfiguration | ||
This is a convenience method to remove a subscription from this client. | ManualSyncConfiguration | ||
This method is used to subscribe this client to changes from the server. | ManualSyncConfiguration | ||
This method is used to unsubscribe this client from all subscriptions. | ManualSyncConfiguration | ||
지정된 속성이 객체에 정의되어 있는지 여부를 나타냅니다. | Object | ||
Object 클래스의 인스턴스가 매개 변수로 지정된 객체의 프로토타입 체인에 있는지 여부를 나타냅니다. | Object | ||
지정된 속성이 존재하고 열거 가능한지 여부를 나타냅니다. | Object | ||
루프 작업에서 동적 속성을 사용할 수 있는지 여부를 설정합니다. | Object | ||
로캘별 규칙에 따라 서식이 지정된 이 객체의 문자열 표현을 반환합니다. | Object | ||
지정된 객체의 문자열 표현을 반환합니다. | Object | ||
지정된 객체의 프리미티브 값을 반환합니다. | Object |
consumerSubscriptions | 속성 |
consumerSubscriptions:ArrayCollection
언어 버전: | ActionScript 3.0 |
제품 버전: | Adobe Digital Enterprise Platform Data Services for Java EE 3 |
런타임 버전: | Flash Player 9, AIR 1.1 |
This property specifies the current set of subscriptions for this manualSync configuration. This is an ArrayCollection of SubscriptionInfo instances. You can add subscriptions directly to this property using the class mx.messaging.SubscriptionInfo or use the convenience methods consumerAddSubscription and consumerRemoveSubscription. The SubscriptionInfo instance has a subtopic and a selector property. If the subtopic is null, the subscription applies to the default topic for the destination. Only messages that lack any subtopic at all match the default destination. If the selector expression is null, any message which matches the topic of the subscription is delivered to this client.
In addition to specifying a list of subscriptions, you must also call the subscribe method in order to initiate the subscription. Once the consumer is subscribed, any changes made to this subscriptions property are automatically applied to the server's subscriptions for this client. When you call "consumerUnsubscribe", the subscriptions property is not modified by the client is unsubscribed from all of its current subscriptions.
구현
public function get consumerSubscriptions():ArrayCollection
public function set consumerSubscriptions(value:ArrayCollection):void
producerDefaultHeaders | 속성 |
public var producerDefaultHeaders:Object
언어 버전: | ActionScript 3.0 |
제품 버전: | Adobe Digital Enterprise Platform Data Services for Java EE 3 |
런타임 버전: | Flash Player 9, AIR 1.1 |
This property specifies a set of name/value pairs which are added
to any changes made subsequently by this data service. You typically
use these properties to match against a selector expression provided in
one of the ConsumerSubscriptions. For example, you might specify
this property as:
dataService.manualSync.producerDefaultHeaders = {a:'3'}
A consumer could add a matching selector expression such as:
dataService.manualSync.consumerAddSubscription(null, "a IN ('3', '4', '5')");
producerSubtopics | 속성 |
public var producerSubtopics:ArrayCollection
언어 버전: | ActionScript 3.0 |
제품 버전: | Adobe Digital Enterprise Platform Data Services for Java EE 3 |
런타임 버전: | Flash Player 9, AIR 1.1 |
This property specifies the list of topics which any subsequent changes are sent to. If another client data service is subscribed to any of these topics, that client will receive these changes. It is an ArrayCollection of String names of topics. The names should match the names in another client's consumerSubscriptions property for the other client to receive this message. A match occurs when either the subtopic names are the same or the consumer has subscribed using a subtopic wildcard expression which matches the producer's subtopic.
ManualSyncConfiguration | () | 생성자 |
public function ManualSyncConfiguration()
언어 버전: | ActionScript 3.0 |
제품 버전: | Adobe Digital Enterprise Platform Data Services for Java EE 3 |
런타임 버전: | Flash Player 9, AIR 1.1 |
Constructor.
consumerAddSubscription | () | 메서드 |
public function consumerAddSubscription(subtopic:String = null, selector:String = null, maxFrequency:uint = 0):void
언어 버전: | ActionScript 3.0 |
제품 버전: | Adobe Digital Enterprise Platform Data Services for Java EE 3 |
런타임 버전: | Flash Player 9, AIR 1.1 |
This is a convenience method to add a subscription to this client.
매개 변수
subtopic:String (default = null ) — The subtopic string.
| |
selector:String (default = null ) — The selector string.
| |
maxFrequency:uint (default = 0 ) — The maximum number of messages per second the DataService
wants to receive for the subscription. Note that this value overwrites the
DataService wide maxFrequency.
|
consumerRemoveSubscription | () | 메서드 |
public function consumerRemoveSubscription(subtopic:String = null, selector:String = null):void
언어 버전: | ActionScript 3.0 |
제품 버전: | Adobe Digital Enterprise Platform Data Services for Java EE 3 |
런타임 버전: | Flash Player 9, AIR 1.1 |
This is a convenience method to remove a subscription from this client.
매개 변수
subtopic:String (default = null ) — The subtopic string.
| |
selector:String (default = null ) — The selector string.
|
consumerSubscribe | () | 메서드 |
public function consumerSubscribe(clientId:String = null):void
언어 버전: | ActionScript 3.0 |
제품 버전: | Adobe Digital Enterprise Platform Data Services for Java EE 3 |
런타임 버전: | Flash Player 9, AIR 1.1 |
This method is used to subscribe this client to changes from the server. To use this method, you should previously have added at least one subscription to the subscriptions property (or use consumerAddSubscription).
매개 변수
clientId:String (default = null ) — The client ID.
|
consumerUnsubscribe | () | 메서드 |
public function consumerUnsubscribe():void
언어 버전: | ActionScript 3.0 |
제품 버전: | Adobe Digital Enterprise Platform Data Services for Java EE 3 |
런타임 버전: | Flash Player 9, AIR 1.1 |
This method is used to unsubscribe this client from all subscriptions. Calling this method does not affect the subscriptions property making it easy to subscribe/unsubscribe the client as a whole.
Tue Jun 12 2018, 03:17 PM Z