1 /******************************************************************
3 * Copyright 2015 Samsung Electronics All Rights Reserved.
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
19 ******************************************************************/
21 package org.iotivity.service.client;
24 * This class provides a set of APIs for constructing RCSAddress object.
27 * RCSAddress object is the first parameter for Discover Resource APIs of
28 * RCSDiscoveryManager Class.
30 * {@link RcsDiscoveryManager}
32 public final class RcsAddress {
33 private final String mAddress;
35 private RcsAddress(String addr) {
40 * Factory method for multicast.
43 public static RcsAddress multicast() {
44 return new RcsAddress(null);
48 * Factory method for unicast.
51 * A physical address for the target.
53 * @throws NullPointerException
56 public static RcsAddress unicast(String address) {
57 if (address == null) throw new NullPointerException("address is null.");
58 return new RcsAddress(address);