The server lifecycle bean for netty based server.

@param factory The factory used to create the lifecycle.
@return The inter-process server lifecycle bean.
346011
@ConditionalOnMissingBean
    @ConditionalOnClass(name = {"io.netty.channel.Channel", "io.grpc.netty.NettyServerBuilder"})
    @Bean
    public GrpcServerLifecycle nettyGrpcServerLifecycle(final NettyGrpcServerFactory factory) {
        return new GrpcServerLifecycle(factory);
    }
703963
public static String getFactoryName(String type,
			ConfigurableListableBeanFactory beanFactory) {
		String[] factoryNames = BeanFactoryUtils.beanNamesForTypeIncludingAncestors(
				beanFactory, EnvironmentRepositoryFactory.class, true, false);
		return Arrays.stream(factoryNames).filter(n -> n.startsWith(type)).findFirst()
				.orElse(null);
	}
1177055
private SSLServerSocketFactory getServerSocketFactory(String id) throws IOException {
        // first use?
        SSLServerSocketFactory serverSocketFactory = serverSocketFactoryMap.get(id);
        if (serverSocketFactory == null) {
            // the SSLConfig is optional, so if it's not there, use the default SSLSocketFactory.
            if (id == null) {
                serverSocketFactory = (SSLServerSocketFactory) SSLServerSocketFactory.getDefault();
            } else {
                try {
                    serverSocketFactory = sslConfig.createSSLServerFactory(id);
                } catch (Exception e) {
                    Tr.error(tc, "Unable to create server SSL socket factory", e);
                    throw (IOException) new IOException("Unable to create server SSL socket factory: " + e.getMessage()).initCause(e);
                }
                serverSocketFactoryMap.put(id, serverSocketFactory);
            }
            // There's a bit of a timing problem with server-side ORBs.  Part of the ORB shutdown is to
            // establish a self-connection to shutdown the acceptor threads.  This requires a client
            // SSL socket factory.  Unfortunately, if this is occurring during server shutdown, the
            // FileKeystoreManager will get a NullPointerException because some name queries fail because
            // things are getting shutdown.  Therefore, if we need the server factory, assume we'll also
            // need the client factory to shutdown, and request it now.
            getSocketFactory(id);
        }
        return serverSocketFactory;
    }
1054791
public RestTemplateBuilder requestFactory(
			Class<? extends ClientHttpRequestFactory> requestFactory) {
		Assert.notNull(requestFactory, "RequestFactory must not be null");
		return requestFactory(() -> createRequestFactory(requestFactory));
	}
656300
protected Object createMyInstance() throws IOException {
        // would like to uninherit from AbstractFactoryBean (but it's final!)
        if (!isSingleton()) {
            throw new RuntimeException("ReloadablePropertiesFactoryBean only works as singleton");
        }

        // set listener
        reloadableProperties = new ReloadablePropertiesImpl();
        if (preListeners != null) {
            reloadableProperties.setListeners(preListeners);
        }

        // reload
        reload(true);

        // add for monitor
        ReloadConfigurationMonitor.addReconfigurableBean((ReconfigurableBean) reloadableProperties);

        return reloadableProperties;
    }
446748
static public ContentHandleFactory newFactory() {
    return new ContentHandleFactory() {
      @Override
      public Class<?>[] getHandledClasses() {
        return new Class<?>[]{ JsonNode.class };
      }
      @Override
      public boolean isHandled(Class<?> type) {
        return JsonNode.class.isAssignableFrom(type);
      }
      @Override
      public <C> ContentHandle<C> newHandle(Class<C> type) {
        @SuppressWarnings("unchecked")
        ContentHandle<C> handle = isHandled(type) ?
                                  (ContentHandle<C>) new JacksonHandle() : null;
        return handle;
      }
    };
  }
563338
public Object get(String name, ObjectFactory<?> factory) {
		ThreadScopeContext context = ThreadScopeContextHolder.getContext();

		Object result = context.getBean(name);
		if (null == result) {
			result = factory.getObject();
			context.setBean(name, result);
		}
		return result;
	}
