net.rim.device.api.browser.field
Class RequestedResource
java.lang.Object
net.rim.device.api.browser.field.RequestedResource
public final class RequestedResource
- extends Object
Object to carry information about requested resource.
Requested resource objects get passed into a rendering application when
the rendering session needs assistance in rendering an off-page resource
(by invoking RenderingApplication.getResource(net.rim.device.api.browser.field.RequestedResource, net.rim.device.api.browser.field.BrowserContent) and passing in a
requested resource object).
- Category:
- Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
- Since:
- BlackBerry API 4.0.0
RequestedResource
public RequestedResource(String url)
- Creates new RequestedResource instance.
- Parameters:
url - URL of the resource.- Category:
- Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
- Since:
- BlackBerry API 4.0.0
RequestedResource
public RequestedResource(String url,
HttpHeaders requestHeaders,
int flags)
- Creates new RequestedResource instance.
- Parameters:
url - URL of the resource.requestHeaders - Request Headers for this request.flags - Flags for this request.- Category:
- Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
- Since:
- BlackBerry API 4.0.0
RequestedResource
public RequestedResource(String url,
HttpHeaders requestHeaders,
int flags,
String requestMethod,
byte[] requestData)
- Creates new RequestedResource instance.
- Parameters:
url - URL of the resource.requestHeaders - Request Headers for this request.flags - Flags for this request.requestMethod - Request method for this request.requestData - Request data for this request.- Category:
- Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
- Since:
- BlackBerry API 4.2.1
isCacheOnly
public boolean isCacheOnly()
- Returns true if this resource should only be retrieved from the cache.
Returns false if this resource may be retrieved from the network.
- Category:
- Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
- Since:
- BlackBerry API 4.0.0
setCacheOnly
public void setCacheOnly(boolean cacheOnly)
- Indicates whether the resource should only be retrieved from cache.
If
cacheOnly is true but the resource is not available
in the cache, then getInputConnection and getHttpConnection
will return null.
- Parameters:
cacheOnly - true if the resource should only be retrieved from
cache; false to allow loading the resource from the network- Category:
- Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
- Since:
- BlackBerry API 4.0.0
setAuthentication
public void setAuthentication(String username,
String password)
- Specifies the credentials for the request if authentication is required.
- Parameters:
username - The username to use.password - The password to use.- Category:
- Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
- Since:
- BlackBerry API 5.0.0
getUsername
public String getUsername()
- The username credentials for the request.
- Returns:
- Username for this request.
- Category:
- Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
- Since:
- BlackBerry API 5.0.0
getPassword
public String getPassword()
- The password credentials for the request.
- Returns:
- Password for this request.
- Category:
- Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
- Since:
- BlackBerry API 5.0.0
getFlags
public int getFlags()
- Retrieves the flags associated with this request.
- Returns:
- Flags for this request.
- Category:
- Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
- Since:
- BlackBerry API 4.0.0
getRequestMethod
public String getRequestMethod()
- Retrieves the associated request method.
- Returns:
- Method to be invoked on the request eg. for "HTTP", "GET", "HEAD", "PUT". If the requested method
is specified as null in the constructor for this object, the return is then dependent on the requested
data. If the requested data is specified as non-null in the constuctor, the return is "POST",
while if the requested data is null, the return is "GET".
- Category:
- Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
- Since:
- BlackBerry API 4.2.1
getRequestData
public byte[] getRequestData()
- Retrieves the associated request data. The request headers should provide a
content type for this data.
- Returns:
- Data to be sent on the requested resource.
- Category:
- Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
- Since:
- BlackBerry API 4.2.1
getHttpConnection
public HttpConnection getHttpConnection()
- Retrieves the HTTP connection object for this request.
- Returns:
- The HTTP connection for this request.
- Category:
- Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
- Since:
- BlackBerry API 4.0.0
getUrl
public String getUrl()
- Retrieves the URL for this request.
- Returns:
- URL for this request.
- Category:
- Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
- Since:
- BlackBerry API 4.0.0
getRequestHeaders
public HttpHeaders getRequestHeaders()
- Retrieves the request headers for this request.
- Returns:
- The requestHeaders for this request.
- Category:
- Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
- Since:
- BlackBerry API 4.0.0
setHttpConnection
public void setHttpConnection(HttpConnection connection)
- Sets the HTTP connection object for this request.
- Parameters:
connection - Connection to be set for this request.- Category:
- Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
- Since:
- BlackBerry API 4.0.0
setInputConnection
public void setInputConnection(InputConnection connection)
- Sets the input connection object for this request.
- Parameters:
connection - Connection to be set for this request.- Category:
- Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
- Since:
- BlackBerry API 4.2.0
getInputConnection
public InputConnection getInputConnection()
- Gets the input connection object for this request.
- Returns:
- Connection set for this request.
- Category:
- Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
- Since:
- BlackBerry API 4.2.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