enables sharing of common settings if publishing also as websocket service
@return
165245
public WebSocketPublisher toWS() {
        return new WebSocketPublisher()
            .coding(coding)
            .facade(facade)
            .hostName(hostName)
            .port(port)
            .urlPath(urlPath);
    }
408417
protected static I_CmsPublishServiceAsync getService() {

        if (SERVICE == null) {
            SERVICE = GWT.create(I_CmsPublishService.class);
            String serviceUrl = CmsCoreProvider.get().link("org.opencms.ade.publish.CmsPublishService.gwt");
            ((ServiceDefTarget)SERVICE).setServiceEntryPoint(serviceUrl);
        }
        return SERVICE;
    }
245341
public ClientConfiguration createClientConfiguration() {
        return ClientConfiguration.builder(buildTimeSeriesUrl(), username, password)
                .connectTimeoutMillis(connectTimeoutMillis)
                .readTimeoutMillis(readTimeoutMillis)
                .pingTimeoutMillis(pingTimeoutMillis)
                .ignoreSSLErrors(ignoreSSLErrors)
                .skipStreamingControl(skipStreamingControl)
                .enableBatchCompression(enableGzipCompression)
                .userAgent(userAgent)
                .build();
    }
1001461
@Override
    public void setShareDurableSubscription(Boolean shareDurSubs) {
        if (shareDurSubs)
            setShareDurableSubscriptions(ApiJmsConstants.SHARED_DSUBS_ALWAYS);
        else
            setShareDurableSubscriptions(ApiJmsConstants.SHARED_DSUBS_NEVER);
    }
1205537
public static HttpClientContext newClientContext(HttpClientSettings settings,
                                                     Map<String, ? extends Object>
                                                             attributes) {
        final HttpClientContext clientContext = new HttpClientContext();

        if (attributes != null && !attributes.isEmpty()) {
            for (Map.Entry<String, ?> entry : attributes.entrySet()) {
                clientContext.setAttribute(entry.getKey(), entry.getValue());
            }
        }

        addPreemptiveAuthenticationProxy(clientContext, settings);

        clientContext.setAttribute(HttpContextUtils.DISABLE_SOCKET_PROXY_PROPERTY, settings.disableSocketProxy());
        return clientContext;

    }
1076980
@WithBridgeMethods(value = MySQLQuery.class, castRequired = true)
    public C lockInShareMode() {
        return addFlag(Position.END, LOCK_IN_SHARE_MODE);
    }
988256
public final ClientSocketFactory getLoadBalanceSocketPool()
  {
    ClientSocketFactory factory = getLoadBalanceSocketFactory();
    
    if (factory == null)
      return null;
    
    if (_serverBartender.getState().isDisableSoft()) {
      factory.enableSessionOnly();
    }
    else if (_serverBartender.getState().isDisabled()){
      // server/269g
      factory.disable();
    }
    else {
      factory.enable();
    }
    
    return factory;
  }
313633
public RestBuilder enableCors() {

		Set<String> allowedHeaders = new HashSet<>();
		allowedHeaders.add("Access-Control-Allow-Origin");
		//allowedHeaders.add("Access-Control-Allow-Credentials");
		allowedHeaders.add("Access-Control-Allow-Headers");
		allowedHeaders.add("Access-Control-Allow-Methods");
		allowedHeaders.add("Access-Control-Expose-Headers");
		allowedHeaders.add("Access-Control-Request-Method");
		allowedHeaders.add("Access-Control-Request-Headers");
		//allowedHeaders.add("Access-Control-Max-Age");
		allowedHeaders.add("Origin");
		return enableCors("*", false, -1, allowedHeaders);
	}
417130
public Service setSupportedServiceProfiles(Iterable<ServiceProfile> profiles)
    {
        if (profiles == null)
        {
            this.supportedServiceProfiles = null;

            return this;
        }

        Set<ServiceProfile> set = new TreeSet<ServiceProfile>();

        for (ServiceProfile profile : profiles)
        {
            if (profile != null)
            {
                set.add(profile);
            }
        }

        int size = set.size();

        if (size == 0)
        {
            this.supportedServiceProfiles = null;

            return this;
        }

        ServiceProfile[] array = new ServiceProfile[size];
        this.supportedServiceProfiles = set.toArray(array);

        return this;
    }
