Imported Upstream version 1.1.0
[platform/upstream/iotivity.git] / service / simulator / java / sdk / src / org / oic / simulator / server / Observer.java
1 /*
2  * Copyright 2015 Samsung Electronics All Rights Reserved.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17 package org.oic.simulator.server;
18
19 /**
20  * Class which represents the details of an observer.
21  */
22 public class Observer {
23
24     private int    mId;
25     private String mAddress;
26     private int    mPort;
27
28     private Observer(int id, String address, int port) {
29         mId = id;
30         mAddress = address;
31         mPort = port;
32     }
33
34     /**
35      * This method is used to return the observer's id.
36      *
37      * @return Observer's Id.
38      */
39     public int getId() {
40         return mId;
41     }
42
43     /**
44      * This method is used to return the observer's address.
45      *
46      * @return Observer's device address.
47      */
48     public String getAddress() {
49         return mAddress;
50     }
51
52     /**
53      * This method is used to return the observer's port number.
54      *
55      * @return Observer's port number.
56      */
57     public int getPort() {
58         return mPort;
59     }
60 }