<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    The NoteBook of EricKong

      BlogJava :: 首頁 :: 聯系 :: 聚合  :: 管理
      611 Posts :: 1 Stories :: 190 Comments :: 0 Trackbacks

    Messages

    All communication between Flex client components and BlazeDS is performed with messages. Flex components use several message types to communicate with their corresponding services in BlazeDS. All messages have client-side (ActionScript) implementations and server-side (Java) implementations because the messages are serialized and deserialized on both the client and the server. You can also create messages directly in Java and have those messages delivered to clients using the server push API.

    Some message types, such as AcknowledgeMessage and CommandMessage, are used across different Flex components and BlazeDS services. Other message types are used by specific Flex components and BlazeDSservices. Forexample, to have a Producer component send a message to subscribed Consumer components, you create a message of type AsyncMessage and pass it to the send() method of the Producer component.

    In other situations, you do not write code for constructing and sending messages. For example, you simply use a RemoteObject component to call the remote method from the Flex application. The RemoteObject component creates a RemotingMessage to encapsulate the RemoteObject call. In response it receives an AcknowledgeMessage from the server. The AcknowledgeMessage is encapsulated in a ResultEvent in the Flex application.

    Sometimes you must create a message to send to the server. For example, you could send a message by creating an AsyncMessage and passing it to a Producer.

    Services and destinations
    Services and destinations are the next links in the message processing chain in the BlazeDS server. The system includes four services and their corresponding destinationsBlazeDS:
         RemotingService and RemotingDestination
         HTPProxyService and HTTPProxyDestination
         MessageService and MessageDestination
    Services are the targets of messages from client-side Flex components. Think of destinations as instances of a service configured in a certain way. For example, a RemoteObject component is used on the Flex client to communicate with
    the RemotingService. In the RemoteObject component, you must specify a destination id property that refers to a remoting destination with certain properties, such as the class you want to invoke methods on. The mapping
    between client-side Flex components and BlazeDS services is as follows:
         HTTPService and WebService communicate with HTTPProxyService/HTTPProxyDestination
         RemoteObject communicates with RemotingService/RemotingDestination
         Producer and Consumer communicate with MessageService/MessageDestination
    You can configure services and their destinations in the services-config.xml file, but it is best practice to put them in separate files as follows:
         RemotingService configured in the remoting-config.xml file
         HTTPProxyService configured in the proxy-config.xml file
         MessageService configured in the messaging-config.xml file

    The following table describes the typical setup of the configuration files. Commented versions of these files are available in the resources/config directory of the BlazeDS installation.

    Filename Description
    services-config.xml  The top-level BlazeDS configuration file. This file usually contains security constraint definitions,channel definitions, and logging settings that each of the services can use. It can contain service definitions inline or include them by reference. Generally, the services are defined in the remoting-config.xml, proxy-config.xml, and messaging-config.xml.
    remoting-config.xml The Remoting Service configuration file, which defines Remoting Service destinations for working with remote objects.
    proxy-config.xml The Proxy Service configuration file, which defines Proxy Service destinations for working with web services and HTTP services (REST services).
    messaging-config.xml The Messaging Service configuration file, which defines Messaging Service destinations for performing publish subscribe messaging.

    The file-path value is relative to the location of the services-config.xml file. The following example shows service definitions included by reference:
    <services>
    <!-- REMOTING SERVICE -->
    <service-include file-path="remoting-config.xml"/>
    <!-- PROXY SERVICE -->
    <service-include file-path="proxy-config.xml"/>
    <!-- MESSAGE SERVICE -->
    <service-include file-path="messaging-config.xml"/>
    </services>

    posted on 2011-06-29 15:40 Eric_jiang 閱讀(322) 評論(0)  編輯  收藏 所屬分類: Flex
    主站蜘蛛池模板: 亚洲短视频在线观看| 亚洲色欲啪啪久久WWW综合网| 含羞草国产亚洲精品岁国产精品 | 亚洲人6666成人观看| 嫩草影院在线播放www免费观看| 亚洲人成人一区二区三区| 爱情岛论坛免费视频| 亚洲国产综合人成综合网站| 乱淫片免费影院观看| 亚洲一区二区三区香蕉| 国产成人精品免费久久久久| 亚洲午夜电影一区二区三区| 免费无码肉片在线观看| 亚洲av永久无码| 亚洲精品和日本精品| 精品四虎免费观看国产高清午夜| 亚洲国产老鸭窝一区二区三区| 99久久免费中文字幕精品| 亚洲国产精品白丝在线观看| 成人午夜视频免费| 日韩久久无码免费毛片软件| 国产成人麻豆亚洲综合无码精品| 久久国产精品免费专区| 97久久国产亚洲精品超碰热| 伊在人亚洲香蕉精品区麻豆| 中国内地毛片免费高清| 亚洲午夜国产精品无卡| 亚洲国产成人久久精品99| 免费看少妇高潮成人片| 精品亚洲AV无码一区二区三区 | 女人18毛片a级毛片免费视频| 亚洲AV无码国产剧情| 亚洲午夜久久久久妓女影院| 18禁美女黄网站色大片免费观看 | 亚洲中文字幕久久无码| 亚洲精品一级无码中文字幕| 99国产精品免费视频观看| 亚洲av无码一区二区三区人妖| 亚洲精品无码久久久久sm| 免费看国产成年无码AV片| 国产免费AV片在线观看播放|