/*
(non-Javadoc)
@see org.springframework.beans.factory.InitializingBean#afterPropertiesSet()
519480
@Override
	public void afterPropertiesSet() {

		if (this.mappingContext == null) {
			this.mappingContext = new SimpleSolrMappingContext(
					new SolrPersistentEntitySchemaCreator(this.solrClientFactory).enable(this.schemaCreationFeatures));
		}

		if (this.solrConverter == null) {
			this.solrConverter = getDefaultSolrConverter();
		}

		this.queryParsers = new QueryParsers(this.mappingContext);
		registerPersistenceExceptionTranslator();
	}
775317
public function afterImport()
    {
        $obj = Craft::$app->globals;
        $refObject = new \ReflectionObject($obj);
        if ($refObject->hasProperty('_allGlobalSets')) {
            $refProperty1 = $refObject->getProperty('_allGlobalSets');
            $refProperty1->setAccessible(true);
            $refProperty1->setValue($obj, null);
        }
    }
169771
public void initBeans(Object[] beans) {
        this.controllers = Arrays.stream(beans).filter(bean -> this.getController(bean) != null).map(bean -> this.getController(bean)).collect(Collectors.toList());
    }
696839
@Override
	public void setBean(final Object bean) {
		BeanAndProviderBoundComponentModel model = getOrCreateComponentModel();
		model.setBean(bean);

		if (getBeanProperty() == null) {
			setBeanProperty(".");
		}
		// Remove values in scratch map
		removeBeanFromScratchMap();
	}
1240954
public void afterPropertiesSet() {
        for (Properties properties : propertiesArray) {
            if (properties instanceof ReloadableProperties) {
                logger.debug("add property listener: " + properties.toString());
                ((ReloadableProperties) properties).addReloadablePropertiesListener(this);
            }
        }
    }
522774
@Override
    public Object postProcessAfterInitialization(Object bean, String beanName) {

        // throws BeansException {

        if (bean instanceof VLDockingViewDescriptor) {
            return bean;
        } else if (bean instanceof ViewDescriptor) {
            final ViewDescriptor sourceViewDescriptor = (ViewDescriptor) bean;
            final ViewDescriptor targetViewDescriptor = this.getTemplate(sourceViewDescriptor);

            // Copy source state
            ObjectUtils.shallowCopy(sourceViewDescriptor, targetViewDescriptor);

            return targetViewDescriptor;
        }

        return bean;
    }
57341
public void afterPropertiesSet() throws Exception {
        if (loginService == null) {
            loginService = new SimpleLoginService();
            ((SimpleLoginService) loginService).setName(realm);
        }
    }
418606
@SuppressWarnings({ "unchecked", "rawtypes" })
	public void set(String fieldName, Object value) throws BeanException{
		if(Map.class.isAssignableFrom(beanClass)){
			((Map)bean).put(fieldName, value);
			return;
		}else{
			try {
				final Method setter = BeanUtil.getBeanDesc(beanClass).getSetter(fieldName);
				if(null == setter){
					throw new BeanException("No set method for {}", fieldName);
				}
				setter.invoke(this.bean, value);
			} catch (Exception e) {
				throw new BeanException(e);
			}
		}
	}
485828
@Override
    public void afterClassLoad(Class<?> clazz) {
        super.afterClassLoad(clazz);
        //force <clinit> to be run, while the correct ThreadLocal is set
        //if we do not run this then <clinit> may be run later, perhaps even in
        //another thread
        try {
            Class.forName(clazz.getName(), true, clazz.getClassLoader());
        } catch (ClassNotFoundException e) {
            throw new RuntimeException(e);
        }
    }
1367181
public void afterConstructor(PageContext pc, Variables parent) throws ApplicationException {
	pc.setVariablesScope(parent);
	this.afterConstructor = true;

	/*
	 * if(constructorUDFs!=null){ Iterator<Entry<Key, UDF>> it = constructorUDFs.entrySet().iterator();
	 * Map.Entry<Key, UDF> entry; Key key; UDFPlus udf; PageSource ps; while(it.hasNext()){
	 * entry=it.next(); key=entry.getKey(); udf=(UDFPlus) entry.getValue(); ps=udf.getPageSource();
	 * //if(ps!=null && ps.equals(getPageSource()))continue; // TODO can we avoid that udfs from the
	 * component itself are here? registerUDF(key, udf,false,true); } }
	 */
    }
