随笔-193  评论-715  文章-1  trackbacks-0

Flex and AIR applications use Flex components to communicate with the BlazeDS server, including the RemoteObject, HTTPService, WebService, Producer, and Consumer components. The HTTPService, WebService, Producer, and Consumer components are part of the Flex Software Development Kit (SDK).

What's Producer?

The BlazeDS core features include the RPC services and the Messaging Service.
You can access data through client-side RPC components that include HTTP GET or POST (HTTP services), SOAP (web services), or Java objects (remote object services).
BlazeDS lets you use RemoteObject components to access remote Java objects without configuring them as SOAP-compliant web services.

Client applications that send messages are called message producers. You define a producer in a Flex application by using the Producer component. Client applications that receive messages are called message consumers. You define a consumer in a Flex application by using the Consumer component. A Consumer component subscribes to a server-side destination and receives messages that a Producer component sends to that destination. For more information on messaging, see Using the Messaging Service.


BlazeDS uses a message-based framework to send data back and forth between the client and server. BlazeDS uses two primary exchange patterns between server and client. In the first pattern, the request-response pattern, the second pattern is the publish-subscribe pattern where the server routes published messages to the set of clients that have subscribed to receive them.

 

To send messages across the network, the client uses channels. A channel encapsulates message formats, network protocols, and network behaviors to decouple them from services, destinations, and application code. A channel formats and translates messages into a network-specific form and delivers them to an endpoint on the server. 

 


Channels communicate with Java-based endpoints on the server. An endpoint unmarshals messages in a protocol-specific manner and then passes the messages in generic Java form to the message broker. The message broker determines where to send messages, and routes them to the appropriate service destination.
BlazeDS includes several types of channels, including standard and secure Action Message Format (AMF) channels and HTTP (AMFX) channels. AMF and HTTP channels support non-polling request-response patterns and client polling patterns to simulate real-time messaging. The streaming AMF and HTTP channels provide true data streaming for real-time messaging. 

 

 Configure an existing J2EE web application to support BlazeDS by performing the following steps: 
 1, Add the BlazeDS JAR files and dependent JAR files to the WEB-INF/lib directory. 
2, Edit the BlazeDS configuration files in the WEB-INF/flex directory. 
3, Define MessageBrokerServlet and a session listener in WEB-INF/web.xml.

posted on 2010-03-31 12:19 Robin's Programming World 阅读(1661) 评论(1)  编辑  收藏 所属分类: JavaFlex & Flash

评论:
# re: BlazeDS Study Notes -- Overview & Concepts 2010-03-31 14:25 | 俏物俏语官方网站
是打开发奖时爱到底  回复  更多评论
  

只有注册用户登录后才能发表评论。


网站导航: