-
Notifications
You must be signed in to change notification settings - Fork 5
CASL-592 Extension Cleanup Capability #374
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
43 commits
Select commit
Hold shift + click to select a range
4b77d3f
Initial Changes.
rlakde ba85d9d
Fix Unit Tests
rlakde 1befc37
Review Fixes
rlakde fec7f97
Merge branch 'v2' into CASL-321_Extn_Sub_Environments
rlakde 58995d3
Update openapi.yaml
rlakde 7ec0f86
Update gradle.properties
rlakde acc5770
Update gradle.properties
rlakde b07480f
Rebase CASL-321 (#371)
rlakde 3e55ff9
Update reusable-build-and-publish.yml
rlakde dbd6e79
Update gradle.properties
rlakde 9ea31d5
Update openapi.yaml
rlakde c802b92
Merge branch 'v2' into CASL-321_Extn_Sub_Environments
rlakde 0b204a5
Add Interface IExtensionInit
rlakde 528c950
Add instanceCache logic.
rlakde 7325ec8
Create ValueTuple.java
rlakde 9443100
loaderCache Changes
rlakde 32c1b9e
Correct logger messages
rlakde 3bd4148
Update IExtensionInit description
rlakde d718694
Fix bug
rlakde f9314f6
Correct logger in Hub.
rlakde a8cfeaa
Update IExtensionInit Description.
rlakde f05cd53
Correct removeExtensionFromCache.
rlakde 5fda375
Review Fixes for ExtensionCache
rlakde 6acf521
Update ExtensionCache.java
rlakde ec3f3fc
Update NakshaHub.java
rlakde 5311364
Extension Sub Environment Changes (#330) (#392)
rlakde a80f6a4
Update ExtensionCache.java
rlakde ee35c84
Update NakshaHub.java
rlakde e421d65
Merge branch 'v2' into v2_CASL_592-Extension_Cleanup_Capability
rlakde 1d73a38
Update gradle.properties
rlakde 9834cc1
Update openapi.yaml
rlakde 807706c
Update NakshaVersion.java
rlakde 26ae812
Update gradle.properties
rlakde d364a21
Update gradle.properties
rlakde 6c461d3
Update NakshaVersion.java
rlakde 896c98c
Update NakshaHub.java
rlakde 44aab83
Support multiple JWT public keys (#395) (#396)
rlakde 7a70459
Update ExtensionCache.java
rlakde 7c5dbb0
Update gradle.properties
rlakde 698fc56
Update openapi.yaml
rlakde cbc078d
Update NakshaVersion.java
rlakde 765d423
Merge branch 'v2' into v2_CASL_592-Extension_Cleanup_Capability
rlakde b0943f1
Update logger as per review comment.
rlakde File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 42 additions & 0 deletions
42
here-naksha-lib-core/src/main/java/com/here/naksha/lib/core/IExtensionInit.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| /* | ||
| * Copyright (C) 2017-2024 HERE Europe B.V. | ||
| * | ||
| * Licensed 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. | ||
| * | ||
| * SPDX-License-Identifier: Apache-2.0 | ||
| * License-Filename: LICENSE | ||
| */ | ||
| package com.here.naksha.lib.core; | ||
|
|
||
| import com.here.naksha.lib.core.models.features.Extension; | ||
|
|
||
| /** | ||
| * Naksha Extension Interface for all extensions providing initClassName. | ||
| */ | ||
| public interface IExtensionInit { | ||
|
|
||
| /** | ||
| * Initializes the extension with the specified hub and extension parameters. | ||
| * This method should be called to set up any necessary resources or configurations | ||
| * required by the extension to operate correctly. | ||
| * @param hub The hub instance to be used by the extension. | ||
| * @param extension Extension configuration supplied as part of deployment pipeline for respective Extension and sub-env. | ||
| */ | ||
| void init(INaksha hub, Extension extension); | ||
|
|
||
| /** | ||
| * Closes the extension. This method should be called to ensure proper | ||
| * cleanup when the extension is no longer needed. | ||
| */ | ||
| void close(); | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 46 additions & 0 deletions
46
here-naksha-lib-ext-manager/src/main/java/com/here/naksha/lib/extmanager/ValueTuple.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,46 @@ | ||
| /* | ||
| * Copyright (C) 2017-2024 HERE Europe B.V. | ||
| * | ||
| * Licensed 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. | ||
| * | ||
| * SPDX-License-Identifier: Apache-2.0 | ||
| * License-Filename: LICENSE | ||
| */ | ||
| package com.here.naksha.lib.extmanager; | ||
|
|
||
| import com.here.naksha.lib.core.IExtensionInit; | ||
| import com.here.naksha.lib.core.models.features.Extension; | ||
|
|
||
| public class ValueTuple { | ||
| private final Extension extension; | ||
| private final ClassLoader classLoader; | ||
| private final IExtensionInit instance; | ||
|
|
||
| public ValueTuple(Extension extension, ClassLoader classLoader, IExtensionInit instance) { | ||
| this.extension = extension; | ||
| this.classLoader = classLoader; | ||
| this.instance = instance; | ||
| } | ||
|
|
||
| public Extension getExtension() { | ||
| return extension; | ||
| } | ||
|
|
||
| public ClassLoader getClassLoader() { | ||
| return classLoader; | ||
| } | ||
|
|
||
| public IExtensionInit getInstance() { | ||
| return instance; | ||
| } | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.