use of org.osgi.service.component.annotations.Activate in project bndtools by bndtools.
the class ReposTemplateLoader method activate.
@Activate
void activate() {
if (promiseFactory == null) {
localExecutor = Executors.newCachedThreadPool();
promiseFactory = new PromiseFactory(localExecutor);
}
}
use of org.osgi.service.component.annotations.Activate in project bndtools by bndtools.
the class ExtensionRegistryTemplateLoader method activate.
@Activate
void activate() {
typeToExtPoint.put("project", "projectTemplates");
typeToExtPoint.put("workspace", "workspaceTemplates");
if (promiseFactory == null) {
localExecutor = Executors.newCachedThreadPool();
promiseFactory = new PromiseFactory(localExecutor);
}
}
use of org.osgi.service.component.annotations.Activate in project bndtools by bndtools.
the class PlainGitWorkspaceTemplateLoader method activate.
@Activate
void activate(BundleContext context) {
iconUrl = context.getBundle().getEntry("icons/git-16px.png");
if (promiseFactory == null) {
localExecutor = Executors.newCachedThreadPool();
promiseFactory = new PromiseFactory(localExecutor);
}
}
use of org.osgi.service.component.annotations.Activate in project flux by eclipse.
the class JDTComponent method activate.
@Activate
public void activate(final ComponentContext context) throws Exception {
final boolean lazyStart = org.eclipse.flux.core.Activator.getDefault().isLazyStart();
final ChannelSwitcher channelSwitcher = org.eclipse.flux.core.Activator.getDefault().getChannelSwitcher();
final MessageConnector messagingConnector = org.eclipse.flux.core.Activator.getDefault().getMessageConnector();
if (messagingConnector != null) {
new Thread() {
@Override
public void run() {
String userChannel = channelSwitcher.getChannel();
JdtChannelListener jdtChannelListener = new JdtChannelListener();
for (; userChannel == null; userChannel = channelSwitcher.getChannel()) {
try {
sleep(WAIT_TIME_PERIOD);
} catch (InterruptedException e) {
e.printStackTrace();
}
}
discoveryConnector = new ServiceDiscoveryConnector(channelSwitcher, messagingConnector, JDT_SERVICE_ID, lazyStart);
if (lazyStart) {
keepAliveConnector = new KeepAliveConnector(channelSwitcher, messagingConnector, JDT_SERVICE_ID);
}
jdtChannelListener.connected(userChannel);
messagingConnector.addChannelListener(jdtChannelListener);
}
}.start();
}
}
use of org.osgi.service.component.annotations.Activate in project aem-core-wcm-components by Adobe-Marketing-Cloud.
the class FormHandlerImpl method activate.
@Activate
protected void activate(Config config) {
int connectionTimeout = config.connectionTimeout();
if (connectionTimeout < 0) {
throw new IllegalArgumentException("Connection timeout value cannot be less than 0");
}
int socketTimeout = config.socketTimeout();
if (socketTimeout < 0) {
throw new IllegalArgumentException("Socket timeout value cannot be less than 0");
}
RequestConfig requestConfig = RequestConfig.custom().setConnectTimeout(connectionTimeout).setConnectionRequestTimeout(connectionTimeout).setSocketTimeout(socketTimeout).build();
client = clientBuilderFactory.newBuilder().setDefaultRequestConfig(requestConfig).build();
}
Aggregations