diff options
Diffstat (limited to 'src/net/java/sip/communicator/impl/replacement/vimeo/VimeoActivator.java')
-rw-r--r-- | src/net/java/sip/communicator/impl/replacement/vimeo/VimeoActivator.java | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/src/net/java/sip/communicator/impl/replacement/vimeo/VimeoActivator.java b/src/net/java/sip/communicator/impl/replacement/vimeo/VimeoActivator.java new file mode 100644 index 0000000..e5d99f6 --- /dev/null +++ b/src/net/java/sip/communicator/impl/replacement/vimeo/VimeoActivator.java @@ -0,0 +1,69 @@ +/* + * SIP Communicator, the OpenSource Java VoIP and Instant Messaging client. + * + * Distributable under LGPL license. See terms of license at gnu.org. + */ +package net.java.sip.communicator.impl.replacement.vimeo; + +import java.util.*; + +import net.java.sip.communicator.service.replacement.*; +import net.java.sip.communicator.util.*; + +import org.osgi.framework.*; + +/** + * Activator for the Vimeo source bundle. + * + * @author Purvesh Sahoo + */ +public class VimeoActivator + implements BundleActivator +{ + /** + * The logger for this class. + */ + private static final Logger logger = Logger.getLogger(VimeoActivator.class); + + /** + * The vimeo service registration. + */ + private ServiceRegistration vimeoServReg = null; + + /** + * The source implementation reference. + */ + private static ReplacementService vimeoSource = null; + + /** + * Starts the Vimeo replacement source bundle + * + * @param context the <tt>BundleContext</tt> as provided from the OSGi + * framework + * @throws Exception if anything goes wrong + */ + public void start(BundleContext context) throws Exception + { + Hashtable<String, String> hashtable = new Hashtable<String, String>(); + hashtable.put(ReplacementService.SOURCE_NAME, "VIMEO"); + vimeoSource = new ReplacementServiceVimeoImpl(); + + vimeoServReg = + context.registerService(ReplacementService.class.getName(), + vimeoSource, hashtable); + + logger.info("Vimeo source implementation [STARTED]."); + } + + /** + * Unregisters the Vimeo replacement service. + * + * @param context BundleContext + * @throws Exception if anything goes wrong + */ + public void stop(BundleContext context) throws Exception + { + vimeoServReg.unregister(); + logger.info("Vimeo source implementation [STOPPED]."); + } +}
\ No newline at end of file |