Package org.cef.handler
Class CefMessageRouterHandlerAdapter
- java.lang.Object
-
- org.cef.callback.CefNativeAdapter
-
- org.cef.handler.CefMessageRouterHandlerAdapter
-
- All Implemented Interfaces:
CefNative
,CefMessageRouterHandler
public abstract class CefMessageRouterHandlerAdapter extends CefNativeAdapter implements CefMessageRouterHandler
An abstract adapter class for receiving message router events. The methods in this class are empty. This class exists as convenience for creating handler objects.
-
-
Constructor Summary
Constructors Constructor Description CefMessageRouterHandlerAdapter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
onQuery(CefBrowser browser, CefFrame frame, long queryId, java.lang.String request, boolean persistent, CefQueryCallback callback)
Called when the browser receives a JavaScript query.void
onQueryCanceled(CefBrowser browser, CefFrame frame, long queryId)
Called when a pending JavaScript query is canceled.-
Methods inherited from class org.cef.callback.CefNativeAdapter
getNativeRef, setNativeRef
-
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.cef.callback.CefNative
getNativeRef, setNativeRef
-
-
-
-
Method Detail
-
onQuery
public boolean onQuery(CefBrowser browser, CefFrame frame, long queryId, java.lang.String request, boolean persistent, CefQueryCallback callback)
Description copied from interface:CefMessageRouterHandler
Called when the browser receives a JavaScript query.- Specified by:
onQuery
in interfaceCefMessageRouterHandler
- Parameters:
browser
- The corresponding browser.frame
- The frame generating the event. Instance only valid within the scope of this method.queryId
- The unique ID for the query.persistent
- True if the query is persistent.callback
- Object used to continue or cancel the query asynchronously.- Returns:
- True to handle the query or false to propagate the query to other registered handlers, if any. If no handlers return true from this method then the query will be automatically canceled with an error code of -1 delivered to the JavaScript onFailure callback.
-
onQueryCanceled
public void onQueryCanceled(CefBrowser browser, CefFrame frame, long queryId)
Description copied from interface:CefMessageRouterHandler
Called when a pending JavaScript query is canceled.- Specified by:
onQueryCanceled
in interfaceCefMessageRouterHandler
- Parameters:
browser
- The corresponding browser.frame
- The frame generating the event. Instance only valid within the scope of this method.queryId
- The unique ID for the query.
-
-