From 296a88021aac67ed316c24b6f8205e5873fcce1c Mon Sep 17 00:00:00 2001 From: emcho Date: Sun, 28 Feb 2010 16:13:31 +0000 Subject: [PATCH] Adds to IceMediaStream several access methods that allow retrieving available components --- src/org/ice4j/ice/IceMediaStream.java | 38 +++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/src/org/ice4j/ice/IceMediaStream.java b/src/org/ice4j/ice/IceMediaStream.java index d3040d7..68f9aa7 100644 --- a/src/org/ice4j/ice/IceMediaStream.java +++ b/src/org/ice4j/ice/IceMediaStream.java @@ -106,4 +106,42 @@ public class IceMediaStream { return "media stream:" + getName(); } + + /** + * Returns the Component with the specified id or + * null if no such component exists in this stream. + * + * @param id the identifier of the component we are looking for. + * + * @return the Component with the specified id or + * null if no such component exists in this stream. + */ + public Component getComponnet(int id) + { + return components.get(id); + } + + /** + * Returns the list of Components currently registered with this + * stream. + * + * @return a non-null list of Components currently registered with + * this stream. + */ + public List getComponents() + { + return new LinkedList(components.values()); + } + + /** + * Returns the IDs of all Components currently registered with this + * stream. + * + * @return a non-null list of IDs corresponding to the Components + * currently registered with this stream. + */ + public List getComponentIDs() + { + return new LinkedList(components.keySet()); + } }