<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
    主站蜘蛛池模板: 亚洲乱码中文字幕小综合| 亚洲午夜日韩高清一区| 亚洲最大成人网色| 免费在线观影网站| 亚洲日韩v无码中文字幕| sihu国产精品永久免费| 亚洲精品无码久久久久AV麻豆| 国产天堂亚洲精品| 免费大学生国产在线观看p| 爱情岛论坛亚洲品质自拍视频网站| 免费无码又爽又刺激毛片| 99热在线日韩精品免费| 国产亚洲精品影视在线产品 | 亚洲免费一级视频| 成年18网站免费视频网站 | 亚洲综合另类小说色区色噜噜| 国产成人亚洲精品91专区高清| 国产aa免费视频| 抽搐一进一出gif免费视频| 免费黄色网址入口| 日本中文字幕免费看| 亚洲精品你懂的在线观看| 99精品视频免费观看| 亚洲人成无码网站久久99热国产| 一级毛片免费观看不收费| 最新仑乱免费视频| 国产亚洲男人的天堂在线观看 | 久久精品国产亚洲综合色| 8x8×在线永久免费视频| jiz zz在亚洲| 久久亚洲高清综合| 天天影院成人免费观看| 亚洲aⅴ无码专区在线观看春色 | 久久综合亚洲色HEZYO国产| 日韩精品免费在线视频| 亚洲三级在线播放| 国产日产亚洲系列最新| 99久久久国产精品免费无卡顿 | 在线观着免费观看国产黄| 香蕉免费在线视频| 亚洲人AV永久一区二区三区久久|