diff options
author | Thomas Watson | 2020-06-10 18:35:37 +0000 |
---|---|---|
committer | Thomas Watson | 2020-06-10 18:35:37 +0000 |
commit | ba1d324ba47e04aa343ee49afcb9db660a76cc15 (patch) | |
tree | d36d7603d137b5f2fa488649b731ab9e400d4685 /bundles/org.eclipse.osgi | |
parent | 9fde91945623e9c9ed9c4e4a39a2839d66819353 (diff) | |
download | rt.equinox.framework-ba1d324ba47e04aa343ee49afcb9db660a76cc15.tar.gz rt.equinox.framework-ba1d324ba47e04aa343ee49afcb9db660a76cc15.tar.xz rt.equinox.framework-ba1d324ba47e04aa343ee49afcb9db660a76cc15.zip |
Update OSGi R8 API to the latest
Diffstat (limited to 'bundles/org.eclipse.osgi')
4 files changed, 45 insertions, 36 deletions
diff --git a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/hooks/weaving/WeavingException.java b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/hooks/weaving/WeavingException.java index 7575fc1b0..29ebe6460 100644 --- a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/hooks/weaving/WeavingException.java +++ b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/hooks/weaving/WeavingException.java @@ -1,5 +1,5 @@ /* - * Copyright (c) OSGi Alliance (2010, 2013). All Rights Reserved. + * Copyright (c) OSGi Alliance (2010, 2020). All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,8 +18,7 @@ package org.osgi.framework.hooks.weaving; /** * A weaving exception used to indicate that the class load should be failed but - * the weaving hook must not be blacklisted by the framework. - * + * the weaving hook must not be deny listed by the framework. * <p> * This exception conforms to the general purpose exception chaining mechanism. * diff --git a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/hooks/weaving/WeavingHook.java b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/hooks/weaving/WeavingHook.java index 8d99df5b0..e5b54121d 100644 --- a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/hooks/weaving/WeavingHook.java +++ b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/hooks/weaving/WeavingHook.java @@ -1,5 +1,5 @@ /* - * Copyright (c) OSGi Alliance (2010, 2013). All Rights Reserved. + * Copyright (c) OSGi Alliance (2010, 2020). All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -42,24 +42,23 @@ import org.osgi.annotation.versioning.ConsumerType; public interface WeavingHook { /** * Weaving hook method. - * + * <p> * This method can modify the specified woven class object to weave the * class being defined. - * * <p> * If this method throws any exception, the framework must log the exception * and fail the class load in progress. This weaving hook service must be - * blacklisted by the framework and must not be called again. The - * blacklisting of this weaving hook service must expire when this weaving - * hook service is unregistered. However, this method can throw a + * deny listed by the framework and must not be called again. The deny + * listing of this weaving hook service must expire when this weaving hook + * service is unregistered. However, this method can throw a * {@link WeavingException} to deliberately fail the class load in progress - * without being blacklisted by the framework. + * without being deny listed by the framework. * * @param wovenClass The {@link WovenClass} object that represents the data - * that will be used to define the class. + * that will be used to define the class. * @throws WeavingException If this weaving hook wants to deliberately fail - * the class load in progress without being blacklisted by the - * framework + * the class load in progress without being deny listed by the + * framework */ public void weave(WovenClass wovenClass); } diff --git a/bundles/org.eclipse.osgi/osgi/src/org/osgi/service/condition/Condition.java b/bundles/org.eclipse.osgi/osgi/src/org/osgi/service/condition/Condition.java index f196a94f7..9736e5e1c 100644 --- a/bundles/org.eclipse.osgi/osgi/src/org/osgi/service/condition/Condition.java +++ b/bundles/org.eclipse.osgi/osgi/src/org/osgi/service/condition/Condition.java @@ -19,21 +19,23 @@ package org.osgi.service.condition; import org.osgi.annotation.versioning.ConsumerType; /** + * Condition Service interface. + * <p> * In dynamic systems, such as OSGi, one of the more challenging problems can be - * to define when a System or part of it is ready to do work. The answer can - * change depending on the individual perspective. The developer of a Webserver - * might say, the System is ready when the server starts listening to port 80. - * An Application developer however would define the system as ready, when the - * database connection is up and all Servlets are registered. Taking the - * Application developers view, the Server should start Listening on Port 80 - * when the System is ready and not beforehand. + * to define when a system or part of it is ready to do work. The answer can + * change depending on the individual perspective. The developer of a web server + * might say, the system is ready when the server starts listening on port 80. + * An application developer however would define the system as ready when the + * database connection is up and all servlets are registered. Taking the + * application developers view, the web server should start listening on port 80 + * when the application is ready and not beforehand. * <p> - * The <code>Condition</code> interface is designed to address this issue. Its - * task is to provide a marker that can be tracked. It acts as a defined signal - * to other services. + * The {@code Condition} service interface is a marker interface designed to + * address this issue. Its role is to provide a dependency that can be tracked. + * It acts as a defined signal to other services. * <p> - * A Condition must be registered with the {@link Condition#CONDITION_ID} as - * property. + * A {@code Condition} service must be registered with the + * {@link Condition#CONDITION_ID} service property. * * @ThreadSafe * @author $Id$ @@ -42,25 +44,34 @@ import org.osgi.annotation.versioning.ConsumerType; public interface Condition { /** - * Service property identifying a condition's unique identifier. As a - * Condition can potentially describe more then one state, the type of this - * service property is {@code String+} + * Service property identifying a condition's unique identifier. + * <p> + * Since a {@code Condition} service can potentially describe more then one + * condition, the type of this service property is {@code String+}. */ - public static final String CONDITION_ID = "osgi.condition.id"; + String CONDITION_ID = "osgi.condition.id"; /** - * The unique identifier for the TRUE Condition. The TRUE condition is - * registered by the framework and therefore can always be relied upon. + * The unique identifier for the default True condition. + * <p> + * The default True condition is registered by the framework during + * framework initialization and therefore can always be relied upon. * * @see Condition#CONDITION_ID */ - public static final String CONDITION_ID_TRUE = "true"; + String CONDITION_ID_TRUE = "true"; /** - * A singleton condition instance that can be used to register condition + * A condition instance that can be used to register {@code Condition} * services. + * <p> + * This can be helpful to avoid a bundle having to implement this interface + * to register a {@code Condition} service */ - public static final Condition INSTANCE = new Condition() { - /* Nothing to do */}; + Condition INSTANCE = new ConditionImpl(); +} +final class ConditionImpl implements Condition { + ConditionImpl() { + } } diff --git a/bundles/org.eclipse.osgi/osgi/src/org/osgi/service/condition/package-info.java b/bundles/org.eclipse.osgi/osgi/src/org/osgi/service/condition/package-info.java index 5bcd82de3..52df94eac 100644 --- a/bundles/org.eclipse.osgi/osgi/src/org/osgi/service/condition/package-info.java +++ b/bundles/org.eclipse.osgi/osgi/src/org/osgi/service/condition/package-info.java @@ -1,5 +1,5 @@ /* - * Copyright (c) OSGi Alliance (2013, 2016). All Rights Reserved. + * Copyright (c) OSGi Alliance (2020). All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. |