|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
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 interface, 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
net.rim.plazmic.mediaengine.MediaManager.getConnector
method before assigning your custom Connector implementation using
net.rim.plazmic.mediaengine.MediaManager.setConnector.
| Method Summary | ||
InputStream |
getInputStream(String uri,
ConnectionInfo info)
Returns an input stream for reading the content from the specified uniform Resource Identifier(URI). |
|
void |
releaseConnection(ConnectionInfo info)
Releases the network connection. |
|
void |
setProperty(String name,
String value)
Set Connector-specific properties. |
|
| Method Detail |
public InputStream getInputStream(String uri, ConnectionInfo info) throws IOException, MediaException
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.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.public void releaseConnection(ConnectionInfo info) throws IOException, MediaException
This method is invoked by MediaManager to
inform a Connector that it can release the connection.
info - The ConnectionInfo object. Use the ConnectionInfo.getConnection() method to return the ConnectionInfo
object that was set in getInputStream(java.lang.String, net.rim.plazmic.mediaengine.io.ConnectionInfo) using ConnectionInfo#setConnection().IOException - Thrown if the i/o error occured while releasing the
connection.MediaException - Thrown if the media download was interrupted or cancelled.public void setProperty(String name, String value)
name - The property name.value - The property value.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Copyright 1999-2002 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Copyright 1993-2000 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A. All Rights Reserved.
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.