This is an automated email from the ASF dual-hosted git repository. rombert pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-launchpad-api.git
commit 0e60f31943c61dec4396cf5bbe9fc357c51c7d45 Author: Carsten Ziegeler <[email protected]> AuthorDate: Thu Jan 19 16:16:55 2012 +0000 SLING-2376 : New Startup Features git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1233447 13f79535-47bb-0310-9956-ffa450edef68 --- pom.xml | 2 +- .../apache/sling/launchpad/api/StartupHandler.java | 36 +++++++++++++++++++ .../sling/launchpad/api/StartupListener.java | 42 ++++++++++++++++++++++ .../apache/sling/launchpad/api/StartupMode.java | 32 +++++++++++++++++ 4 files changed, 111 insertions(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index cc59e0f..e69d63e 100644 --- a/pom.xml +++ b/pom.xml @@ -43,7 +43,7 @@ <extensions>true</extensions> <configuration> <instructions> - <Export-Package>org.apache.sling.launchpad.api;version=1.0.0</Export-Package> + <Export-Package>org.apache.sling.launchpad.api;version=1.1.0</Export-Package> </instructions> </configuration> </plugin> diff --git a/src/main/java/org/apache/sling/launchpad/api/StartupHandler.java b/src/main/java/org/apache/sling/launchpad/api/StartupHandler.java new file mode 100644 index 0000000..aad2694 --- /dev/null +++ b/src/main/java/org/apache/sling/launchpad/api/StartupHandler.java @@ -0,0 +1,36 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.sling.launchpad.api; + + + +/** + * The <code>StartupHandler</code> tries to detect the startup mode: + * It distinguishes between an initial startup (INSTALL), an update (UPDATE) + * and a restart without a change (RESTART). + * @since 1.1.0 + */ +public interface StartupHandler { + + StartupMode getMode(); + + boolean isFinished(); + + void waitWithStartup(final boolean flag); +} diff --git a/src/main/java/org/apache/sling/launchpad/api/StartupListener.java b/src/main/java/org/apache/sling/launchpad/api/StartupListener.java new file mode 100644 index 0000000..15b7511 --- /dev/null +++ b/src/main/java/org/apache/sling/launchpad/api/StartupListener.java @@ -0,0 +1,42 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.sling.launchpad.api; + + +/** + * A startup listener receives events about the startup. + * + * @since 1.1.0 + */ +public interface StartupListener { + + void inform(StartupMode mode, boolean finished); + + /** + * Notify finished startup. + * @param The startup mode + */ + void startupFinished(StartupMode mode); + + /** + * Notify startup progress + * @param ratio The current ratio + */ + void startupProgress(final float ratio); +} diff --git a/src/main/java/org/apache/sling/launchpad/api/StartupMode.java b/src/main/java/org/apache/sling/launchpad/api/StartupMode.java new file mode 100644 index 0000000..1b07894 --- /dev/null +++ b/src/main/java/org/apache/sling/launchpad/api/StartupMode.java @@ -0,0 +1,32 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.sling.launchpad.api; + +/** + * The <code>StartupMode</code> + * It distinguishes between an initial startup (INSTALL), an update (UPDATE) + * and a restart without a change (RESTART). + * @since 1.1.0 + */ +public enum StartupMode { + + INSTALL, + UPDATE, + RESTART +} -- To stop receiving notification emails like this one, please contact "[email protected]" <[email protected]>.
