1 //******************************************************************
3 // Copyright 2015 Samsung Electronics All Rights Reserved.
5 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
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 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
20 package org.iotivity.service.resourcecontainer;
22 import android.content.Context;
23 import java.util.List;
26 * Every resource bundle has to provide a bundle activator that can be called
27 * by the resource container on bundle startup.
29 public abstract class BundleActivator {
30 protected RcsResourceContainerBundleAPI bundleAPI;
31 protected Context appContext;
33 public BundleActivator(RcsResourceContainerBundleAPI bundleAPI, Context appContext){
34 this.bundleAPI = bundleAPI;
35 this.appContext = appContext;
38 * Activates the bundle and creates all resources.
40 public abstract void activateBundle();
43 * Deactivates the bundle and destroys all resources.
45 public abstract void deactivateBundle();
49 * @param resource Instance of a BundleResource
51 public abstract void createResource(ResourceConfig resource);
55 * @param resource Instance of a BundleResource
57 public abstract void destroyResource(BundleResource resource);