blob: 25cd3735681dff84642070db6a33417db7920649 [file] [log] [blame]
Richard S. Hallaf656a02009-06-11 16:07:20 +00001/*
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 */
19package org.osgi.framework.boot;
20
Guillaume Nodetc35dd9e2009-06-22 22:27:13 +000021import java.util.Properties;
Richard S. Hallaf656a02009-06-11 16:07:20 +000022
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 Nodetc35dd9e2009-06-22 22:27:13 +000027 *
Richard S. Hallaf656a02009-06-11 16:07:20 +000028 * @author aqute
Richard S. Hallaf656a02009-06-11 16:07:20 +000029 */
Guillaume Nodetc35dd9e2009-06-22 22:27:13 +000030public interface SystemBundle
31{
Richard S. Hallaf656a02009-06-11 16:07:20 +000032 /**
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 Nodetc35dd9e2009-06-22 22:27:13 +000039 String SECURITY = "org.osgi.framework.security";
Richard S. Hallaf656a02009-06-11 16:07:20 +000040
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 Nodetc35dd9e2009-06-22 22:27:13 +000048 String STORAGE = "org.osgi.framework.storage";
Richard S. Hallaf656a02009-06-11 16:07:20 +000049
50 /*
51 * A list of paths (separated by path separator) that point to additional
52 * directories to search for platform specific libraries
Guillaume Nodetc35dd9e2009-06-22 22:27:13 +000053 */ String LIBRARIES = "org.osgi.framework.libraries";
Richard S. Hallaf656a02009-06-11 16:07:20 +000054 /*
55 * The command to give a file executable permission. This is necessary in
56 * some environments for running shared libraries.
Guillaume Nodetc35dd9e2009-06-22 22:27:13 +000057 */ String EXECPERMISSION = "org.osgi.framework.command.execpermission";
Richard S. Hallaf656a02009-06-11 16:07:20 +000058
59 /*
60 * Points to a directory with certificates. ###??? Keystore? Certificate
61 * format?
Guillaume Nodetc35dd9e2009-06-22 22:27:13 +000062 */ String ROOT_CERTIFICATES = "org.osgi.framework.root.certificates";
Richard S. Hallaf656a02009-06-11 16:07:20 +000063
64 /*
65 * Set by the configurator but the framework should provide a reasonable
66 * default.
Guillaume Nodetc35dd9e2009-06-22 22:27:13 +000067 */ String WINDOWSYSTEM = "org.osgi.framework.windowsystem";
Richard S. Hallaf656a02009-06-11 16:07:20 +000068
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 Nodetc35dd9e2009-06-22 22:27:13 +000073 *
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. Hallaf656a02009-06-11 16:07:20 +000077 */
78 void init(Properties configuration);
79
80 /**
81 * Wait until the framework is completely finished.
Guillaume Nodetc35dd9e2009-06-22 22:27:13 +000082 * <p/>
Richard S. Hallaf656a02009-06-11 16:07:20 +000083 * This method will return if the framework is stopped and has cleaned up
Guillaume Nodetc35dd9e2009-06-22 22:27:13 +000084 * all the framework resources.
85 *
Richard S. Hallaf656a02009-06-11 16:07:20 +000086 * @param timeout Maximum number of milliseconds to wait until the framework is finished. Specifying a zero will wait indefinitely.
87 */
Guillaume Nodetc35dd9e2009-06-22 22:27:13 +000088
Richard S. Hallaf656a02009-06-11 16:07:20 +000089 void join(long timeout) throws InterruptedException;
90}