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.URI;
19 import java.net.URL;
20
21
22
23
24
25
26 public class StreamRequestMessage extends UpnpMessage<UpnpRequest> {
27
28 protected Connection connection;
29
30 public StreamRequestMessage(StreamRequestMessage source) {
31 super(source);
32 this.connection = source.getConnection();
33 }
34
35 public StreamRequestMessage(UpnpRequest operation) {
36 super(operation);
37 }
38
39 public StreamRequestMessage(UpnpRequest.Method method, URI uri) {
40 super(new UpnpRequest(method, uri));
41 }
42
43 public StreamRequestMessage(UpnpRequest.Method method, URL url) {
44 super(new UpnpRequest(method, url));
45 }
46
47 public StreamRequestMessage(UpnpRequest operation, String body) {
48 super(operation, BodyType.STRING, body);
49 }
50
51 public StreamRequestMessage(UpnpRequest.Method method, URI uri, String body) {
52 super(new UpnpRequest(method, uri), BodyType.STRING, body);
53 }
54
55 public StreamRequestMessage(UpnpRequest.Method method, URL url, String body) {
56 super(new UpnpRequest(method, url), BodyType.STRING, body);
57 }
58
59
60 public StreamRequestMessage(UpnpRequest operation, byte[] body) {
61 super(operation, BodyType.BYTES, body);
62 }
63
64 public StreamRequestMessage(UpnpRequest.Method method, URI uri, byte[] body) {
65 super(new UpnpRequest(method, uri), BodyType.BYTES, body);
66 }
67
68 public StreamRequestMessage(UpnpRequest.Method method, URL url, byte[] body) {
69 super(new UpnpRequest(method, url), BodyType.BYTES, body);
70 }
71
72 public URI getUri() {
73 return getOperation().getURI();
74 }
75
76 public void setUri(URI uri) {
77 getOperation().setUri(uri);
78 }
79
80 public void setConnection(Connection connection) {
81 this.connection = connection;
82 }
83
84 public Connection getConnection() {
85 return connection;
86 }
87
88 }