OracleJavaScript API Reference for Oracle ADF Faces

 

SUMMARY: FIELD | CONSTR | METHOD    DETAIL: FIELD | CONSTR | METHOD

oracle.adfinternal.view.js.comm
Class AdfDataTransferService

Warning:

org.ecmascript.object.Object
   |
   +--oracle.adf.view.js.base.AdfObject
         |
         +--oracle.adfinternal.view.js.comm.AdfDataTransferService

public class AdfDataTransferService
extends AdfObject


Deprecated: The AdfDataTransferService is intended for use by the ADF Faces framework only, and should be removed from our public API. Please let the ADF Faces team know if you are currently relying on this API.

Field Summary

private static Object
_ADF_STREAMING_IFRAME_ID
private static Object
_MULTIPART_FRAME
private static Object
_MULTIPART_TYPE
private static Object
_POLLING_TYPE
private Object
_reqCount
private Object
_requestQueue
private Object
_state
public static Object
STATE_BUSY
public static Object
STATE_READY
State constants.
private Object
_stateChangeListeners
private static Object
_STREAMING_TYPE
private Object
_streamingCount
public static Object
TRANSFER_COMPLETE
private Object
_window
private static Object
_WINDOW_PARAM
private static Object
_XMLHTTP_TYPE


Fields inherited from oracle.adf.view.js.base.AdfObject

constructor, superclass


Fields inherited from org.ecmascript.object.Object

prototype


Constructor Summary

public
AdfDataTransferService(Object domWindow)


Method Summary

private Object
_addRequestToQueue(Object type, Object context, Object actionURL, Object headerParams, Object content, Object listeners, Object minBusyState)
This function adds a new request to the request queue of the DataTransferService.
public Object
addStateChangeListener(Function listener, Object instance)
Adds a listener to the data transfer service that is interested in its state change.
private static Object
_alertError(Object statusCode)
private Object
_appendParamNode(Object domDocument, Object form, Object name, Object value)
private Object
_broadcastRequestStatusChanged(Object listeners, Object event)
private Object
_broadcastStateChangeEvent(Object state)
broadcast the state change of the data transfer service to its listeners
private Object
_clearParamNodes()
private static Object
_DataTransferRequest(Object type, Object context, Object actionURL, Object headerParams, Object content, Object listeners)
public Object
dispose()
private Object
_doStreamingTransfer(Object requestItem)
Initiate a data streaming request as a GET on an IFRAME
private Object
_doTransfer()
private Object
_doTransferThroughIframe(Object requestItem)
Perform a PPR Post through a document in an iframe
private Object
_doXmlHttpTransfer(Object requestItem, Object callback)
Sends a request to the server over by using XHR
private Object
_getDomDocument()
public Object
getDTSState()
Return the current DTS state.
public static Object
getInstance()
Deprecated: The AdfDataTransferService is intended for use by the ADF Faces framework only, and should be removed from our public API. Please let the ADF Faces team know if you are currently relying on this API.
private Object
_handleIFrameLoad()
private Object
_handleRequestCallback(Object xmlHttp)
protected Object
Init(Object domWindow)
Initializes the instance.
protected static Object
InitClass()
public Object
notifyStreamingRequestComplete()
private Object
_onIFrameLoadComplete(Object iframeDoc, Object context, Object requestListeners)
public Object
pageUnloading()
private Object
_processedQueuedStreamingMessages()
public Object
processStreamingResponse(Object script)
Called by the script from within the streaming IFRAME
public Object
removeStateChangeListener(Function listener, Object instance)
Removes a listener from the data transfer service that is interested in its state change.
private static Object
_requestCallback(Object xmlRequest)
private Object
_requestDone()
public Object
sendMultiPartRequest(Object context, Object actionURL, Object htmlForm, Object params, Object listeners)
Performs Asynchronous HTTP Request with the Server for multipart data
public Object
sendPollingRequest(Object actionURL, Object listeners)
This function is only used for long-polling requests and interval polling requests.
public Object
sendRequest(Object context, Object actionURL, Object headerParams, Object content, Object listeners)
Performs Asynchronous XML HTTP Request with the Server
public Object
sendStreamingRequest(Object actionURL, Object params)
Sends a streaming request to the server over an IFRAME
private Object
_setResponseIdentifierFromResponseHeader(Object request)
Extract response identifier from response header and set it on the page object.
public Boolean
streamingResponsesOutstanding()


