Generates an Intent to start LynxActivity with a LynxConfig configuration passed as parameter.

@param context the application context
@param lynxConfig the lynx configuration
@return a new {@code Intent} to start {@link LynxActivity}
331679
public static Intent getIntent(Context context, LynxConfig lynxConfig) {
    if (lynxConfig == null) {
      lynxConfig = new LynxConfig();
    }
    Intent intent = new Intent(context, LynxActivity.class);
    intent.putExtra(LYNX_CONFIG_EXTRA, lynxConfig);
    return intent;
  }
191451
public static ConfigFactory
    webappConfigFactory(ServletContextPath servletContextPath) {

        checkNotNull(servletContextPath);

        return webappConfigFactory()
            .bind(ServletContextPath.class)
            .toInstance(servletContextPath);
    }
270373
@Trivial
    @Activate
    protected void activate(ComponentContext context) {
        Dictionary<String, ?> props = context.getProperties();
        final boolean trace = TraceComponent.isAnyTracingEnabled();
        if (trace && tc.isEntryEnabled())
            Tr.entry(this, tc, "activate", props);

        String contextSvcName = (String) props.get(JNDI_NAME);
        if (contextSvcName == null)
            contextSvcName = (String) props.get(CONFIG_ID);

        lock.writeLock().lock();
        try {
            componentContext = context;
            properties = props;
            name = contextSvcName;
        } finally {
            lock.writeLock().unlock();
        }

        if (trace && tc.isEntryEnabled())
            Tr.exit(this, tc, "activate");
    }
99285
public JellyContext createContext() {
        JellyContext context = new CustomJellyContext(ROOT_CONTEXT);
        context.setClassLoader(owner.loader);
        context.setExportLibraries(false);
        return context;
    }
930280
public static void openChangelogActivity(Context ctx, @XmlRes int configId){
        Intent intent = new Intent(ctx, ChangeLogActivity.class);
        intent.putExtra(ChangeLogActivity.EXTRA_CONFIG, configId);
        ctx.startActivity(intent);
    }
879029
public synchronized void start(final Context context) {
        this.contextWeakReference = new WeakReference<Context>(context);
        if (isStarted()) {
            throw new IllegalStateException("Already started.");
        } else {
            executorService = Executors.newFixedThreadPool(getThreadCount(), new MinPriorityThreadFactory());
            // start the binding to the service
            runner = new Thread(this, SPICE_MANAGER_THREAD_NAME_PREFIX + spiceManagerThreadIndex++);
            runner.setPriority(Thread.MIN_PRIORITY);
            isStopped = false;
            runner.start();

            Ln.d("SpiceManager started.");
        }
    }
96038
public synchronized static void initConfig(ITestContext context) {
        SeLionLogger.getLogger().entering(context);
        Map<ConfigProperty, String> initialValues = new HashMap<>();
        Map<String, String> testParams = context.getCurrentXmlTest().getLocalParameters();
        if (!testParams.isEmpty()) {
            for (ConfigProperty prop : ConfigProperty.values()) {
                // Check if a selionConfig param resides in the <test>
                String newValue = testParams.get(prop.getName());
                // accept param values that are empty in initialValues.
                if (newValue != null) {
                    initialValues.put(prop, newValue);
                }
            }
        }

        ConfigManager.addConfig(context.getCurrentXmlTest().getName(), new LocalConfig(initialValues));
        SeLionLogger.getLogger().exiting();
    }
929779
public void submitContext(final String evaluatorConfiguration, final String contextConfiguration) {
    launchWithConfigurationString(evaluatorConfiguration, contextConfiguration, Optional.<String>empty(),
        Optional.<String>empty());
  }
1364973
private static ContextProvider createContextProvider(final Collection<LoggingProvider> loggingProviders) {
		Collection<ContextProvider> contextProviders = new ArrayList<ContextProvider>(loggingProviders.size());
		for (LoggingProvider loggingProvider : loggingProviders) {
			contextProviders.add(loggingProvider.getContextProvider());
		}
		return new BundleContextProvider(contextProviders);
	}
252554
public static ActivityContext getActivityContext(HttpServlet servlet) {
        ServletContext servletContext = servlet.getServletContext();
        String attrName = STANDALONE_WEB_SERVICE_ATTRIBUTE_PREFIX + servlet.getServletName();
        ActivityContext activityContext = getActivityContext(servletContext, attrName);
        if (activityContext != null) {
            return activityContext;
        } else {
            return getActivityContext(servletContext);
        }
    }
734933
public void start(BundleContext context) throws Exception
    {
        this.log(context, LogService.LOG_INFO, "Starting and registering the (repository) " + this.getClass().getName() + " ClassService ");
        
        bundleContext = context;

        if (context != null)
            context.registerService(ClassFinder.class.getName(), this, null);	// Should be only one of these
    }
378290
protected final void configureWebAppContext(WebAppContext context,
			ServletContextInitializer... initializers) {
		Assert.notNull(context, "Context must not be null");
		context.setTempDirectory(getTempDirectory());
		if (this.resourceLoader != null) {
			context.setClassLoader(this.resourceLoader.getClassLoader());
		}
		String contextPath = getContextPath();
		context.setContextPath(StringUtils.hasLength(contextPath) ? contextPath : "/");
		context.setDisplayName(getDisplayName());
		configureDocumentRoot(context);
		if (isRegisterDefaultServlet()) {
			addDefaultServlet(context);
		}
		if (shouldRegisterJspServlet()) {
			addJspServlet(context);
			context.addBean(new JasperInitializer(context), true);
		}
		addLocaleMappings(context);
		ServletContextInitializer[] initializersToUse = mergeInitializers(initializers);
		Configuration[] configurations = getWebAppContextConfigurations(context,
				initializersToUse);
		context.setConfigurations(configurations);
		context.setThrowUnavailableOnStartupException(true);
		configureSession(context);
		postProcessWebAppContext(context);
	}
