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 ******************************************************************/
22 * @file IActionListener.java
24 * @brief This file provides interface for receiving the callback for the GET, PUT and POST requested
29 package org.iotivity.service.tm;
31 import java.util.Vector;
33 import org.iotivity.base.OcHeaderOption;
34 import org.iotivity.base.OcRepresentation;
37 * Provides interface for receiving the callback for the GET, PUT and
38 * POST requested actions.
40 public interface IActionListener {
42 * This callback method is called when a asynchronous response for the getActionSet
43 * request is received.
45 * @param headerOptions
46 * It comprises of optionID and optionData as members.
48 * Configuration parameters are carried as a pair of attribute
49 * key and value in a form of OCRepresentation instance.
54 public void onGetResponseCallback(Vector<OcHeaderOption> headerOptions,
55 OcRepresentation rep, int errorValue);
58 * This callback method is called when a asynchronous response for the addActionSet
59 * request is received.
61 * @param headerOptions
62 * It comprises of optionID and optionData as members.
64 * Configuration parameters are carried as a pair of attribute
65 * key and value in a form of OCRepresentation instance.
70 public void onPutResponseCallback(Vector<OcHeaderOption> headerOptions,
71 OcRepresentation rep, int errorValue);
74 * This callback method is called when a asynchronous response for the executeActionSet
75 * or deleteActionSet request is received.
77 * @param headerOptions
78 * It comprises of optionID and optionData as members.
80 * Configuration parameters are carried as a pair of attribute
81 * key and value in a form of OCRepresentation instance.
86 public void onPostResponseCallback(Vector<OcHeaderOption> headerOptions,
87 OcRepresentation rep, int errorValue);