1197631
private void processProperties(XMLStreamWriter writer, Set<Method> methodSet, Class<?> aClass) throws IntrospectionException, XMLStreamException
   {
      BeanInfo beanInfo = Introspector.getBeanInfo(aClass, aClass.getSuperclass());
      PropertyDescriptor[] propertyDescriptors = beanInfo.getPropertyDescriptors();

      for (int i = 0; i < propertyDescriptors.length; i++)
      {
         PropertyDescriptor propertyDescriptor = propertyDescriptors[i];
         if (propertyDescriptor.getPropertyType() != null)
         {
            String name = propertyDescriptor.getName();
            Method readMethod = propertyDescriptor.getReadMethod();
            Method writeMethod = propertyDescriptor.getWriteMethod();

            String readMethodName = readMethod == null ? null : readMethod.getName();
            String writeMethodName = writeMethod == null ? null : writeMethod.getName();
            addProperty(writer, name, propertyDescriptor.getPropertyType(), readMethodName, writeMethodName);

            if (readMethod != null)
            {
               methodSet.add(readMethod);
            }

            if (writeMethod != null)
            {
               methodSet.add(writeMethod);
            }
         }
         else
         {
            processAmbiguousProperty(writer, methodSet, aClass, propertyDescriptor);
         }
      }
   }
180006
public void afterPropertiesSet() throws Exception {
        // Ensure that all post-processors requested are registered
        String[] actions = StringUtils.commaDelimitedListToStringArray( getPostProcessorActionsToRun() );
        for( int i = 0; i < actions.length; i++ ) {
            if( !postProcessorActionIds.contains( actions[i] ) ) {
                throw new IllegalArgumentException( "Requested post-processor action '" + actions[i]
                        + "' is not registered." );
            }
        }
    }
182880
public void afterPropertiesSet() throws IOException {
        Map<String, String> finalConfig = new HashMap<String, String>();
        if (systemPropertyMode == SystemPropertyMode.MODE_FALLBACK) {
            finalConfig.putAll(lookupSystemProperties());
        }
        if (config != null) {
            finalConfig.putAll(config.getConfig());
        }
        if (lookupConfig) {
            // Merge all configs in the context in the reverse order
            Map<String, SpringJolokiaConfigHolder> configsMap = context.getBeansOfType(SpringJolokiaConfigHolder.class);
            List<SpringJolokiaConfigHolder> configs = new ArrayList<SpringJolokiaConfigHolder>(configsMap.values());
            Collections.sort(configs, new OrderComparator());
            for (SpringJolokiaConfigHolder c : configs) {
                if (c != config) {
                    finalConfig.putAll(c.getConfig());
                }
            }
        }
        if (systemPropertyMode == SystemPropertyMode.MODE_OVERRIDE) {
            finalConfig.putAll(lookupSystemProperties());
        }
        String autoStartS = finalConfig.remove("autoStart");
        boolean autoStart = true;
        if (autoStartS != null) {
            autoStart = Boolean.parseBoolean(autoStartS);
        }
        init(new JolokiaServerConfig(finalConfig),false);
        if (autoStart) {
            start();
        }
    }
