/** * Invokes {@link Initialisable#initialise()} on {@code object} * if it implements the {@link Initialisable} interface. * * @param object the object you're trying to initialise * @throws InitialisationException */ public static void initialiseIfNeeded(Object object) throws InitialisationException { initialiseIfNeeded(object, null); }
@Override public void initialise() throws InitialisationException { LifecycleUtils.initialiseIfNeeded(filter, muleContext); }
@Override public void initialise() throws InitialisationException { LifecycleUtils.initialiseIfNeeded(value); }
@Override public void initialise() throws InitialisationException { LifecycleUtils.initialiseIfNeeded(params.values()); }
@Override protected void doInitialise() throws InitialisationException { LifecycleUtils.initialiseIfNeeded(objectFactory); for (InterfaceBinding binding : bindings) { applyLifecycleAndDependencyInjection(binding); } }
@Override protected void doInitialise(MuleContext muleContext) throws InitialisationException { LifecycleUtils.initialiseIfNeeded(redeliveryExceeded); super.doInitialise(muleContext); }
@Override public void initialise() throws InitialisationException { if (!onUnacceptedFlowConstruct && unacceptedMessageProcessor instanceof Initialisable) { ((Initialisable) unacceptedMessageProcessor).initialise(); } LifecycleUtils.initialiseIfNeeded(filter); }
@Override public void initialise() throws InitialisationException { operationExecutor = operation.getExecutor(); initialiseIfNeeded(operationExecutor, muleContext); }
public void initialise() throws InitialisationException { try { objectToString = new ObjectToString(); objectToByteArray = new ObjectToByteArray(); // these are just fallbacks that are not to go // into the mule registry initialiseIfNeeded(objectToString, muleContext); initialiseIfNeeded(objectToByteArray, muleContext); } catch (MuleException e) { throw new InitialisationException(e, this); } }
@Override public void initialise() throws InitialisationException { if (storePrefix == null) { storePrefix = String.format("%s.%s.%s", ThreadNameHelper.getPrefix(muleContext), (flowConstruct == null ? "" : flowConstruct.getName()), this.getClass().getName()); } if (store == null) { this.store = createMessageIdStore(); } LifecycleUtils.initialiseIfNeeded(store); }
@Override protected void doConfigure(MuleContext muleContext) throws Exception { if (muleContext instanceof DefaultMuleContext && ClassUtils.isClassOnPath(EXTENSIONS_MANAGER_CLASS_NAME, getClass())) { ExtensionManager extensionManager = (ExtensionManager) ClassUtils.instanciateClass(EXTENSIONS_MANAGER_CLASS_NAME); extensionManager.discoverExtensions(Thread.currentThread().getContextClassLoader()); ((DefaultMuleContext) muleContext).setExtensionManager(extensionManager); initialiseIfNeeded(extensionManager, muleContext); } } }
@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); }
initialiseIfNeeded(objectToByteArray, muleContext); initialiseIfNeeded(byteArrayToHexString, muleContext);
LifecycleUtils.initialiseIfNeeded(tlsContextFactory); try
LifecycleUtils.initialiseIfNeeded(responseBuilder); LifecycleUtils.initialiseIfNeeded(errorResponseBuilder);
/** * Template method were deriving classes can do any initialisation after the * properties have been set on this transformer * * @throws org.mule.api.lifecycle.InitialisationException */ @Override public void initialise() throws InitialisationException { if (strategyName != null) { if (endpoint.getMuleContext().getSecurityManager() == null) { if (strategy == null) { throw new InitialisationException(CoreMessages.authSecurityManagerNotSet(), this); } } else { strategy = endpoint.getMuleContext().getSecurityManager().getEncryptionStrategy(strategyName); } } if (strategy == null) { throw new InitialisationException(CoreMessages.encryptionStrategyNotSet(), this); } LifecycleUtils.initialiseIfNeeded(strategy); }
@Override public void initialise() throws InitialisationException { if (requestConfig == null) { throw new InitialisationException(createStaticMessage("The config-ref attribute is required in the HTTP request element"), this); } if (requestBuilder == null) { requestBuilder = new HttpRequesterRequestBuilder(); } LifecycleUtils.initialiseIfNeeded(requestBuilder); setEmptyAttributesFromConfig(); validateRequiredProperties(); basePath = new AttributeEvaluator(requestConfig.getBasePath()); muleEventToHttpRequest = new MuleEventToHttpRequest(this, muleContext, requestStreamingMode, sendBodyMode); httpResponseToMuleEvent = new HttpResponseToMuleEvent(this, muleContext, parseResponse); initializeAttributeEvaluators(host, port, method, path, basePath, url, followRedirects, requestStreamingMode, sendBodyMode, parseResponse, responseTimeout); notificationHelper = new NotificationHelper(muleContext.getNotificationManager(), ConnectorMessageNotification.class, false ); }
LifecycleUtils.initialiseIfNeeded(authentication); verifyConnectionsParameters();
LifecycleUtils.initialiseIfNeeded(tlsContext); server = connectionManager.createSslServer(serverAddress, createWorkManagerSource(), tlsContext, usePersistentConnections, connectionIdleTimeout);