1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.fourthline.cling.transport.impl;
17
18 import org.fourthline.cling.transport.spi.MulticastReceiverConfiguration;
19
20 import java.net.InetAddress;
21 import java.net.UnknownHostException;
22
23
24
25
26
27
28 public class MulticastReceiverConfigurationImpl implements MulticastReceiverConfiguration {
29
30 private InetAddress group;
31 private int port;
32 private int maxDatagramBytes;
33
34 public MulticastReceiverConfigurationImpl(InetAddress group, int port, int maxDatagramBytes) {
35 this.group = group;
36 this.port = port;
37 this.maxDatagramBytes = maxDatagramBytes;
38 }
39
40
41
42
43 public MulticastReceiverConfigurationImpl(InetAddress group, int port) {
44 this(group, port, 640);
45 }
46
47 public MulticastReceiverConfigurationImpl(String group, int port, int maxDatagramBytes) throws UnknownHostException {
48 this(InetAddress.getByName(group), port, maxDatagramBytes);
49 }
50
51
52
53
54 public MulticastReceiverConfigurationImpl(String group, int port) throws UnknownHostException {
55 this(InetAddress.getByName(group), port, 640);
56 }
57
58 public InetAddress getGroup() {
59 return group;
60 }
61
62 public void setGroup(InetAddress group) {
63 this.group = group;
64 }
65
66 public int getPort() {
67 return port;
68 }
69
70 public void setPort(int port) {
71 this.port = port;
72 }
73
74 public int getMaxDatagramBytes() {
75 return maxDatagramBytes;
76 }
77
78 public void setMaxDatagramBytes(int maxDatagramBytes) {
79 this.maxDatagramBytes = maxDatagramBytes;
80 }
81
82 }