Package org.cef.handler
Class CefLoadHandlerAdapter
- java.lang.Object
-
- org.cef.handler.CefLoadHandlerAdapter
-
- All Implemented Interfaces:
CefLoadHandler
public abstract class CefLoadHandlerAdapter extends java.lang.Object implements CefLoadHandler
An abstract adapter class for receiving load events. The methods in this class are empty. This class exists as convenience for creating handler objects.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.cef.handler.CefLoadHandler
CefLoadHandler.ErrorCode
-
-
Constructor Summary
Constructors Constructor Description CefLoadHandlerAdapter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
onLoadEnd(CefBrowser browser, CefFrame frame, int httpStatusCode)
Called when the browser is done loading a frame.void
onLoadError(CefBrowser browser, CefFrame frame, CefLoadHandler.ErrorCode errorCode, java.lang.String errorText, java.lang.String failedUrl)
Called when the resource load for a navigation fails or is canceled.void
onLoadingStateChange(CefBrowser browser, boolean isLoading, boolean canGoBack, boolean canGoForward)
Called when the loading state has changed.void
onLoadStart(CefBrowser browser, CefFrame frame, CefRequest.TransitionType transitionType)
Called when the browser begins loading a frame.
-
-
-
Method Detail
-
onLoadingStateChange
public void onLoadingStateChange(CefBrowser browser, boolean isLoading, boolean canGoBack, boolean canGoForward)
Description copied from interface:CefLoadHandler
Called when the loading state has changed. This callback will be executed twice -- once when loading is initiated either programmatically or by user action, and once when loading is terminated due to completion, cancellation of failure.- Specified by:
onLoadingStateChange
in interfaceCefLoadHandler
- Parameters:
browser
- The corresponding browser.isLoading
- true if it is loading.canGoBack
- true if you can navigate back.canGoForward
- true if you can navigate forward.
-
onLoadStart
public void onLoadStart(CefBrowser browser, CefFrame frame, CefRequest.TransitionType transitionType)
Description copied from interface:CefLoadHandler
Called when the browser begins loading a frame. The frameIdentifer value will never be empty. Multiple frames may be loading at the same time. Sub-frames may start or continue loading after the main frame load has ended. This method may not be called for a particular frame if the load request for that frame fails. For notification of overall browser load status use onLoadingStateChange instead.- Specified by:
onLoadStart
in interfaceCefLoadHandler
- Parameters:
browser
- The corresponding browser.frame
- The frame generating the event. Instance only valid within the scope of this method.transitionType
- The transition type.
-
onLoadEnd
public void onLoadEnd(CefBrowser browser, CefFrame frame, int httpStatusCode)
Description copied from interface:CefLoadHandler
Called when the browser is done loading a frame. The frameIdentifer value will never be empty. Multiple frames may be loading at the same time. Sub-frames may start or continue loading after the main frame load has ended. This method will always be called for all frames irrespective of whether the request completes successfully.- Specified by:
onLoadEnd
in interfaceCefLoadHandler
- Parameters:
browser
- The corresponding browser.frame
- The frame generating the event. Instance only valid within the scope of this method.httpStatusCode
- The status code of the load.
-
onLoadError
public void onLoadError(CefBrowser browser, CefFrame frame, CefLoadHandler.ErrorCode errorCode, java.lang.String errorText, java.lang.String failedUrl)
Description copied from interface:CefLoadHandler
Called when the resource load for a navigation fails or is canceled.- Specified by:
onLoadError
in interfaceCefLoadHandler
- Parameters:
browser
- The corresponding browser.frame
- The frame generating the event. Instance only valid within the scope of this method.errorCode
- The error code number.errorText
- The error text.failedUrl
- The URL that failed to load.
-
-