Search in sources :

Example 1 with GenericContainerInstantiator

use of org.eclipse.ecf.provider.generic.GenericContainerInstantiator in project ecf by eclipse.

the class ProviderPlugin method start.

/**
 * This method is called upon plug-in activation
 */
public void start(final BundleContext context1) throws Exception {
    this.context = context1;
    SafeRunner.run(new ExtensionRegistryRunnable(this.context) {

        protected void runWithoutRegistry() throws Exception {
            // $NON-NLS-1$
            context1.registerService(ContainerTypeDescription.class, new ContainerTypeDescription(GenericContainerInstantiator.TCPSERVER_NAME, new GenericContainerInstantiator(), "ECF Generic Server", true, false), null);
            // $NON-NLS-1$
            context1.registerService(ContainerTypeDescription.class, new ContainerTypeDescription(GenericContainerInstantiator.TCPCLIENT_NAME, new GenericContainerInstantiator(), "ECF Generic Client", true, true), null);
            // $NON-NLS-1$
            context1.registerService(ContainerTypeDescription.class, new ContainerTypeDescription(SSLGenericContainerInstantiator.SSLSERVER_NAME, new SSLGenericContainerInstantiator(), "ECF SSL Generic Server", true, false), null);
            // $NON-NLS-1$
            context1.registerService(ContainerTypeDescription.class, new ContainerTypeDescription(SSLGenericContainerInstantiator.SSLCLIENT_NAME, new SSLGenericContainerInstantiator(), "ECF SSL Generic Client", true, true), null);
        }
    });
    if (genericClassResolverOverride) {
        Hashtable<String, Object> props = new Hashtable<String, Object>();
        props.put(IClassResolver.BUNDLE_PROP_NAME, PLUGIN_ID);
        this.context.registerService(IClassResolver.class, new BundleClassResolver(context.getBundle()), props);
    }
}
Also used : ContainerTypeDescription(org.eclipse.ecf.core.ContainerTypeDescription) Hashtable(java.util.Hashtable) SSLGenericContainerInstantiator(org.eclipse.ecf.provider.generic.SSLGenericContainerInstantiator) GenericContainerInstantiator(org.eclipse.ecf.provider.generic.GenericContainerInstantiator) SSLGenericContainerInstantiator(org.eclipse.ecf.provider.generic.SSLGenericContainerInstantiator)

Aggregations

Hashtable (java.util.Hashtable)1 ContainerTypeDescription (org.eclipse.ecf.core.ContainerTypeDescription)1 GenericContainerInstantiator (org.eclipse.ecf.provider.generic.GenericContainerInstantiator)1 SSLGenericContainerInstantiator (org.eclipse.ecf.provider.generic.SSLGenericContainerInstantiator)1