1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.fourthline.cling.model.message;
17
18 import java.net.InetAddress;
19
20
21
22
23
24
25 public abstract class OutgoingDatagramMessage<O extends UpnpOperation> extends UpnpMessage<O> {
26
27 private InetAddress destinationAddress;
28 private int destinationPort;
29
30 private UpnpHeaders headers = new UpnpHeaders(false);
31
32 protected OutgoingDatagramMessage(O operation, InetAddress destinationAddress, int destinationPort) {
33 super(operation);
34 this.destinationAddress = destinationAddress;
35 this.destinationPort = destinationPort;
36 }
37
38 protected OutgoingDatagramMessage(O operation, BodyType bodyType, Object body, InetAddress destinationAddress, int destinationPort) {
39 super(operation, bodyType, body);
40 this.destinationAddress = destinationAddress;
41 this.destinationPort = destinationPort;
42 }
43
44 public InetAddress getDestinationAddress() {
45 return destinationAddress;
46 }
47
48 public int getDestinationPort() {
49 return destinationPort;
50 }
51
52 @Override
53 public UpnpHeaders getHeaders() {
54 return this.headers;
55 }
56 }