520132
private TopicSubscriber createDurableSubscriber(Topic topic, String name, String messageSelector, boolean noLocal, boolean isSharedDurable, boolean isNonSharedDurable) throws JMSException {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(this, tc, "createDurableSubscriber", new Object[] { topic, name, messageSelector, noLocal, isSharedDurable, isNonSharedDurable });

        checkNotClosed();
        if (topic == null) {
            throw (InvalidDestinationException) JmsErrorUtils.newThrowable(InvalidDestinationException.class,
                                                                           "INVALID_VALUE_CWSIA0048",
                                                                           new Object[] { "Topic", "null" },
                                                                           tc
                            );
        }

        if ((name == null) || ("".equals(name))) {
            throw (InvalidDestinationException) JmsErrorUtils.newThrowable(InvalidDestinationException.class,
                                                                           "INVALID_VALUE_CWSIA0048",
                                                                           new Object[] { "name", name },
                                                                           tc
                            );
        }

        // Check that this is not a foreign implementation.
        // Note that in some situations this method call can return a _different_
        // destination than the one passed in as the parameter (e.g. Spring).
        JmsDestinationImpl nativeDest = JmsDestinationImpl.checkNativeInstance(topic);

        // Check that this destination is not blocked
        JmsDestinationImpl.checkBlockedStatus(nativeDest);

        //client ID check should be there for only for non-shared. For shared client ID should be optional
        String clientID = connection.getClientID();
        if (isNonSharedDurable) {
            if ((clientID == null) || ("".equals(clientID))) {
                throw (IllegalStateException) JmsErrorUtils.newThrowable(IllegalStateException.class,
                                                                         "INVALID_VALUE_CWSIA0048",
                                                                         new Object[] { "clientID", clientID },
                                                                         tc
                                );
            }
        }

        // Look up the subscription home that was set on the ConnectionFactory
        // at the point when the Connection was created.
        String durSubHome = (String) passThruProps.get(JmsraConstants.DURABLE_SUB_HOME);
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
            SibTr.debug(this, tc, "DurableSubHome : " + durSubHome);

        // We demand that if durable subscriptions are being used then the user
        // must have specified a durable subscription home on the ConnectionFactory
        // before they create the connection.
        if ((durSubHome == null) || ("".equals(durSubHome))) {
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                SibTr.debug(this, tc, "User Error - No durableSubscriptionHome was specified.");
            throw (javax.jms.IllegalStateException) JmsErrorUtils.newThrowable(javax.jms.IllegalStateException.class,
                                                                               "DURABLE_SUB_HOME_NOT_SPECIFIED_CWSIA0056",
                                                                               null,
                                                                               tc
                            );
        }

        // Now determine whether or not we are running in a cloned environment.
        String sharedSubs = (String) passThruProps.get(JmsInternalConstants.SHARE_DSUBS);
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
            SibTr.debug(this, tc, "shareDurableSubs: " + sharedSubs);
        boolean supportsMultiple = false;
        if ((sharedSubs == null)
            || ("".equals(sharedSubs))
            || (ApiJmsConstants.SHARED_DSUBS_IN_CLUSTER.equals(sharedSubs))) {
            // The application asked us to work it out for ourselves (default)
            boolean isCloned = JmsConnectionImpl.isClonedServer();
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                SibTr.debug(this, tc, "isClonedServer: " + isCloned);
            // Pass the cloned state in as the instruction to support
            // multiple consumers on this durable subscription.
            supportsMultiple = isCloned;
        }
        else if (ApiJmsConstants.SHARED_DSUBS_ALWAYS.equals(sharedSubs)) {
            // The application stated explicitly it wants to share.
            supportsMultiple = true;
        }
        else {
            // The safe behaviour is to not support multiple consumers.
            supportsMultiple = false;
        }

        //if the call is made from createSharedDurableConsumer, set supportsMultiple to true
        //otherwise leaving the property as it is
        if (isSharedDurable)
            supportsMultiple = true;

        //if the call is made from CreateSharedConsumer i.e non-shared durable then
        //set supportsMultiple to false, otherwise leaving the property as it is
        if (isNonSharedDurable)
            supportsMultiple = false;

        // Create the consumer properties object filling in as much information
        // as we have available at the moment.
        ConsumerProperties newProps = new ConsumerProperties(nativeDest,
                        null, // DestType                filled in later
                        messageSelector, // Selector
                        null, // Reliability             filled in later
                        false, // ReadAhead               filled in later
                        true, // RecovExpress            filled in later
                        noLocal, // NoLocal
                        name, // SubName
                        clientID, // ClientID
                        supportsMultiple,// SupportMultiple
                        durSubHome // DurableSubscriptionHome
        );

        TopicSubscriber durableSubscriber = new JmsDurableSubscriberImpl(coreConnection, this, newProps);
        // newly created consumer is synchronous
        syncConsumers.add(durableSubscriber);

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(this, tc, "createDurableSubscriber", durableSubscriber);
        return durableSubscriber;
    }
