<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 :: 首頁 :: 聯(lián)系 :: 聚合  :: 管理
      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 閱讀(328) 評論(0)  編輯  收藏 所屬分類: Flex
    主站蜘蛛池模板: 新最免费影视大全在线播放| 亚洲一区二区三区乱码在线欧洲| 午夜在线亚洲男人午在线| 五月婷婷综合免费| 亚洲成人福利网站| 日韩在线免费视频| 亚洲日本一线产区和二线产区对比| 国产在线观看免费观看不卡| 亚洲伊人久久大香线焦| 免费看h片的网站| 456亚洲人成在线播放网站| 日韩欧美一区二区三区免费观看| 中文字幕 亚洲 有码 在线| 男女交性永久免费视频播放| 亚洲va中文字幕| 亚洲精品一级无码鲁丝片| 日韩电影免费在线观看网站| 亚洲无线电影官网| 4hu四虎最新免费地址| 亚洲成av人片在www鸭子| 又爽又黄无遮挡高清免费视频| 无码免费又爽又高潮喷水的视频| 国产性爱在线观看亚洲黄色一级片| a在线视频免费观看| 亚洲成a人片在线观看播放| 日本高清免费中文字幕不卡| 香港特级三A毛片免费观看| 国产亚洲真人做受在线观看| 中文字幕在线免费观看| 亚洲第一第二第三第四第五第六| 亚洲国产一区明星换脸| 人妻无码一区二区三区免费| 精品国产成人亚洲午夜福利| 亚洲高清免费视频| 国产AⅤ无码专区亚洲AV| 99久久免费精品高清特色大片| xxx毛茸茸的亚洲| 久久青青草原亚洲av无码| 1000部拍拍拍18勿入免费视频软件| 日本亚洲欧美色视频在线播放| 亚洲欧洲无码AV电影在线观看|