|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.rim.device.api.browser.field2.ProtocolController
public class ProtocolController
The ProtocolController uses several BrowserFieldResourceHandlers to handle navigation and resource requests associated with specific protocols. For instance, a TransportResourceHandler is used to handle "http" and "https" requests while "local" requests are handled by a ModuleResourceHandler instance. New handlers can be added to the controller to either handle new protocols or to replace existing handlers for specific protocols.
| Constructor Summary | ||
|---|---|---|
ProtocolController(BrowserField browserField)
Creates a new ProtocolController instance |
||
| Method Summary | ||
|---|---|---|
void |
handleNavigationRequest(BrowserFieldRequest request)
This method handles navigation requests from a BrowserField (e.g., what to do when a link is clicked on the page). |
|
InputConnection |
handleResourceRequest(BrowserFieldRequest request)
This method handles resource requests from a BrowserField (e.g., what to do when an image is requested within a page). |
|
void |
setNavigationRequestHandler(String protocol,
BrowserFieldNavigationRequestHandler handler)
Sets the BrowserFieldRequestHandler that should handle navigation requests for a given protocol. |
|
void |
setResourceRequestHandler(String protocol,
BrowserFieldResourceRequestHandler handler)
Sets the BrowserFieldResourceRequestHandler that should handle resource requests for a given protocol. |
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ProtocolController(BrowserField browserField)
browserField - The BrowserField component for which this controller belongs| Method Detail |
|---|
public void handleNavigationRequest(BrowserFieldRequest request)
throws Exception
handleNavigationRequest in interface BrowserFieldControllerrequest - Contains details about the content being requested (e.g., URL, HTTP headers).
ExceptionBrowserFieldController.handleNavigationRequest(BrowserFieldRequest)
public void setNavigationRequestHandler(String protocol,
BrowserFieldNavigationRequestHandler handler)
protocol - The protocol (e.g., http, https, file, data) to associate with the handler.handler - The BrowserFieldRequestHandler that handles navigation requests for the specified protocol.BrowserFieldController.handleNavigationRequest(BrowserFieldRequest)
public InputConnection handleResourceRequest(BrowserFieldRequest request)
throws Exception
handleResourceRequest in interface BrowserFieldControllerrequest - Contains details about the resource being requested (e.g., URL, HTTP headers).
ExceptionBrowserFieldController.handleNavigationRequest(BrowserFieldRequest)
public void setResourceRequestHandler(String protocol,
BrowserFieldResourceRequestHandler handler)
protocol - The protocol (e.g., http, https, file, data) to associate with the handler.handler - The BrowserFieldResourceRequestHandler that handles resource requests for the specified protocol.BrowserFieldController.handleNavigationRequest(BrowserFieldRequest)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
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