1044147
public void setSharedSet(com.google.api.ads.adwords.axis.v201809.cm.SharedSet sharedSet) {
        this.sharedSet = sharedSet;
    }
161744
@Override
    public void initWithNiwsConfig(IClientConfig clientConfig) {
        if (clientConfig == null) {
            return;
        }

        if (clientConfig.getOrDefault(CommonClientConfigKey.TrustStore) != null) {
            throw new IllegalArgumentException("Client configured with an AcceptAllSocketFactory cannot utilize a truststore");
        }
    }
47667
public R setSharedLink(BoxSharedLink sharedLink) {
        mBodyMap.put(BoxItem.FIELD_SHARED_LINK, sharedLink);
        return (R) this;
    }
366703
@Override
	public synchronized WComponent getUI(final Object httpServletRequest) {
		String configuredUIClassName = getComponentToLaunchClassName();

		if (sharedUI == null || !Util.equals(configuredUIClassName, uiClassName)) {
			uiClassName = configuredUIClassName;
			WComponent ui = createUI();

			if (ui instanceof WApplication) {
				sharedUI = (WApplication) ui;
			} else {
				LOG.warn(
						"Top-level component should be a WApplication."
						+ " Creating WApplication wrapper...");

				sharedUI = new WApplication();
				ui.setLocked(false);
				sharedUI.add(ui);
				sharedUI.setLocked(true);
			}

			if (ConfigurationProperties.getLdeServerShowMemoryProfile()) {
				ProfileContainer profiler = new ProfileContainer();

				sharedUI.setLocked(false);
				sharedUI.add(profiler);
				sharedUI.setLocked(true);
			}
		}

		return sharedUI;
	}
317581
public JwwfServer startAndJoin() {
		try {
			server.start();
			server.join();
		} catch (Exception e) {
			e.printStackTrace();
		}
		return this;
	}
638704
public SSLSocket getSSLSocket() throws KeystoreException, CommunicationException {
		SSLSocketFactory socketFactory = getSSLSocketFactory();
		logger.debug("Creating SSLSocket to " + getServerHost() + ":" + getServerPort());

		try {
			if (ProxyManager.isUsingProxy(server)) {
				return tunnelThroughProxy(socketFactory);
			} else {
				return (SSLSocket) socketFactory.createSocket(getServerHost(), getServerPort());
			}
		} catch (Exception e) {
			throw new CommunicationException("Communication exception: " + e, e);
		}
	}
206040
@Override
	public WebsocketSender uri(String uri) {
		return new WebsocketFinalizer(cachedConfiguration.bootstrap(b -> HttpClientConfiguration.uri(b, uri)));
	}