]> git.basschouten.com Git - openhab-addons.git/blob
fd42f29c91186f3b7c9fbd6eaeb6562de4c21be3
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2021 Contributors to the openHAB project
3  *
4  * See the NOTICE file(s) distributed with this work for additional
5  * information.
6  *
7  * This program and the accompanying materials are made available under the
8  * terms of the Eclipse Public License 2.0 which is available at
9  * http://www.eclipse.org/legal/epl-2.0
10  *
11  * SPDX-License-Identifier: EPL-2.0
12  */
13 package org.openhab.binding.ipcamera.internal;
14
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16
17 import io.netty.channel.Channel;
18
19 /**
20  * The {@link ChannelTracking} Can be used to find the handle for a HTTP channel if you know the URL. The reply can
21  * optionally be stored for later use.
22  *
23  *
24  * @author Matthew Skinner - Initial contribution
25  */
26
27 @NonNullByDefault
28 public class ChannelTracking {
29     private String storedReply = "";
30     private String requestUrl = "";
31     private Channel channel;
32
33     public ChannelTracking(Channel channel, String requestUrl) {
34         this.channel = channel;
35         this.requestUrl = requestUrl;
36     }
37
38     public String getRequestUrl() {
39         return requestUrl;
40     }
41
42     public Channel getChannel() {
43         return channel;
44     }
45
46     public String getReply() {
47         return storedReply;
48     }
49
50     public void setReply(String replyToStore) {
51         storedReply = replyToStore;
52     }
53
54     public void setChannel(Channel ch) {
55         channel = ch;
56     }
57 }