KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > media > engine > MediaTranscoderRegistry


1 /*
2  * JBoss, the OpenSource J2EE webOS
3  *
4  * Distributable under LGPL license.
5  * See terms of license at gnu.org.
6  */

7
8
9 package org.jboss.media.engine;
10
11 import java.util.HashMap JavaDoc;
12 import java.util.Iterator JavaDoc;
13
14 import org.jboss.system.ServiceMBeanSupport;
15
16 /**
17  * @version <tt>$Revision: 1.1 $</tt>
18  * @author <a HREF="mailto:spyridon_samothrakis@yahoo.com">Spyridon Samothrakis</a>
19  * @jmx.mbean extends="org.jboss.system.ServiceMBean"
20  * @jmx.mbean description="The media engine transcoder registry"
21  */

22 public class MediaTranscoderRegistry
23    extends ServiceMBeanSupport
24       implements MediaTranscoderRegistryMBean
25 {
26
27     private HashMap JavaDoc m_transcoders = new HashMap JavaDoc();
28    
29    /**
30     * @jmx.managed-operation description="add a transcoder"
31     */

32    public void addTranscoder(String JavaDoc name , MediaTranscoder object)
33    {
34       m_transcoders.put(name,object);
35    }
36    
37    /**
38     * @jmx.managed-operation description="remove a transcoder"
39     */

40    public void removeTranscoder(String JavaDoc name)
41    {
42       m_transcoders.remove(name);
43    }
44    
45    /**
46     * @jmx.managed-operation description="get the list of transcoder"
47     */

48    public Iterator JavaDoc getTranscoderNames()
49    {
50       return ((HashMap JavaDoc)m_transcoders.clone()).keySet().iterator();
51    }
52    
53    
54    /**
55     * @jmx.managed-operation description="acquire a transcoder"
56     */

57    public MediaTranscoder getTranscoder(String JavaDoc name)
58    {
59       return (MediaTranscoder)m_transcoders.get(name);
60    }
61
62 }
63
Popular Tags