190104
public static JndiConfigurationSource create(Context context) {
    if (context == null) {
      throw new NullPointerException("context: null");
    }
    return new JndiConfigurationSource(createJndiConfiguration(context, null), DEFAULT_PRIORITY);
  }
472151
public ZooActionBuilder withApplicationContext(ApplicationContext ctx) {
        this.applicationContext = ctx;

        if (applicationContext.containsBean("zookeeperClient")) {
            action.setZookeeperClient(applicationContext.getBean("zookeeperClient", ZooClient.class));
        }

        if (applicationContext.containsBean("zookeeperCommandResultMapper")) {
            action.setJsonMapper(applicationContext.getBean("zookeeperCommandResultMapper", ObjectMapper.class));
        }

        return this;
    }
1149299
public synchronized void start(StartContext context) throws StartException {
        Logger.getLogger("org.mobicents.as7").debug("SipConnectorService.start(), protocol = " + protocol + " - scheme = " + scheme);
        final SocketBinding binding = this.binding.getValue();
        final InetSocketAddress address = binding.getSocketAddress();
        final Executor executor = this.executor.getOptionalValue();
        try {
            // Create connector
            final Connector connector = new Connector(SipProtocolHandler.class.getName());
            connector.setPort(address.getPort());
            connector.setScheme(scheme);
            SipConnector sipConnector = new SipConnector();
            sipConnector.setIpAddress(address.getAddress().getHostAddress());
            sipConnector.setPort(address.getPort());
            // https://github.com/Mobicents/sip-servlets/issues/44 support multiple connectors
            sipConnector.setTransport(binding.getName().substring(binding.getName().lastIndexOf("sip-")+("sip-".length())));
            sipConnector.setUseLoadBalancer(useLoadBalancer);
            sipConnector.setLoadBalancerAddress(loadBalancerAddress);
            sipConnector.setLoadBalancerRmiPort(loadBalancerRmiPort);
            sipConnector.setLoadBalancerSipPort(loadBalancerSipPort);
            sipConnector.setUseStaticAddress(useStaticAddress);
            sipConnector.setStaticServerAddress(staticServerAddress);
            sipConnector.setStaticServerPort(staticServerPort);
            sipConnector.setUseStun(useStun);
            sipConnector.setStunServerAddress(stunServerAddress);
            sipConnector.setStunServerPort(stunServerPort);
            sipConnector.setHostNames(hostNames);
            Logger.getLogger("org.mobicents.as7").debug("SipConnectorService.start(), address = " + address.getAddress().getHostAddress() + " - port = " + address.getPort() + " - transport = " + sipConnector.getTransport());
            Logger.getLogger("org.mobicents.as7").debug("SipConnectorService.start(), hostnames = " + hostNames);
            SipProtocolHandler sipProtocolHandler = (SipProtocolHandler) connector.getProtocolHandler();
            sipProtocolHandler.setSipConnector(sipConnector);
            if (enableLookups != null)
                connector.setEnableLookups(enableLookups);
            if (maxPostSize != null)
                connector.setMaxPostSize(maxPostSize);
            if (maxSavePostSize != null)
                connector.setMaxSavePostSize(maxSavePostSize);
            if (proxyName != null)
                connector.setProxyName(proxyName);
            if (proxyPort != null)
                connector.setProxyPort(proxyPort);
            if (redirectPort != null)
                connector.setRedirectPort(redirectPort);
            if (secure != null)
                connector.setSecure(secure);
            // TODO set Executor on ProtocolHandler
            // TODO use server socket factory - or integrate with {@code ManagedBinding}

            getSipServer().addConnector(connector); 
            
            connector.init();
            connector.start();
            this.connector = connector;
        } catch (Exception e) {
            throw new StartException(MESSAGES.connectorStartError(), e);
        }
        // Register the binding after the connector is started
        binding.getSocketBindings().getNamedRegistry().registerBinding(new ConnectorBinding(binding));
        //notify SipServer only when connector has already been added/started
        getSipServer().connectorAdded(connector);
    }
380148
public static <T> SchedulableActionContext<T> unschedulableActionContext(
	    final SchedulableActionContext<T> context) {
	return new UnschedulableDelegateActionContext<>(Objects.requireNonNull(context));
    }
1359693
@Override
	public void start(BundleContext context) throws Exception {

		System.out.println("******************************** WebsocketActivator STARTUP **********************************");

		Config config = new Config();
		config.setProperty(GroupProperties.PROP_VERSION_CHECK_ENABLED, "false");
		config.getNetworkConfig().getJoin().getMulticastConfig().setEnabled(true);

		hazelcastNode = Hazelcast.newHazelcastInstance(config);
		hazelcastTopic = hazelcastNode.getTopic("cloud");
		hazelcastTopic.addMessageListener(new MessageListener<Object>() {

			public void onMessage(Message<Object> arg0) {
				publishToAll(arg0.getMessageObject().toString());
			}
		});

	}