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 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
21 package org.iotivity.resourcecontainer.bundle.api;
23 import java.util.List;
26 * The BundleActivator interface needs to be implemented. A bundle provider
27 * can directly extend fromt the BaseActivator.
29 public interface BundleActivator {
31 * Activates the bundle and creates all resources.
33 public void activateBundle();
36 * Deactivates the bundle and destroys all resources.
38 public void deactivateBundle();
41 * Registers a single resource instance at the resource container
42 * @param resource Instance of a BundleResource
44 public void registerResource(BundleResource resource);
47 * Unregisters a single resource instance at the resource container
48 * @param resource Instance of a BundleResource
50 public void unregisterResource(BundleResource resource);
53 * List the configuration of the bundle resources.
54 * @return List of configuration for each resource
56 public List<ResourceConfig> getConfiguredBundleResources();