KickJava   Java API By Example, From Geeks To Geeks.

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


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

7
8 package org.jboss.media.engine;
9
10 import javax.management.ObjectName JavaDoc;
11
12 import org.jboss.logging.Logger;
13
14 /**
15  * @version <tt>$Revision: 1.8 $</tt>
16  * @author <a HREF="mailto:spyridon_samothrakis@yahoo.com">Spyridon Samothrakis</a>
17  * @jmx.mbean description="The basic abstract MediaPublisher"
18  */

19 public abstract class MediaPublisher implements MediaPublisherMBean
20 {
21
22    // Where are we ?
23
private String JavaDoc m_host;
24    // The number of the gate
25
private int m_port;
26    // and serve what ?
27
private String JavaDoc m_fileName;
28    // where should I serve it?
29
private String JavaDoc m_context;
30    //which protocol to use ??
31
private int m_protocolServer;
32    // what's my name ?
33
private ObjectName JavaDoc m_name;
34
35    ////////////////////////////////////////////////////////////////////////////
36

37    protected Logger log = Logger.getLogger(getClass().getName());
38
39    // Getters / Setters
40

41    /**
42     * Returns the context.
43     * @return String
44     * @jmx:managed-attribute
45     */

46    public String JavaDoc getContext()
47    {
48       return m_context;
49    }
50
51    /**
52     * Returns the fileName.
53     * @return String
54     * @jmx:managed-attribute
55     */

56    public String JavaDoc getFileName()
57    {
58       return m_fileName;
59    }
60
61    /**
62     * Returns the host.
63     * @return String
64     * @jmx:managed-attribute
65     */

66    public String JavaDoc getHost()
67    {
68       return m_host;
69    }
70
71    /**
72     * Returns the port.
73     * @return int
74     * @jmx:managed-attribute
75     */

76    public int getPort()
77    {
78       return m_port;
79    }
80
81    /**
82     * Sets the context.
83     * @param context The context to set
84     * @jmx:managed-attribute
85     */

86    public void setContext(String JavaDoc context)
87    {
88       m_context = context;
89    }
90
91    /**
92     * Sets the fileName.
93     * @param fileName The fileName to set
94     * @jmx:managed-attribute
95     */

96    public void setFileName(String JavaDoc fileName)
97    {
98       m_fileName = fileName;
99    }
100
101    /**
102     * Sets the host.
103     * @param host The host to set
104     * @jmx:managed-attribute
105     */

106    public void setHost(String JavaDoc host)
107    {
108       m_host = host;
109    }
110
111    /**
112     * Sets the port.
113     * @param port The port to set
114     * @jmx:managed-attribute
115     */

116    public void setPort(int port)
117    {
118       m_port = port;
119    }
120
121    /**
122     * @return
123     * @jmx:managed-attribute
124     */

125    public ObjectName JavaDoc getName()
126    {
127       return m_name;
128    }
129
130    /**
131     * @param name
132     * @jmx:managed-attribute
133     */

134    public void setName(ObjectName JavaDoc name)
135    {
136       m_name = name;
137    }
138
139    /**
140     * Publishes the processed media using a the specified protocol
141     * server
142     * @jmx.managed-operation
143     */

144    public abstract void publish() throws Exception JavaDoc;
145
146    /**
147     * Stops publication of the current media
148     * @jmx.managed-operation
149     */

150    public abstract void stop();
151    
152    /**
153     * Stops publication of the current media
154     * @jmx.managed-operation
155     */

156    public abstract void addPluginGraph(MediaPluginGraph pg);
157    
158    
159
160 }
161
Popular Tags