Package: ChannelListenerBlockTask

ChannelListenerBlockTask

nameinstructionbranchcomplexitylinemethod
ChannelListenerBlockTask(ChannelBlockTask, ChannelListener)
M: 7 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 3 C: 0
0%
M: 1 C: 0
0%
getListener()
M: 3 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
run()
M: 14 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 4 C: 0
0%
M: 1 C: 0
0%

Coverage

1: package org.eclipse.kura.driver.block.task;
2:
3: import java.io.IOException;
4:
5: import org.eclipse.kura.channel.listener.ChannelEvent;
6: import org.eclipse.kura.channel.listener.ChannelListener;
7:
8: public class ChannelListenerBlockTask extends ChannelBlockTaskWrapper {
9:
10: private final ChannelListener listener;
11:
12: public ChannelListenerBlockTask(final ChannelBlockTask wrapped, final ChannelListener listener) {
13: super(wrapped);
14:
15: this.listener = listener;
16: }
17:
18: public ChannelListener getListener() {
19: return listener;
20: }
21:
22: @Override
23: public void run() throws IOException {
24: final ChannelBlockTask wrapped = getWrappedTask();
25:
26: wrapped.run();
27:
28: listener.onChannelEvent(new ChannelEvent(wrapped.getRecord()));
29: }
30: }