-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #171 from scottslewis/sslcontextfactoryexample
Added javadocs links for SSLContextFactory interface
- Loading branch information
Showing
12 changed files
with
141 additions
and
0 deletions.
There are no files selected for viewing
7 changes: 7 additions & 0 deletions
7
examples/bundles/org.eclipse.ecf.examples.sslcontextfactory/.classpath
This file contains 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,7 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<classpath> | ||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-17"/> | ||
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> | ||
<classpathentry kind="src" path="src"/> | ||
<classpathentry kind="output" path="bin"/> | ||
</classpath> |
33 changes: 33 additions & 0 deletions
33
examples/bundles/org.eclipse.ecf.examples.sslcontextfactory/.project
This file contains 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,33 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<projectDescription> | ||
<name>org.eclipse.ecf.examples.sslcontextfactory</name> | ||
<comment></comment> | ||
<projects> | ||
</projects> | ||
<buildSpec> | ||
<buildCommand> | ||
<name>org.eclipse.jdt.core.javabuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
<buildCommand> | ||
<name>org.eclipse.pde.ManifestBuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
<buildCommand> | ||
<name>org.eclipse.pde.SchemaBuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
<buildCommand> | ||
<name>org.eclipse.pde.ds.core.builder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
</buildSpec> | ||
<natures> | ||
<nature>org.eclipse.pde.PluginNature</nature> | ||
<nature>org.eclipse.jdt.core.javanature</nature> | ||
</natures> | ||
</projectDescription> |
2 changes: 2 additions & 0 deletions
2
...les/org.eclipse.ecf.examples.sslcontextfactory/.settings/org.eclipse.core.resources.prefs
This file contains 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,2 @@ | ||
eclipse.preferences.version=1 | ||
encoding/<project>=windows-1252 |
9 changes: 9 additions & 0 deletions
9
...s/bundles/org.eclipse.ecf.examples.sslcontextfactory/.settings/org.eclipse.jdt.core.prefs
This file contains 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,9 @@ | ||
eclipse.preferences.version=1 | ||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=17 | ||
org.eclipse.jdt.core.compiler.compliance=17 | ||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error | ||
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled | ||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error | ||
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning | ||
org.eclipse.jdt.core.compiler.release=enabled | ||
org.eclipse.jdt.core.compiler.source=17 |
3 changes: 3 additions & 0 deletions
3
...s/bundles/org.eclipse.ecf.examples.sslcontextfactory/.settings/org.eclipse.pde.core.prefs
This file contains 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,3 @@ | ||
eclipse.preferences.version=1 | ||
pluginProject.extensions=false | ||
resolve.requirebundle=false |
12 changes: 12 additions & 0 deletions
12
examples/bundles/org.eclipse.ecf.examples.sslcontextfactory/META-INF/MANIFEST.MF
This file contains 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,12 @@ | ||
Manifest-Version: 1.0 | ||
Bundle-ManifestVersion: 2 | ||
Bundle-Name: Sslcontextfactory | ||
Bundle-SymbolicName: org.eclipse.ecf.examples.sslcontextfactory | ||
Bundle-Version: 1.0.0.qualifier | ||
Automatic-Module-Name: org.eclipse.ecf.examples.sslcontextfactory | ||
Bundle-ActivationPolicy: lazy | ||
Bundle-RequiredExecutionEnvironment: JavaSE-17 | ||
Import-Package: org.eclipse.ecf.core.security;version="[3.2.0,4.0.0)", | ||
org.osgi.service.component.annotations;version="[1.3.0,2.0.0)";resolution:=optional | ||
Service-Component: OSGI-INF/org.eclipse.ecf.examples.sslcontextfactory.ContextFactoryConsumer.xml, | ||
OSGI-INF/org.eclipse.ecf.examples.sslcontextfactory.ExampleProvider.xml |
5 changes: 5 additions & 0 deletions
5
...extfactory/OSGI-INF/org.eclipse.ecf.examples.sslcontextfactory.ContextFactoryConsumer.xml
This file contains 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,5 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" immediate="true" name="org.eclipse.ecf.examples.sslcontextfactory.ContextFactoryConsumer"> | ||
<reference bind="bindSSLContextFactory" cardinality="1..1" interface="org.eclipse.ecf.core.security.SSLContextFactory" name="SSLContextFactory" unbind="unbindSSLContextFactory"/> | ||
<implementation class="org.eclipse.ecf.examples.sslcontextfactory.ContextFactoryConsumer"/> | ||
</scr:component> |
7 changes: 7 additions & 0 deletions
7
...sslcontextfactory/OSGI-INF/org.eclipse.ecf.examples.sslcontextfactory.ExampleProvider.xml
This file contains 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,7 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" immediate="true" name="org.eclipse.ecf.examples.sslcontextfactory.ExampleProvider"> | ||
<service> | ||
<provide interface="java.security.Provider"/> | ||
</service> | ||
<implementation class="org.eclipse.ecf.examples.sslcontextfactory.ExampleProvider"/> | ||
</scr:component> |
7 changes: 7 additions & 0 deletions
7
examples/bundles/org.eclipse.ecf.examples.sslcontextfactory/build.properties
This file contains 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,7 @@ | ||
source.. = src/ | ||
output.. = bin/ | ||
bin.includes = META-INF/,\ | ||
.,\ | ||
OSGI-INF/org.eclipse.ecf.examples.sslcontextfactory.ContextFactoryConsumer.xml,\ | ||
OSGI-INF/org.eclipse.ecf.examples.sslcontextfactory.ExampleProvider.xml,\ | ||
OSGI-INF/ |
25 changes: 25 additions & 0 deletions
25
...contextfactory/src/org/eclipse/ecf/examples/sslcontextfactory/ContextFactoryConsumer.java
This file contains 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,25 @@ | ||
package org.eclipse.ecf.examples.sslcontextfactory; | ||
|
||
import org.eclipse.ecf.core.security.SSLContextFactory; | ||
import org.osgi.service.component.annotations.Component; | ||
import org.osgi.service.component.annotations.Reference; | ||
import org.osgi.service.component.annotations.ReferenceCardinality; | ||
|
||
@Component(immediate=true) | ||
public class ContextFactoryConsumer { | ||
|
||
private static SSLContextFactory factory; | ||
|
||
@Reference(cardinality = ReferenceCardinality.MANDATORY) | ||
void bindSSLContextFactory(SSLContextFactory sslContextFactory) { | ||
factory = sslContextFactory; | ||
} | ||
|
||
void unbindSSLContextFactory(SSLContextFactory sslContextFactory) { | ||
factory = null; | ||
} | ||
|
||
public static SSLContextFactory getSSLContextFactory() { | ||
return factory; | ||
} | ||
} |
16 changes: 16 additions & 0 deletions
16
...les.sslcontextfactory/src/org/eclipse/ecf/examples/sslcontextfactory/ExampleProvider.java
This file contains 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,16 @@ | ||
package org.eclipse.ecf.examples.sslcontextfactory; | ||
|
||
import java.security.Provider; | ||
|
||
import org.osgi.service.component.annotations.Component; | ||
|
||
@Component(service=Provider.class,immediate=true) | ||
public class ExampleProvider extends Provider { | ||
|
||
private static final long serialVersionUID = 4387195962639458953L; | ||
|
||
public ExampleProvider() { | ||
super("PKIJoe", "1.0", null); | ||
} | ||
|
||
} |
This file contains 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