Richard S. Hall | af656a0 | 2009-06-11 16:07:20 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Licensed to the Apache Software Foundation (ASF) under one |
| 3 | * or more contributor license agreements. See the NOTICE file |
| 4 | * distributed with this work for additional information |
| 5 | * regarding copyright ownership. The ASF licenses this file |
| 6 | * to you under the Apache License, Version 2.0 (the |
| 7 | * "License"); you may not use this file except in compliance |
| 8 | * with the License. You may obtain a copy of the License at |
| 9 | * |
| 10 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 11 | * |
| 12 | * Unless required by applicable law or agreed to in writing, |
| 13 | * software distributed under the License is distributed on an |
| 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| 15 | * KIND, either express or implied. See the License for the |
| 16 | * specific language governing permissions and limitations |
| 17 | * under the License. |
| 18 | */ |
| 19 | package org.osgi.framework.boot; |
| 20 | |
Guillaume Nodet | c35dd9e | 2009-06-22 22:27:13 +0000 | [diff] [blame] | 21 | import java.util.Properties; |
Richard S. Hall | af656a0 | 2009-06-11 16:07:20 +0000 | [diff] [blame] | 22 | |
| 23 | /** |
| 24 | * This interface should be implemented by framework implementations when their |
| 25 | * main object is created. It allows a configurator to set the properties and |
| 26 | * launch the framework. |
Guillaume Nodet | c35dd9e | 2009-06-22 22:27:13 +0000 | [diff] [blame] | 27 | * |
Richard S. Hall | af656a0 | 2009-06-11 16:07:20 +0000 | [diff] [blame] | 28 | * @author aqute |
Richard S. Hall | af656a0 | 2009-06-11 16:07:20 +0000 | [diff] [blame] | 29 | */ |
Guillaume Nodet | c35dd9e | 2009-06-22 22:27:13 +0000 | [diff] [blame] | 30 | public interface SystemBundle |
| 31 | { |
Richard S. Hall | af656a0 | 2009-06-11 16:07:20 +0000 | [diff] [blame] | 32 | /** |
| 33 | * The name of a Security Manager class with public empty constructor. A |
| 34 | * valid value is also true, this means that the framework should |
| 35 | * instantiate its own security manager. If not set, security could be |
| 36 | * defined by a parent framework or there is no security. This can be |
| 37 | * detected by looking if there is a security manager set |
| 38 | */ |
Guillaume Nodet | c35dd9e | 2009-06-22 22:27:13 +0000 | [diff] [blame] | 39 | String SECURITY = "org.osgi.framework.security"; |
Richard S. Hall | af656a0 | 2009-06-11 16:07:20 +0000 | [diff] [blame] | 40 | |
| 41 | /** |
| 42 | * A valid file path in the file system to a directory that exists. The |
| 43 | * framework is free to use this directory as it sees fit. This area can not |
| 44 | * be shared with anything else. If this property is not set, the framework |
| 45 | * should use a file area from the parent bundle. If it is not embedded, it |
| 46 | * must use a reasonable platform default. |
| 47 | */ |
Guillaume Nodet | c35dd9e | 2009-06-22 22:27:13 +0000 | [diff] [blame] | 48 | String STORAGE = "org.osgi.framework.storage"; |
Richard S. Hall | af656a0 | 2009-06-11 16:07:20 +0000 | [diff] [blame] | 49 | |
| 50 | /* |
| 51 | * A list of paths (separated by path separator) that point to additional |
| 52 | * directories to search for platform specific libraries |
Guillaume Nodet | c35dd9e | 2009-06-22 22:27:13 +0000 | [diff] [blame] | 53 | */ String LIBRARIES = "org.osgi.framework.libraries"; |
Richard S. Hall | af656a0 | 2009-06-11 16:07:20 +0000 | [diff] [blame] | 54 | /* |
| 55 | * The command to give a file executable permission. This is necessary in |
| 56 | * some environments for running shared libraries. |
Guillaume Nodet | c35dd9e | 2009-06-22 22:27:13 +0000 | [diff] [blame] | 57 | */ String EXECPERMISSION = "org.osgi.framework.command.execpermission"; |
Richard S. Hall | af656a0 | 2009-06-11 16:07:20 +0000 | [diff] [blame] | 58 | |
| 59 | /* |
| 60 | * Points to a directory with certificates. ###??? Keystore? Certificate |
| 61 | * format? |
Guillaume Nodet | c35dd9e | 2009-06-22 22:27:13 +0000 | [diff] [blame] | 62 | */ String ROOT_CERTIFICATES = "org.osgi.framework.root.certificates"; |
Richard S. Hall | af656a0 | 2009-06-11 16:07:20 +0000 | [diff] [blame] | 63 | |
| 64 | /* |
| 65 | * Set by the configurator but the framework should provide a reasonable |
| 66 | * default. |
Guillaume Nodet | c35dd9e | 2009-06-22 22:27:13 +0000 | [diff] [blame] | 67 | */ String WINDOWSYSTEM = "org.osgi.framework.windowsystem"; |
Richard S. Hall | af656a0 | 2009-06-11 16:07:20 +0000 | [diff] [blame] | 68 | |
| 69 | /** |
| 70 | * Configure this framework with the given properties. These properties can |
| 71 | * contain framework specific properties or of the general kind defined in |
| 72 | * the specification or in this interface. |
Guillaume Nodet | c35dd9e | 2009-06-22 22:27:13 +0000 | [diff] [blame] | 73 | * |
| 74 | * @param properties The properties. This properties can be backed by another |
| 75 | * properties, it can there not be assumed that it contains all |
| 76 | * keys. Use it only through the getProperty methods. This parameter may be null. |
Richard S. Hall | af656a0 | 2009-06-11 16:07:20 +0000 | [diff] [blame] | 77 | */ |
| 78 | void init(Properties configuration); |
| 79 | |
| 80 | /** |
| 81 | * Wait until the framework is completely finished. |
Guillaume Nodet | c35dd9e | 2009-06-22 22:27:13 +0000 | [diff] [blame] | 82 | * <p/> |
Richard S. Hall | af656a0 | 2009-06-11 16:07:20 +0000 | [diff] [blame] | 83 | * This method will return if the framework is stopped and has cleaned up |
Guillaume Nodet | c35dd9e | 2009-06-22 22:27:13 +0000 | [diff] [blame] | 84 | * all the framework resources. |
| 85 | * |
Richard S. Hall | af656a0 | 2009-06-11 16:07:20 +0000 | [diff] [blame] | 86 | * @param timeout Maximum number of milliseconds to wait until the framework is finished. Specifying a zero will wait indefinitely. |
| 87 | */ |
Guillaume Nodet | c35dd9e | 2009-06-22 22:27:13 +0000 | [diff] [blame] | 88 | |
Richard S. Hall | af656a0 | 2009-06-11 16:07:20 +0000 | [diff] [blame] | 89 | void join(long timeout) throws InterruptedException; |
| 90 | } |