/** * {@inheritDoc} */ @Override public Object applyProcessors(Object object) throws MuleException { return muleContext.getInjector().inject(object); }
private void initSessionHandler() throws InitialisationException { try { sessionHandler = muleContext.getInjector().inject(sessionHandler); } catch (MuleException e) { throw new InitialisationException(e, this); } }
@Override public void initialise() throws InitialisationException { try { muleContext.getInjector().inject(executorDelegate); } catch (MuleException e) { throw new InitialisationException( createStaticMessage("Could not perform dependency injection on operation class " + executorDelegate.getClass().getName()), e, this); } initialiseIfNeeded(executorDelegate); }
@Override protected void doInitialise() throws InitialisationException { if (tcpProtocol != null) { try { muleContext.getInjector().inject(getTcpProtocol()); } catch (MuleException e) { throw new InitialisationException(e, this); } } socketFactory.setConnectionTimeout(getConnectionTimeout()); socketsPool.setFactory(getSocketFactory()); socketsPool.setTestOnBorrow(true); socketsPool.setTestOnReturn(true); socketsPool.setMaxActive(getDispatcherThreadingProfile().getMaxThreadsActive()); socketsPool.setMaxIdle(getDispatcherThreadingProfile().getMaxThreadsIdle()); socketsPool.setWhenExhaustedAction(GenericKeyedObjectPool.WHEN_EXHAUSTED_BLOCK); socketsPool.setMaxWait(socketMaxWait); // Use connector's classloader so that other temporary classloaders // aren't used when things are started lazily or from elsewhere. final String monitorName = String.format("%s%s.socket", ThreadNameHelper.getPrefix(muleContext), getName()); keepAliveMonitor = new ExpiryMonitor(monitorName, 1000, this.getClass().getClassLoader(), muleContext, false); }