EMMA Coverage Report (generated Tue Dec 18 20:38:46 CET 2007)
[all classes][cz.vutbr.feec.session.feedback]

## COVERAGE SUMMARY FOR SOURCE FILE [ThreadInUnicast.java]

name | class, % | method, % | block, % | line, %
--- | --- | --- | --- | ---
ThreadInUnicast.java | 0% (0/1) | 0% (0/4) | 0% (0/77) | 0% (0/25)

### COVERAGE BREAKDOWN BY CLASS AND METHOD

name | class, % | method, % | block, % | line, %
--- | --- | --- | --- | ---
class ThreadInUnicast | 0% (0/1) | 0% (0/4) | 0% (0/77) | 0% (0/25)
<static initializer> |  | 0% (0/1) | 0% (0/5) | 0% (0/3)
ThreadInUnicast (int): void |  | 0% (0/1) | 0% (0/26) | 0% (0/6)
run (): void |  | 0% (0/1) | 0% (0/40) | 0% (0/13)
stopThread (): void |  | 0% (0/1) | 0% (0/6) | 0% (0/3)

1 | package cz.vutbr.feec.session.feedback;
2 |
3 | import java.io.IOException;
4 | import java.net.DatagramPacket;
5 | import java.net.DatagramSocket;
6 | import java.net.SocketException;
7 |
8 | import org.apache.log4j.Logger;
9 |
10 | public class ThreadInUnicast extends ThreadIn {
11 | private static Logger logger = Logger.getLogger(ThreadInUnicast.class
12 | .getName());
13 | private DatagramSocket socket;
14 |
15 | private DatagramPacket packet;
16 |
17 | private byte[] buffer = new byte[1500];
18 |
19 | public ThreadInUnicast(int feedbackPort) throws SocketException {
20 | setName("TTP-FT(in Unicast)");
21 | packet = new DatagramPacket(buffer, buffer.length);
22 | socket = new DatagramSocket(feedbackPort);
23 | }
24 |
25 | @Override
26 | public void run() {
27 | logger.debug("STARTED");
28 | while (true) {
29 | try {
30 | socket.receive(packet);
31 | logger.debug("Received packet length:"+packet.getLength());
32 | // parse
33 | // TODO: zpracovani prijateho paketu
34 | } catch (SocketException e) {
35 | if (isStopped()) break;
36 | e.printStackTrace();
37 | System.exit(-1);
38 | } catch (IOException e) {
39 | e.printStackTrace();
40 | System.exit(-1);
41 | }
42 | }
43 | logger.debug("FINISHED");
44 | }
45 |
46 | @Override
47 | public void stopThread() {
48 | super.stopThread();
49 | socket.close();
50 | }
51 | }

[all classes][cz.vutbr.feec.session.feedback]
EMMA 2.0.5312 EclEmma Fix 1 (C) Vladimir Roubtsov