|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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)
.
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 |
---|
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.void releaseConnection(ConnectionInfo info) throws IOException, MediaException
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()
.
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)
.
IOException
- Thrown if the i/o error occured while releasing the
connection.
MediaException
- Thrown if the media download was interrupted or cancelled.void setProperty(String name, String value)
This method allows the user to set any connector specific properties as name value pairs.
name
- The property name.value
- The property value.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright 1999-2010 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Copyright 1993-2003 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A. All Rights Reserved.
Copyright 2002-2003 Nokia Corporation All Rights Reserved.
Java is a trademark of Sun Microsystems, Inc.