Methods inherited from oracle.adf.view.js.base.AdfObject

adopt, clone, createCallback, createInitializedObject, createSubclass, ensureClassInitialization, equals, getClass, GetLazyArrayProperty, GetLazyMapProperty, getTypeName, toDebugString, toString


Field Detail


_ADF_STREAMING_IFRAME_ID

private static Object _ADF_STREAMING_IFRAME_ID

_MULTIPART_FRAME

private static Object _MULTIPART_FRAME

_MULTIPART_TYPE

private static Object _MULTIPART_TYPE

_POLLING_TYPE

private static Object _POLLING_TYPE

_reqCount

private Object _reqCount

_requestQueue

private Object _requestQueue

_state

private Object _state

STATE_BUSY

public static Object STATE_BUSY

STATE_READY

public static Object STATE_READY

State constants.

_stateChangeListeners

private Object _stateChangeListeners

_STREAMING_TYPE

private static Object _STREAMING_TYPE

_streamingCount

private Object _streamingCount

TRANSFER_COMPLETE

public static Object TRANSFER_COMPLETE

_window

private Object _window

_WINDOW_PARAM

private static Object _WINDOW_PARAM

_XMLHTTP_TYPE

private static Object _XMLHTTP_TYPE

Constructor Detail


AdfDataTransferService

public AdfDataTransferService(Object domWindow)

Parameters:
domWindow    

Method Detail


_addRequestToQueue

private Object _addRequestToQueue(Object type,
                                  Object context,
                                  Object actionURL,
                                  Object headerParams,
                                  Object content,
                                  Object listeners,
                                  Object minBusyState)

This function adds a new request to the request queue of the DataTransferService. Once the request has been pushed to the queue it also triggers the _doTransfer() do start the real request processing.

