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
Direct Known Subclasses:
AdfOfflineDataTransferService, AdfXmlHttpDataTransferService

public class AdfDataTransferService
extends AdfObject
Abstract baseclass for DataTransfer abstraction. Subclasses must implement: sendRequest sendPollingRequest sendMultiPartRequest sendStreamingRequest streamingResponsesOutstanding processStreamingResponse notifyStreamingRequestComplete addStateChangeListener removeStateChangeListener suspend resume getDTSState


See also:
sendRequest(Object, Object, Object, Object, Object)
sendPollingRequest(Object, Object)
sendMultiPartRequest(Object, Object, Object, Object, Object, Object, Object)
sendStreamingRequest(Object, Object)
streamingResponsesOutstanding()
processStreamingResponse(Object)
notifyStreamingRequestComplete()
addStateChangeListener(Function, Object)
removeStateChangeListener(Function, Object)
suspend()
resume()
getDTSState()

Field Summary

public static Object
STATE_BUSY
public static Object
STATE_READY
State constants.
public static Object
TRANSFER_COMPLETE


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

constructor, superclass


Fields inherited from org.ecmascript.object.Object

prototype


Constructor Summary

public
AdfDataTransferService()
Abstract baseclass for DataTransfer abstraction.


Method Summary

public Object
addStateChangeListener(Function listener, Object instance)
Adds a listener to the data transfer service that is interested in its state change.
public Object
dispose()
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.
protected static Object
InitClass()
public Object
notifyStreamingRequestComplete()
Notifies Data Transfer Service that the streaming request is done
public Object
pageUnloading()
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.
public Object
resume()
Resumes the data transfer service, allowing normally processing to continue.
public AdfDataTransferRequest
sendMultiPartRequest(Object context, Object actionURL, Object headerParams, Object htmlForm, Object params, Object listeners, Object eventListeners)
Performs Asynchronous HTTP Request with the Server for multipart data
public AdfDataTransferRequest
sendPollingRequest(Object actionURL, Object listeners)
This function is only used for long-polling requests and interval polling requests.
public AdfDataTransferRequest
sendRequest(Object context, Object actionURL, Object headerParams, Object content, Object listeners)
Performs Asynchronous XML HTTP Request with the Server
public AdfDataTransferRequest
sendStreamingRequest(Object actionURL, Object params)
Sends a streaming request to the server over an IFRAME
public Boolean
streamingResponsesOutstanding()
public Object
suspend()
Suspends the data transfer service until a matching call to resume() is made.


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

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


Field Detail


STATE_BUSY

public static Object STATE_BUSY

STATE_READY

public static Object STATE_READY

State constants.

TRANSFER_COMPLETE

public static Object TRANSFER_COMPLETE

Constructor Detail


AdfDataTransferService

public AdfDataTransferService()

Abstract baseclass for DataTransfer abstraction. Subclasses must implement: sendRequest sendPollingRequest sendMultiPartRequest sendStreamingRequest streamingResponsesOutstanding processStreamingResponse notifyStreamingRequestComplete addStateChangeListener removeStateChangeListener suspend resume getDTSState

Method Detail


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

dispose

public Object dispose()

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

InitClass

protected static Object InitClass()

Return:
Object

notifyStreamingRequestComplete

public Object notifyStreamingRequestComplete()

Notifies Data Transfer Service that the streaming request is done

Return:
Object

pageUnloading

public Object pageUnloading()

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

resume

public Object resume()

Resumes the data transfer service, allowing normally processing to continue.

Return:
Object

sendMultiPartRequest

public AdfDataTransferRequest sendMultiPartRequest(Object context,
                                                   Object actionURL,
                                                   Object headerParams,
                                                   Object htmlForm,
                                                   Object params,
                                                   Object listeners,
                                                   Object eventListeners)

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
headerParams  -  Additional header parameters that need to be sent to the server
htmlForm  -  The form containing multi-part data or an object. If object then XMLHttpRequest is used for transfer and transfer is unordered.
params  -  Additional parameters that need to be sent to the server
listeners  -  Objects that implements DataTransferRequestListener interface
eventListeners  -  Objects that implements EventListener interface
Return:
AdfDataTransferRequest - request object of current data transfer request
See also:
AdfDataTransferRequest

sendPollingRequest

public AdfDataTransferRequest 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:
AdfDataTransferRequest - request object of current data transfer request
See also:
AdfDataTransferRequest

sendRequest

public AdfDataTransferRequest 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:
AdfDataTransferRequest - request object of current data transfer request
See also:
AdfDataTransferRequest

sendStreamingRequest

public AdfDataTransferRequest 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:
AdfDataTransferRequest - request object of current data transfer request
See also:
AdfDataTransferRequest

streamingResponsesOutstanding

public Boolean streamingResponsesOutstanding()

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

suspend

public Object suspend()

Suspends the data transfer service until a matching call to resume() is made. While suspended, the data transfer service does not: - Send any new requests to the server - Transition between ready states. - Deliver state change events.

Return:
Object

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

 

Generated on 2015.07.15 10:12 UTC
Copyright (c) 1998, 2015, Oracle and/or its affiliates. All rights reserved.