Skip navigation links

Oracle© Fusion Middleware Java API Reference for Oracle ADF Faces
11g Release 1 (11.1.1.7.0)
E10684-08


oracle.adf.view.rich.model
Interface RemoteRegionListener

All Known Implementing Classes:
RemoteRegionModel

public interface RemoteRegionListener

The remote region listener listens for remote calls from the region component. These listeners are registered by putting a class name in the META-INF/services/oracle.adf.view.rich.model.RemoteRegionListener file. Each class will be instantiated the first time it's invoked and that same instance will then be used for each call to the Remote Region. <p/> Generally speaking, RemoteRegionListeners will append tasks to the RemoteApplicationRequest during the beforeRequest(RemoteApplicationRequest,Map) call and then any return information from those tasks will be returned to the afterRequest(RemoteApplicationResponse,Map). <p/> There is a map provided to each call to the beforeRequest and afterRequest. These maps have a "scope" of the current region component, so listeners are encouraged to use this as storage for communicating between beforeRequest and endRequest methods.

See Also:
RemoteApplicationRequest, RemoteApplicationRequest

Method Summary
 void afterRequest(RemoteApplicationResponse resp, java.util.Map<java.lang.String,java.lang.Object> stateMap)
          Executed after a response has been recieved from the remote server.
 void beforeRequest(RemoteApplicationRequest req, java.util.Map<java.lang.String,java.lang.Object> stateMap)
          Executed before the request is sent to the remote server.

 

Method Detail

beforeRequest

void beforeRequest(RemoteApplicationRequest req,
                   java.util.Map<java.lang.String,java.lang.Object> stateMap)
Executed before the request is sent to the remote server. This method allows the listener to add or modify the RemoteApplicationRequest before it is setup and dispatched to the remote server.

This method will be run AFTER the RemoteRegionModel#processRemoteRegionBegin(RemoteApplicationRequest,RegionSite) but before the remote request is constructed.

Parameters:
req - the RemoteApplicationRequest object
stateMap - a map which will persist until the afterRequest for this particular request. since these listeners should be stateless, this map allows temporary storage between the beforeRequest and afterRequest methods.

afterRequest

void afterRequest(RemoteApplicationResponse resp,
                  java.util.Map<java.lang.String,java.lang.Object> stateMap)
Executed after a response has been recieved from the remote server. This method allows the listener to handle any logic it needs to off of the response (such as getting a response back from an added task).

This method will be run AFTER the RemoteRegionModel#processRemoteRegionBegin(RemoteApplicationRequest,RegionSite) but before the remote request is constructed.

Parameters:
req - the RemoteApplicationRequest object
stateMap - a map which will persist until the afterRequest for this particular request. since these listeners should be stateless, this map allows temporary storage between the beforeRequest and afterRequest methods.

Skip navigation links

Oracle© Fusion Middleware Java API Reference for Oracle ADF Faces
11g Release 1 (11.1.1.7.0)
E10684-08


Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.