BlazeDS client architecture
BlazeDS clients use a message-based framework provided by BlazeDS to
interact with the server. On the client side of the message-based
framework are channels that encapsulate the connection behavior between
the Flex client and the BlazeDS server. Channels are grouped together
into channel sets that are responsible for channel hunting and channel
failover. For information about client class APIs, see the ActionScript 3.0 Language Reference
.
The following illustration shows the BlazeDS client architecture:
Flex components
The following Flex components interact with a BlazeDS server:
- RemoteObject
- HTTPService
- WebService
- Producer
- Consumer
All of these components are included in the Flex SDK in the rpc.swc component library.
Although
the RemoteObject, Producer, and Consumer components are included with
the Flex SDK, they require a server that can interpret the messages that
they send. The BlazeDS and LiveCycle Data Services ES servers are two
examples of such servers. A Flex application can also make direct HTTP
service or web service calls to remote servers without BlazeDS in the
middle tier. However, going through the BlazeDS Proxy Service is
beneficial for several reasons; for more information, see Using HTTP and web services
.
Client-side
components communicate with services on the BlazeDS server by sending
and receiving messages of the correct type. For more information about
messages, see Messages
.
Channels and channel sets
A Flex component uses a channel to communicate with a BlazeDS server.
A channel set contains channels; its primary function is to provide
connectivity between the Flex client and the BlazeDS server. A channel
set contains channels ordered by preference. The Flex component tries to
connect to the first channel in the channel set and in the case where a
connection cannot be established falls back to the next channel in the
list. The Flex component continues to go through the list of channels in
the order in which they are specified until a connection can be
established over one of the channels or the list of channels is
exhausted.
Channels encapsulate the connection behavior between
the Flex components and the BlazeDS server. Conceptually, channels are a
level below the Flex components and they handle the communication
between the Flex client and the BlazeDS server. They communicate with
their corresponding endpoints on the BlazeDS server; for more
information about endpoints, see Endpoints
.
Flex
clients can use different channel types such as the AMFChannel and
HTTPChannel. Channel selection depends on a number of factors, including
the type of application you are building. If non-binary data transfer
is required, you would use the HTTPChannel, which uses a non-binary
format called AMFX (AMF in XML). For more information about channels,
see Channels and endpoints
.
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. For example, 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.
BlazeDS uses two
patterns for sending and receiving messages: the request/reply pattern
and the publish/subscribe pattern. RemoteObject, HTTPService, and
WebService components use the request/reply message pattern, in which
the Flex component makes a request and receives a reply to that request.
Producer and Consumer components use the publish/subscribe message
pattern. In this pattern, the Producer publishes a message to a
destination defined on the BlazeDS server. All Consumers subscribed to
that destination receive the message.
分享到:
相关推荐
BlazeDS是Adobe公司开发的一款开源的服务器端技术,它主要负责实现Java应用程序与客户端的Flex应用程序之间的数据交互。BlazeDS的出现极大地推动了富互联网应用(RIA)的发展,使得开发者可以利用Flex的图形界面优势...
BlazeDS通信到Java的PureMVC——Flex框架,BlazeDS的服务器配置比较麻烦,这里使用的是直接下载blazeds_turnkey_3-0-0-544.zip中的tomcat BlazeDS模板路径为: blazeds_turnkey_3-0-0-544.zip解压后路径\tomcat\...
**Spring BlazeDS Integration** 是一个强大的技术组合,它允许开发者使用Spring框架在后端服务器上进行业务逻辑处理,同时利用Adobe Flex在前端构建富互联网应用程序(RIA)。BlazeDS是Adobe提供的一种开源服务器端...
### Blazeds入门教程知识点详解 #### 一、引言 Blazeds是一个由Adobe官方推出的开源数据服务中间件,其前身是LiveCycle Data Services(LCDS),也称为Flex Data Services(FDS)。Blazeds简化了Flex应用程序与...
这个版本包含了两个主要的战争(war)文件:blazeds.war 和 blazeds-spring.war,以及它们对应的解压后的文件夹。这些资源都是为了帮助开发者在Java EE环境中集成Flex和ActionScript客户端应用。 1. **BlazeDS**: ...
Blazeds是一款强大的Flex和Java之间的消息传递中间件,它由Adobe公司开发,主要用于构建富互联网应用程序(RIA)。本文将详细介绍Blazeds的核心概念、功能以及如何使用它。 Blazeds,全称BlazeDS,是Adobe Flex和...
Blazeds是Adobe官方推出的一款开源项目,全称为Flex Business Application Platform,它是Flex与Java应用程序之间进行数据交互的重要桥梁。Flex是一种基于ActionScript的富互联网应用程序(RIA)开发框架,而Java则...
Blazeds是一个强大的Java服务器端技术,主要用于实现Flex(一种基于Adobe Flash的用户界面开发工具)与后端Java应用程序之间的数据交互。它提供了一个全面的解决方案,使开发人员能够构建富互联网应用程序(RIA),...
BlazeDS与Flex整合是构建富互联网应用程序(RIA)的一种常见技术组合,它允许开发者创建交互性强、用户体验丰富的Web应用。BlazeDS是Adobe提供的一个开源服务器端数据推送技术,而Flex是用于创建RIA的客户端开发框架...
BlazeDS是Adobe公司推出的一款开源的服务器端技术,它主要负责在客户端(通常是Web浏览器)与服务器之间提供实时的数据通信。此技术基于AMF(Action Message Format)协议,允许高效地传输数据,同时支持Flex和...
Blazeds Turnkey 4.0 是一个强大的技术框架,专为实现Flex应用程序与Java Enterprise Edition (JEE) 服务器之间的高效通信而设计。这个项目提供了全面的功能,使得开发人员可以构建富互联网应用(RIA)时,充分利用...
### BlazeDS War包及Flex结合BlazeDS的入门程序 #### 一、BlazeDS简介与功能 BlazeDS是一款由Adobe开发的开源服务器端软件,主要用来支持远程调用和消息传递服务。它能够实现Java应用服务器和Flex客户端之间的通信...
Blazeds,全称为BlazeDS,是一款由Adobe公司开发并开源的服务器端技术,它主要为Flash客户端提供数据服务,使Flash与后端服务器能够进行高效的数据交互。Blazeds是基于Java平台的,利用Action Message Format (AMF)...
Blazeds,全称为BlazeDS,是Adobe公司推出的一款开源服务器端技术,主要用于实现Flex客户端与Java后端之间的数据交互。它是一个轻量级的中间件,支持AMF(Action Message Format)协议,能够高效地传输数据,提高富...
整合开发Flex、MyEclipse和Blazeds的过程涉及到了多种技术的融合,下面将详细介绍这一过程所包含的关键知识点。 首先,了解JDK环境的配置。JDK是Java开发的基础,其环境配置包括安装JDK、设置JAVA_HOME环境变量、...
【Flex Spring JAVA BLAZEDS整合】是一种技术实践,它将Adobe Flex的前端展示层与Spring框架的后端业务逻辑层紧密结合,利用BlazeDS作为中间件进行数据传输。Flex作为一个强大的RIA(富互联网应用程序)开发平台,常...
BlazeDS是一款由Adobe开发的开源服务器端技术,主要用于提供实时数据推送服务,它与Flex客户端(基于ActionScript的富互联网应用)配合使用,能够实现高效的数据交换和远程调用。在本例中,我们将讨论如何利用...
### Flex Blazeds入门教程详解 #### 一、引言 Flex Blazeds入门教程,由刘铭朝撰写于2008年3月21日,旨在解决开发者在搭建Flex与LCDS(Flex Data Services)工程时遇到的常见问题。这篇教程不仅详细介绍了创建项目...
Blazeds是一个强大的Java服务器端技术,主要用于构建富互联网应用程序(Rich Internet Applications,简称RIA)。它是由Adobe公司开发的,旨在连接Flex客户端与后端数据服务,实现数据的实时双向通信。Blazeds的全称...
BlazeDS是一个开源的服务器端技术,主要用于在Adobe Flex客户端和Java后端之间提供数据集成和实时通信。它是一个轻量级的中间件,能够帮助开发者构建富互联网应用程序(RIA)。在本实例中,我们将探讨如何结合...