Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.directwebremoting.extend
Class EnginePrivate

    java.lang.Object
      org.directwebremoting.proxy.ScriptProxy
          org.directwebremoting.extend.EnginePrivate

    public class EnginePrivate

extends ScriptProxy

An abstraction of the DWREngine Javascript class for use by `BaseCallMarshaller`, `PollHandler` and a few others that need to call internal functions in engine.js

Author:
  Joe Walker [joe at getahead dot ltd dot uk]

Constructor Summary
`EnginePrivate()`

Method Summary
`static java.lang.String` | `getEngineInitScript()` Get a string which will initialize a dwr.engine object
`static java.lang.String` | `getExecuteFunctionName()` `DefaultRemoter` needs to know the name of the execute function
`static java.lang.String` | `getRemoteHandleBatchExceptionScript(java.lang.String batchId, java.lang.Exception ex)` Call the dwr.engine._remoteHandleServerException() in the browser
`static java.lang.String` | `getRemotePollCometDisabledScript(java.lang.String batchId)` Call the dwr.engine._remotePollCometDisabled() in the browser
`static java.lang.String` | `remoteBeginIFrameResponse(java.lang.String batchId, boolean useWindowParent)` A script to send at the beginning of an iframe response
`static java.lang.String` | `remoteEndIFrameResponse(java.lang.String batchId, boolean useWindowParent)` A script to send at the end of an iframe response
`static java.lang.String` | `remoteEval(java.lang.String script)` Prepare a script for execution in an iframe environment
`static void` | `remoteHandleCallback(ScriptConduit conduit, java.lang.String batchId, java.lang.String callId, java.lang.Object data)` Call the dwr.engine._remoteHandleResponse() in the browser
`static void` | `remoteHandleException(ScriptConduit conduit, java.lang.String batchId, java.lang.String callId, java.lang.Throwable ex)` Call the dwr.engine._remoteHandleException() in the browser
`static void` | `remoteHandleMarshallException(ScriptConduit conduit, java.lang.String batchId, java.lang.String callId, MarshallException ex)` Call the dwr.engine._remoteHandleException() in the browser
`static java.lang.String` | `xmlStringToJavascriptDom(java.lang.String xml)` Take an XML string, and convert it into some Javascript that when executed will return a DOM object that represents the same XML object

Methods inherited from class org.directwebremoting.proxy.ScriptProxy
`addFunctionCall, addFunctionCall, addFunctionCall, addFunctionCall, addFunctionCall, addFunctionCall, addScript, addScriptSession, addScriptSessions`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### EnginePrivate

    public EnginePrivate()

Method Detail

### remoteHandleCallback

    public static void remoteHandleCallback(ScriptConduit conduit,
                                            java.lang.String batchId,
                                            java.lang.String callId,
                                            java.lang.Object data)
                                     throws java.io.IOException,
                                            MarshallException

  Call the dwr.engine._remoteHandleResponse() in the browser

  Parameters:
    `conduit` - The browser pipe to write to
    `batchId` - The identifier of the batch that we are handling a response for
    `callId` - The identifier of the call that we are handling a response for
    `data` - The data to pass to the callback function
  Throws:
    `java.io.IOException` - If writing fails.
    `MarshallException` - If objects in the script can not be marshalled

### remoteHandleMarshallException

    public static void remoteHandleMarshallException(ScriptConduit conduit,
                                                     java.lang.String batchId,
                                                     java.lang.String callId,
                                                     MarshallException ex)
                                              throws java.io.IOException

  Call the dwr.engine._remoteHandleException() in the browser

  Parameters:
    `conduit` - The browser pipe to write to
    `batchId` - The identifier of the batch that we are handling a response for
    `callId` - The id of the call we are replying to
    `ex` - The exception to throw on the remote end
  Throws:
    `java.io.IOException` - If writing fails.

### remoteHandleException

    public static void remoteHandleException(ScriptConduit conduit,
                                             java.lang.String batchId,
                                             java.lang.String callId,
                                             java.lang.Throwable ex)
                                      throws java.io.IOException

  Call the dwr.engine._remoteHandleException() in the browser

  Parameters:
    `conduit` - The browser pipe to write to
    `batchId` - The identifier of the batch that we are handling a response for
    `callId` - The id of the call we are replying to
    `ex` - The exception to throw on the remote end
  Throws:
    `java.io.IOException` - If writing fails.

### getRemoteHandleBatchExceptionScript

    public static java.lang.String getRemoteHandleBatchExceptionScript(java.lang.String batchId,
                                                                       java.lang.Exception ex)

  Call the dwr.engine._remoteHandleServerException() in the browser

  Parameters:
    `batchId` - The identifier of the batch that we are handling a response for
    `ex` - The execption from which we make a reply
  Returns:
    The string that calls dwr.engine._remoteHandleServerException()

### getRemotePollCometDisabledScript

    public static java.lang.String getRemotePollCometDisabledScript(java.lang.String batchId)

  Call the dwr.engine._remotePollCometDisabled() in the browser

  Parameters:
    `batchId` - The identifier of the batch that we are handling a response for
  Returns:
    The string that calls dwr.engine._remoteHandleServerException()

### xmlStringToJavascriptDom

    public static java.lang.String xmlStringToJavascriptDom(java.lang.String xml)

  Take an XML string, and convert it into some Javascript that when executed will return a DOM object that represents the same XML object

  Parameters:
    `xml` - The XML string to convert
  Returns:
    The Javascript

### getEngineInitScript

    public static java.lang.String getEngineInitScript()

  Get a string which will initialize a dwr.engine object

  Returns:
    A dwr.engine init script

### getExecuteFunctionName

    public static java.lang.String getExecuteFunctionName()

  `DefaultRemoter` needs to know the name of the execute function

  Returns:
    The execute function name

### remoteBeginIFrameResponse

    public static java.lang.String remoteBeginIFrameResponse(java.lang.String batchId,
                                                             boolean useWindowParent)

  A script to send at the beginning of an iframe response

  Parameters:
    `batchId` - The id of the current batch
    `useWindowParent` - Will the exec happen from a child iframe which is the case for normal iframe based calls, or from the main window, which is the case for iframe streamed polling.
  Returns:
    A script to init the environment

### remoteEndIFrameResponse

    public static java.lang.String remoteEndIFrameResponse(java.lang.String batchId,
                                                           boolean useWindowParent)

  A script to send at the end of an iframe response

  Parameters:
    `batchId` - The id of the current batch
    `useWindowParent` - Will the exec happen from a child iframe which is the case for normal iframe based calls, or from the main window, which is the case for iframe streamed polling.
  Returns:
    A script to tidy up the environment

### remoteEval

    public static java.lang.String remoteEval(java.lang.String script)

  Prepare a script for execution in an iframe environment

  Parameters:
    `script` - The script to modify
  Returns:
    The modified script

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Copyright ¬ 2005
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD