net.rim.device.api.browser.field2
Class BrowserFieldErrorHandler

java.lang.Object
  extended by net.rim.device.api.browser.field2.BrowserFieldErrorHandler

public class BrowserFieldErrorHandler
extends Object

Since:
BlackBerry API 5.0.0

Constructor Summary
protected BrowserFieldErrorHandler(BrowserField browserField)
          Creates a new instance of the error handler
 
Method Summary
 void displayContentError(String url, String errorMessage)
          This method displays error information when a BrowserField's displayContent() method fails.
 void displayContentError(String url, InputConnection connection, Throwable t)
          This method displays error information when a BrowserField's displayContent() method fails.
 BrowserField getBrowserField()
           
 void navigationRequestError(BrowserFieldRequest request, Throwable t)
          This method displays information when a BrowserField's navigationRequest() method fails.
 void requestContentError(BrowserFieldRequest request, Throwable t)
          This method displays information when a BrowserField's requestContent() method fails.
 InputConnection resourceRequestError(BrowserFieldRequest request, Throwable t)
          This method displays information when a BrowserField's resourceRequest() method fails.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 



Constructor Detail

BrowserFieldErrorHandler

protected BrowserFieldErrorHandler(BrowserField browserField)
Creates a new instance of the error handler

Parameters:
browserField - The BrowserField component to which this error handler belongs
Since:
BlackBerry API 5.0.0


Method Detail

displayContentError

public void displayContentError(String url,
                                InputConnection connection,
                                Throwable t)
This method displays error information when a BrowserField's displayContent() method fails.

Parameters:
url - The web address of the web page generating the error
connection - Since this class is meant to be overridden, this parameter can be used to store the error details provided by this method.
t - The exception thrown by the web page
Since:
BlackBerry API 5.0.0

displayContentError

public void displayContentError(String url,
                                String errorMessage)
This method displays error information when a BrowserField's displayContent() method fails.

Parameters:
url - The web address of the web page generating the error
errorMessage - An error message describing the error
Since:
BlackBerry API 5.0.0

requestContentError

public void requestContentError(BrowserFieldRequest request,
                                Throwable t)
This method displays information when a BrowserField's requestContent() method fails.

Parameters:
request - The BrowserFieldRequest object that caused the requestContent() method to fail
t - The exception that was generated by the requestContent() method's failure
Since:
BlackBerry API 5.0.0

resourceRequestError

public InputConnection resourceRequestError(BrowserFieldRequest request,
                                            Throwable t)
This method displays information when a BrowserField's resourceRequest() method fails.

Parameters:
request - The BrowserFieldRequest object that caused the resourceRequest() method to fail
t - The exception that was generated by the requestContent() method's failure
Returns:
an InputConnection object containing details of the error
Since:
BlackBerry API 5.0.0

navigationRequestError

public void navigationRequestError(BrowserFieldRequest request,
                                   Throwable t)
This method displays information when a BrowserField's navigationRequest() method fails.

Parameters:
request - The BrowserFieldRequest object that caused the navigationRequest() method to fail
t - The exception that was generated by the requestContent() method's failure
Since:
BlackBerry API 5.0.0

getBrowserField

public BrowserField getBrowserField()
Returns:
the BrowserField instance associated with this error handler
Since:
BlackBerry API 5.0.0





Copyright 1999-2011 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Java is a trademark of Oracle America Inc. in the US and other countries.
Legal