Package com.vaadin.swingkit.server
Class SwingJavascriptResponse
java.lang.Object
com.vaadin.swingkit.server.SwingJavascriptResponse
- All Implemented Interfaces:
EmbeddedBrowserJSCaller
- Direct Known Subclasses:
JCefSwingJavascriptResponse,JxBrowserSwingJavascriptResponse
Class to respond to a previous Swing app call to Vaadin app. It generates a JS call
after
EmbeddedBrowserJSCaller implementation. It checks that the
function and the context is available to be executed.- Author:
- Vaadin Ltd
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected com.vaadin.flow.component.page.PendingJavaScriptResultgenerateResponseJS(String encodedResponse) Generates a valid Javascript response as a String that will be sent through the embedded browser to the Swing app.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.vaadin.swingkit.server.EmbeddedBrowserJSCaller
getBrowserName, getCheckDefinedJS, getQueryJS
-
Constructor Details
-
SwingJavascriptResponse
public SwingJavascriptResponse()
-
-
Method Details
-
generateResponseJS
Generates a valid Javascript response as a String that will be sent through the embedded browser to the Swing app.- Parameters:
encodedResponse- The encoded response that has to be sent to the Swing app- Returns:
- A string with the javascript executable call containing the encoded response.
- Throws:
EmbeddedBrowserException- Thrown if no SwingKit embedded browser is detected.
-
checkContext
protected com.vaadin.flow.component.page.PendingJavaScriptResult checkContext()
-