net.rim.plazmic.mediaengine.io
Interface Connector


Deprecated. Use SVGImage instead.

public interface Connector

This interface provides the means to extend MediaManager functionality with support for additional protocols and caching.

The Connector interface is used by the MediaManager to establish network connections and to access local content.

If you choose to provide the new Connector implementation, but still wish to support the default Connector functionality provided by the MediaManager, use the default Connector as a delegate. To obtain the default Connector use MediaManager's MediaManager.getDefaultConnector() method and assign your custom Connector implementation using MediaManager.setConnector(net.rim.plazmic.mediaengine.io.Connector).

Since:
BlackBerry API 3.7.0

Method Summary
 InputStream getInputStream(String uri, ConnectionInfo info)
          Deprecated. Returns an input stream for reading the content from the specified uniform Resource Identifier(URI).
 void releaseConnection(ConnectionInfo info)
          Deprecated. Releases the network connection.
 void setProperty(String name, String value)
          Deprecated. Set Connector-specific properties.
 



Method Detail

getInputStream

InputStream getInputStream(String uri,
                           ConnectionInfo info)
                           throws IOException,
                                  MediaException
Deprecated. 
Returns an input stream for reading the content from the specified uniform Resource Identifier(URI).

Parameters:
uri - The locator of the media content.
info - An input/output parameter that allows developers to set connection properties. The Connector implementer must call ConnectionInfo.setContentType(java.lang.String) on this parameter in order to flag the MediaManager with the media type it is getting.
Returns:
The input stream.
Throws:
IOException - Thrown if an i/o error occured during the download or parsing of the data.
MediaException - Thrown if the media download was interrupted or cancelled.
Since:
BlackBerry API 3.7.0

releaseConnection

void releaseConnection(ConnectionInfo info)
                       throws IOException,
                              MediaException
Deprecated. 
Releases the network connection.

This method is invoked by MediaManager to inform a Connector that it that it should close and release the connection specified by the info parameter. Any resources associated with the connection should be released as well. It is possible to obtain the connection from the ConnectionInfo object by calling ConnectionInfo.getConnection().

Parameters:
info - The ConnectionInfo object. Use the ConnectionInfo.getConnection() method to return the ConnectionInfo object that was set in Connector.getInputStream(java.lang.String, net.rim.plazmic.mediaengine.io.ConnectionInfo) using ConnectionInfo.setConnection(java.lang.Object).
Throws:
IOException - Thrown if the i/o error occured while releasing the connection.
MediaException - Thrown if the media download was interrupted or cancelled.
Since:
BlackBerry API 3.7.0

setProperty

void setProperty(String name,
                 String value)
Deprecated. 
Set Connector-specific properties.

This method allows the user to set any connector specific properties as name value pairs.

Parameters:
name - The property name.
value - The property value.
Since:
BlackBerry API 3.7.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