org.eclipse.actf.mediator

## Class Mediator

- java.lang.Object
- - org.eclipse.actf.mediator.Mediator

    public class Mediator
    extends Object

A `Mediator` manages components and dataflows in the ACTF by collaborating with the Eclipse framework. If `Mediator` detects a status change in ACTF components, it will send `MediatorEvent` to ACTF components and other registered EventListeners.

### Method Summary

Methods
`void` `addMediatorEventListener(IMediatorEventListener listener)` Registers the `IMediatorEventListener` to the Mediator.
`static Mediator` `getInstance()` Gets Mediator instance.
`IACTFReport` `getReport(IACTFReportGenerator generator)` Gets current report submitted from the report generator.
`boolean` `removeMediatorEventListener(IMediatorEventListener listener)` Removes the `IMediatorEventListener` from the Mediator.
`void` `setReport(IACTFReportGenerator generator, IACTFReport report)` Sets the report to Mediator.

### Methods inherited from class java.lang.Object

`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Method Detail

#### getInstance

    public static Mediator getInstance()

Gets Mediator instance.

Returns:
  Mediator

#### setReport

    public void setReport(IACTFReportGenerator generator,
                 IACTFReport report)

Sets the report to Mediator. Other ACTF components will receive the `MediatorEvent` (report changed).

Parameters:
  `generator` - generator of the report
  `report` - new report to set

#### getReport

    public IACTFReport getReport(IACTFReportGenerator generator)

Gets current report submitted from the report generator.

Parameters:
  `generator` - target report generator
Returns:
  current report submitted from the report generator

#### addMediatorEventListener

    public void addMediatorEventListener(IMediatorEventListener listener)

Registers the `IMediatorEventListener` to the Mediator.

Parameters:
  `listener` - the listener to register

#### removeMediatorEventListener

    public boolean removeMediatorEventListener(IMediatorEventListener listener)

Removes the `IMediatorEventListener` from the Mediator.

Parameters:
  `listener` - the listener to remove
Returns:
  true if the listener is removed from the Mediator