2 * Copyright 2015 Samsung Electronics All Rights Reserved.
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
17 package org.oic.simulator.clientcontroller;
19 import org.oic.simulator.SimulatorResourceModel;
22 * Provides interface for getting notification when resource model of an
23 * observed resource gets changed. An IObserveListener can be registered via the
24 * SimulatorRemoteResource observe call. Event listeners are notified
27 public interface IObserveListener {
29 * This method will be called when there is a change in the resource model
30 * of the remote resource.
33 * Unique Id of the resource.
34 * @param representation
35 * {@link SimulatorResourceModel}.
36 * @param sequenceNumber
37 * Sequential number for ordering the model change notifications.
39 public void onObserveCompleted(String uId,
40 SimulatorResourceModel representation, int sequenceNumber);
43 * Called when there is an error in observe request.
48 public void onObserveFailed(Throwable ex);