Macromedia flex 2-migrating applications to flex 2 Manual De Usuario

Descargar
Página de 184
152
Data Services
Accessing request/response data with 
RemoteObject
A Java object that you call using the 
<mx:RemoteObject>
 tag has access to request, response, 
and servlet data. For Flex 1.5, from within a Java object, you can call the following methods:
In Flex 2, this API no longer exists. The flex.messaging.FlexContext class provides equivalent 
methods. Flex Data Services provides enhancements for working with session data in the 
following classes:
flex.messaging.FlexContext
flex.messaging.FlexSession
flex.messaging.FlexSessionListener 
flex.messaging.FlexSessionAttributeListener 
flex.messaging.FlexSessionBindingEvent
flex.messaging.FlexSessionBindingListener
These classes are included in the the public 
. For 
information, see Chapter 43, “Configuring Data Services,” in the Flex 2 Developer’s Guide.
Method
Description
flashgateway.Gateway.getHttpRequest()
Returns the HttpServletRequest object for the 
current request. Adobe recommends that you 
access session data and other request data 
through the 
getHttpRequest()
 method.
flashgateway.Gateway.getHttpResponse()
Returns the HttpServletResponse object for the 
current request.
flashgateway.Gateway.getServletConfig()
Returns the ServletConfig object for the calling 
servlet.