[Bug 303523] LTTng/TMF udpates:
[deliverable/tracecompass.git] / org.eclipse.linuxtools.tmf / src / org / eclipse / linuxtools / tmf / component / TmfComponent.java
index eefb3248ec881e699652f8c3959fd9ce72f23943..fbedd776f16e19aaeb124df7486109e50e00d156 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2009 Ericsson
+ * Copyright (c) 2009, 2010 Ericsson
  * 
  * All rights reserved. This program and the accompanying materials are
  * made available under the terms of the Eclipse Public License v1.0 which
 
 package org.eclipse.linuxtools.tmf.component;
 
+import org.eclipse.linuxtools.tmf.signal.TmfSignal;
 import org.eclipse.linuxtools.tmf.signal.TmfSignalManager;
 
 /**
  * <b><u>TmfComponent</u></b>
  * <p>
- * TODO: Implement me. Please.
+ * This is the base class of the TMF components.
+ * <p>
+ *  Currently, it only addresses the inter-component signaling.
  */
 public abstract class TmfComponent implements ITmfComponent {
 
+       // ------------------------------------------------------------------------
+       // Constructor
+       // ------------------------------------------------------------------------
+
        public TmfComponent() {
-               TmfSignalManager.addListener(this);
+               register();
+       }
+
+       // ------------------------------------------------------------------------
+       // ITmfComponent
+       // ------------------------------------------------------------------------
+
+       /* (non-Javadoc)
+        * @see org.eclipse.linuxtools.tmf.component.ITmfComponent#register()
+        */
+       public void register() {
+               TmfSignalManager.register(this);
+       }
+
+       /* (non-Javadoc)
+        * @see org.eclipse.linuxtools.tmf.component.ITmfComponent#deregister()
+        */
+       public void deregister() {
+               TmfSignalManager.deregister(this);
        }
 
-       public void dispose() {
-               TmfSignalManager.removeListener(this);
+       /* (non-Javadoc)
+        * @see org.eclipse.linuxtools.tmf.component.ITmfComponent#broadcast(org.eclipse.linuxtools.tmf.signal.TmfSignal)
+        */
+       public void broadcast(TmfSignal signal) {
+               TmfSignalManager.dispatchSignal(signal);
        }
 
 }
This page took 0.02611 seconds and 5 git commands to generate.