Parameters:
type  -  the type of the request
context  -  any object that is sent back to the callback when the request is complete. This object can be null.
actionURL  -  the url to send the request to
headerParams  -  Option HTTP header parameters to attach to the request
content  -  the content of the Asynchronous XML HTTP Post
listeners  -  Objects that implements DataTransferRequestListener interface
minBusyState  -  the minimum value of the busy state required for request to be sent to the server. Most requests will use STATE_READY (0), but streaming will be allowed to proceed with TRANSFER_COMPLETE(1) (see bug #7257216)
Return:
Object

addStateChangeListener

public Object addStateChangeListener(Function listener,
                                     Object instance)

Adds a listener to the data transfer service that is interested in its state change. The listners are notified in the order that they are added. A listener can cancel notification to other listeners in the chain by returning false.

Parameters:
listener  -  listener function to remove
instance  -  to pass as this when calling function
Return:
Object

_alertError

private static Object _alertError(Object statusCode)

Parameters:
statusCode    
Return:
Object

_appendParamNode

private Object _appendParamNode(Object domDocument,
                                Object form,
                                Object name,
                                Object value)

Parameters:
domDocument    
form    
name    
value    
Return:
Object

_broadcastRequestStatusChanged

private Object _broadcastRequestStatusChanged(Object listeners,
                                              Object event)

Parameters:
listeners    
event    
Return:
Object

_broadcastStateChangeEvent

private Object _broadcastStateChangeEvent(Object state)

broadcast the state change of the data transfer service to its listeners

Parameters:
state    
Return:
Object

_clearParamNodes

private Object _clearParamNodes()

Return:
Object

_DataTransferRequest

private static Object _DataTransferRequest(Object type,
                                           Object context,
                                           Object actionURL,
                                           Object headerParams,
                                           Object content,
                                           Object listeners)

Parameters:
type    
context    
actionURL    
headerParams    
content    
listeners    
Return:
Object

dispose

public Object dispose()

Return:
Object

_doStreamingTransfer

private Object _doStreamingTransfer(Object requestItem)

Initiate a data streaming request as a GET on an IFRAME

Parameters:
requestItem    
Return:
Object

_doTransfer

private Object _doTransfer()

Return:
Object

_doTransferThroughIframe

private Object _doTransferThroughIframe(Object requestItem)

Perform a PPR Post through a document in an iframe

Parameters:
requestItem    
Return:
Object

_doXmlHttpTransfer

private Object _doXmlHttpTransfer(Object requestItem,
                                  Object callback)

Sends a request to the server over by using XHR

Parameters:
requestItem  -  the current request item object from the underlying queue
callback  -  custom callback to be executed once the request is done
Return:
Object

_getDomDocument

private Object _getDomDocument()

Return:
Object

getDTSState

public Object getDTSState()

Return the current DTS state. return (int) _state

Return:
Object

getInstance

public static Object getInstance()

Deprecated: The AdfDataTransferService is intended for use by the ADF Faces framework only, and should be removed from our public API. Please let the ADF Faces team know if you are currently relying on this API.
Return:
Object

_handleIFrameLoad

private Object _handleIFrameLoad()

Return:
Object

_handleRequestCallback

private Object _handleRequestCallback(Object xmlHttp)

Parameters:
xmlHttp    
Return:
Object

Init

protected Object Init(Object domWindow)

Initializes the instance. Subclasses of AdfObject must call their superclass' Init

Parameters:
domWindow    
Return:
Object
Overrides:
AdfObject.Init()

InitClass

protected static Object InitClass()

Return:
Object

notifyStreamingRequestComplete

public Object notifyStreamingRequestComplete()

Return:
Object

_onIFrameLoadComplete

private Object _onIFrameLoadComplete(Object iframeDoc,
                                     Object context,
                                     Object requestListeners)

Parameters:
iframeDoc    
context    
requestListeners    
Return:
Object

pageUnloading

public Object pageUnloading()

Return:
Object

_processedQueuedStreamingMessages

private Object _processedQueuedStreamingMessages()

Return:
Object

processStreamingResponse

public Object processStreamingResponse(Object script)

Called by the script from within the streaming IFRAME

Parameters:
script  -  script to be executed in the context of the streaming IFRAME
Return:
Object

removeStateChangeListener

public Object removeStateChangeListener(Function listener,
                                        Object instance)

Removes a listener from the data transfer service that is interested in its state change.

Parameters:
listener  -  listener function to remove
instance  -  to pass as this when calling function
Return:
Object

_requestCallback

private static Object _requestCallback(Object xmlRequest)

Parameters:
xmlRequest    
Return:
Object

_requestDone

private Object _requestDone()

Return:
Object

sendMultiPartRequest

public Object sendMultiPartRequest(Object context,
                                   Object actionURL,
                                   Object htmlForm,
                                   Object params,
                                   Object listeners)

Performs Asynchronous HTTP Request with the Server for multipart data

Parameters:
context  -  any object that is sent back to the callback when the request is complete. This object can be null.
actionURL  -  this is the appropriate action url
htmlForm  -  the form containing multi-part data. The action attribute of the form is used for send the request to the server
params  -  additional parameters that need to be sent to the server
listeners  -  Objects that implements DataTransferRequestListener interface
Return:
Object

sendPollingRequest

public Object sendPollingRequest(Object actionURL,
                                 Object listeners)

This function is only used for long-polling requests and interval polling requests. This method triggers a HTTP GET request to the server.

Parameters:
actionURL  -  the url to send the request to
listeners  -  Objects that implements DataTransferRequestListener interface
Return:
Object

sendRequest

public Object sendRequest(Object context,
                          Object actionURL,
                          Object headerParams,
                          Object content,
                          Object listeners)

Performs Asynchronous XML HTTP Request with the Server

Parameters:
context  -  any object that is sent back to the callback when the request is complete. This object can be null.
actionURL  -  the url to send the request to
headerParams  -  Option HTTP header parameters to attach to the request
content  -  the content of the Asynchronous XML HTTP Post
listeners  -  Objects that implements DataTransferRequestListener interface
Return:
Object

sendStreamingRequest

public Object sendStreamingRequest(Object actionURL,
                                   Object params)

Sends a streaming request to the server over an IFRAME

Parameters:
actionURL  -  the url to send the request to
params  -  additional request parameters
Return:
Object

_setResponseIdentifierFromResponseHeader

private Object _setResponseIdentifierFromResponseHeader(Object request)

Extract response identifier from response header and set it on the page object. Normally, response identifier would be sent from server via Java script. This function is to serve the case where the request never reaches ADF lifecycle, thus response identifier can only be available on response header if it exists.

Parameters:
request  -  request object to retrieve response header from
Return:
Object

streamingResponsesOutstanding

public Boolean streamingResponsesOutstanding()

Return:
Boolean - Returns true if there are still outstanding streaming requests

SUMMARY: FIELD | CONSTR | METHOD    DETAIL: FIELD | CONSTR | METHOD

 

Generated on 2011.04.27 02:28 UTC
Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.