487561
@Override
    public void afterPropertiesSet() throws Exception {
        // create the nio acceptor
        acceptor = new NioSocketAcceptor(Runtime.getRuntime().availableProcessors() * 4);
        acceptor.addListener(new IoServiceListener() {

            @Override
            public void serviceActivated(IoService service) throws Exception {
                //log.debug("serviceActivated: {}", service);
            }

            @Override
            public void serviceIdle(IoService service, IdleStatus idleStatus) throws Exception {
                //logger.debug("serviceIdle: {} status: {}", service, idleStatus);
            }

            @Override
            public void serviceDeactivated(IoService service) throws Exception {
                //log.debug("serviceDeactivated: {}", service);
            }

            @Override
            public void sessionCreated(IoSession session) throws Exception {
                log.debug("sessionCreated: {}", session);
                //log.trace("Acceptor sessions: {}", acceptor.getManagedSessions());
            }

            @Override
            public void sessionClosed(IoSession session) throws Exception {
                log.debug("sessionClosed: {}", session);
            }

            @Override
            public void sessionDestroyed(IoSession session) throws Exception {
                //log.debug("sessionDestroyed: {}", session);
            }

        });
        // configure the acceptor
        SocketSessionConfig sessionConf = acceptor.getSessionConfig();
        sessionConf.setReuseAddress(true);
        sessionConf.setTcpNoDelay(true);
        sessionConf.setSendBufferSize(sendBufferSize);
        sessionConf.setReadBufferSize(receiveBufferSize);
        // prevent the background blocking queue
        sessionConf.setUseReadOperation(false);
        // seconds
        sessionConf.setWriteTimeout(writeTimeout);
        // set an idle time in seconds
        if (idleTimeout > 0) {
            sessionConf.setIdleTime(IdleStatus.BOTH_IDLE, idleTimeout);
        }
        // close sessions when the acceptor is stopped
        acceptor.setCloseOnDeactivation(true);
        // requested maximum length of the queue of incoming connections
        acceptor.setBacklog(64);
        acceptor.setReuseAddress(true);
        // instance the websocket handler
        if (ioHandler == null) {
            ioHandler = new WebSocketHandler();
        }
        log.trace("I/O handler: {}", ioHandler);
        acceptor.setHandler(ioHandler);
        DefaultIoFilterChainBuilder chain = acceptor.getFilterChain();
        // if handling wss init the config
        SslFilter sslFilter = null;
        if (secureConfig != null) {
            try {
                sslFilter = secureConfig.getSslFilter();
                chain.addFirst("sslFilter", sslFilter);
            } catch (Exception e) {
                log.warn("SSL configuration failed, websocket will not be secure", e);
            }
        }
        if (log.isTraceEnabled()) {
            chain.addLast("logger", new LoggingFilter());
        }
        // add the websocket codec factory
        chain.addLast("protocol", new ProtocolCodecFilter(new WebSocketCodecFactory()));
        if (addresses.isEmpty()) {
            if (sslFilter != null) {
                log.info("WebSocket (wss) will be bound to port {}", port);
            } else {
                log.info("WebSocket (ws) will be bound to port {}", port);
            }
            acceptor.bind(new InetSocketAddress(port));
        } else {
            if (sslFilter != null) {
                log.info("WebSocket (wss) will be bound to {}", addresses);
            } else {
                log.info("WebSocket (ws) will be bound to {}", addresses);
            }
            try {
                // loop through the addresses and bind
                Set<InetSocketAddress> socketAddresses = new HashSet<InetSocketAddress>();
                for (String addr : addresses) {
                    if (addr.indexOf(':') != -1) {
                        String[] parts = addr.split(":");
                        socketAddresses.add(new InetSocketAddress(parts[0], Integer.valueOf(parts[1])));
                    } else {
                        socketAddresses.add(new InetSocketAddress(addr, port));
                    }
                }
                log.debug("Binding to {}", socketAddresses.toString());
                acceptor.bind(socketAddresses);
            } catch (Exception e) {
                log.warn("Exception occurred during resolve / bind", e);
            }
        }
        log.info("Started {} websocket transport. Timeouts - idle: {} write: {}", (isSecure() ? "secure" : ""), idleTimeout, writeTimeout);
        if (log.isDebugEnabled()) {
            log.debug("Acceptor sizes - send: {} recv: {}", acceptor.getSessionConfig().getSendBufferSize(), acceptor.getSessionConfig().getReadBufferSize());
        }
    }
1063015
@Override
	public void afterPropertiesSet() {

		if (this.config.isUseGeneratorCache()) {

			CachedGenerator annotation = getClass().getAnnotation(CachedGenerator.class);
			if (annotation != null) {
				useCache = true;
				name = annotation.name();
				cacheMappingFileName = annotation.mappingFileName();
				cacheDirectory = annotation.cacheDirectory();
				if (!cacheDirectory.endsWith(URL_SEPARATOR)) {
					cacheDirectory = cacheDirectory + URL_SEPARATOR;
				}
				cacheMode = annotation.mode();

				loadCacheMapping();

				// reset cache if invalid
				if (!isCacheValid()) {

					if (LOGGER.isDebugEnabled()) {
						LOGGER.debug("Cache of " + getName() + " generator is invalid. Reset cache...");
					}
					resetCache();
				}
			}
		}
	}
980808
@Override
	public void afterPropertiesSet() throws Exception {
		if (this.requestFactory == null) {
			SimpleClientHttpRequestFactory requestFactory = new SimpleClientHttpRequestFactory();
			requestFactory.setConnectTimeout(1000);
			requestFactory.setReadTimeout(3000);
			this.requestFactory = requestFactory;
		}

		template = new RestTemplate(this.requestFactory);
		template.setMessageConverters(Arrays.asList(requestConverter, responseConverter));

		if (locationUpdaterEnabled) {
			Runnable worker = new Runnable() {
				@Override
				public void run() {
					updateMembers();
				}
			};
			locationUpdater.scheduleAtFixedRate(worker, 5000, 5000, TimeUnit.MILLISECONDS);
		}
	}
410940
private void afterSet(E element) {
        switch(_lastCall) {
            case NEXT:
                _previousNode = _stack.getListNode(_lastId);
                break;
            case PREVIOUS:
                _nextNode = _stack.getListNode(_lastId);
                break;
            default:
                throw new IllegalStateException();
        }
    }