516257
private Lifecycle _getLifecycle(FacesContext facesContext)
    {
        LifecycleFactory factory = (LifecycleFactory) FactoryFinder.getFactory(FactoryFinder.LIFECYCLE_FACTORY);
        String id = facesContext.getExternalContext().getInitParameter(FacesServlet.LIFECYCLE_ID_ATTR);
        if (id == null)
        {
            id = LifecycleFactory.DEFAULT_LIFECYCLE;
        }
        return factory.getLifecycle(id);  
    }
1152444
@Override
	protected void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) {
		beanFactory.addBeanPostProcessor(
				new WebApplicationContextServletContextAwareProcessor(this));
		beanFactory.ignoreDependencyInterface(ServletContextAware.class);
		registerWebApplicationScopes();
	}
1278259
public static WebSocketFactory createWebSocketFactory() {
        Class<WebSocketFactory>         clazz = WebSocketFactory.class;
        ServiceLoader<WebSocketFactory> loader = ServiceLoader.load(clazz);
        return loader.iterator().next();    
    }
539238
public ProductFactoryCascade<T> addFactoryBefore(ProductFactory<? extends T> factory) {
		ArrayList<ProductFactory<? extends T>> factories = new ArrayList<ProductFactory<? extends T>>(this.factories.size()+1);
		factories.addAll(this.factories);
		factories.add(0, factory);
		return new ProductFactoryCascade<>(factories);
	}
199838
public FacesConfigFactoryType<WebFacesConfigDescriptor> getOrCreateFactory()
   {
      List<Node> nodeList = model.get("factory");
      if (nodeList != null &&  nodeList.size() > 0)
      {
         return new FacesConfigFactoryTypeImpl<WebFacesConfigDescriptor>(this, "factory", model, nodeList.get(0));
      }
      return createFactory();
   }
873785
public B contentPreviewerFactory(ContentPreviewerFactory factory) {
        requireNonNull(factory, "factory");
        requestContentPreviewerFactory(factory);
        responseContentPreviewerFactory(factory);
        return self();
    }
710160
public static javax.net.SocketFactory getDefault() {
        if (tc.isEntryEnabled())
            Tr.entry(tc, "getDefault");

        if (thisClass == null) {
            try {
                thisClass = new com.ibm.ws.ssl.protocol.LibertySSLSocketFactory();
            } catch (Exception e) {
                if (tc.isDebugEnabled())
                    Tr.debug(tc, "SSLSocketFactory exception getting default socket factory.", new Object[] { e });
                FFDCFilter.processException(e, "SSLSocketFactory", "getDefault", thisClass);
            }
        }

        if (tc.isEntryEnabled())
            Tr.exit(tc, "getDefault");
        return thisClass;
    }
301856
public ClientFactory build() {
        final Function<? super EventLoopGroup,
                       ? extends AddressResolverGroup<? extends InetSocketAddress>> addressResolverGroupFactory;
        if (this.addressResolverGroupFactory != null) {
            addressResolverGroupFactory = this.addressResolverGroupFactory;
        } else {
            addressResolverGroupFactory = new DefaultAddressResolverGroupFactory(
                    firstNonNull(domainNameResolverCustomizers, ImmutableList.of()));
        }

        return new DefaultClientFactory(new HttpClientFactory(
                workerGroup, shutdownWorkerGroupOnClose, channelOptions, sslContextCustomizer,
                addressResolverGroupFactory, http2InitialConnectionWindowSize, http2InitialStreamWindowSize,
                http2MaxFrameSize, http2MaxHeaderListSize, http1MaxInitialLineLength, http1MaxHeaderSize,
                http1MaxChunkSize, idleTimeoutMillis, useHttp2Preface,
                useHttp1Pipelining, connectionPoolListener, meterRegistry));
    }
1258732
public Bean<T> create() {
        if (!passivationCapable) {
            return new ImmutableBean<T>(beanClass, name, qualifiers, scope, stereotypes, types, alternative, nullable, injectionPoints, beanLifecycle, toString);
        } else {
            return new ImmutablePassivationCapableBean<T>(id, beanClass, name, qualifiers, scope, stereotypes, types, alternative, nullable, injectionPoints, beanLifecycle, toString);
        }
    }
705096
public T build() {
        C clientObject = client;
        if (clientObject == null) {
            clientObject = createClient();
        }

        return factory.create(clientObject);
    }