@Override protected void doTearDown() throws Exception { if (streamingManager != null) { ((Disposable) streamingManager).dispose(); } }
@Override public void initialise() throws InitialisationException { if (xPathFactory == null) { xPathFactory = XPathFactory.newInstance(); } if (manager == null) { throw new InitialisationException(createStaticMessage("Expected ExpressionManager to be injected but was null"), this); } }
/** * {@inheritDoc} */ @Override public <T> T inject(T object) { try { return initialiseObject((ConfigurableApplicationContext) applicationContext, EMPTY, object); } catch (LifecycleException e) { throw new MuleRuntimeException(e); } catch (Exception e) { throw new MuleRuntimeException(new LifecycleException(e, object)); } }
private void startFlow(String flowName) throws Exception { ((Startable) getFlowConstruct(flowName)).start(); } }
@Before public void setupExpressionEvaluator() throws Exception { expressionLanguage = getExpressionLanguage(); if (expressionLanguage instanceof Initialisable) { ((Initialisable) expressionLanguage).initialise(); } }
@Override public TlsContextFactory build() throws CreateException { try { if (trustStorePath != null) { tlsContextFactory.setTrustStorePath(trustStorePath); } if (keyStorePath != null) { tlsContextFactory.setKeyStorePath(keyStorePath); } if (selectedRevocationCheck != null) { tlsContextFactory.setRevocationCheck(selectedRevocationCheck); } tlsContextFactory.initialise(); } catch (IOException e) { throw new CreateException(createStaticMessage(e.getMessage()), e, tlsContextFactory); } catch (InitialisationException e) { throw new CreateException(e.getI18nMessage(), e, tlsContextFactory); } return tlsContextFactory; }
@Override public Transformer getRoundTripTransformer() { GZipUncompressTransformer transformer = new GZipUncompressTransformer(); transformer.setMuleContext(muleContext); try { transformer.initialise(); } catch (InitialisationException e) { fail(e.getMessage()); } return transformer; } }
private void checkState(String expected) throws InitialisationException { if (!state.equals(expected)) { throw new InitialisationException( createStaticMessage("Invalid state: expected %s but as %s", expected, state), this); } } }
private void startFlow(String flowName) throws Exception { ((Startable) getFlowConstruct(flowName)).start(); } }
@Override public Transformer getRoundTripTransformer() { GZipUncompressTransformer transformer = new GZipUncompressTransformer(); transformer.setMuleContext(muleContext); try { transformer.initialise(); } catch (InitialisationException e) { fail(e.getMessage()); } return transformer; }
private void checkState(String expected) throws InitialisationException { if (!state.equals(expected)) { throw new InitialisationException( createStaticMessage("Invalid state: expected %s but as %s", expected, state), this); } }
private void startFlow(String flowName) throws Exception { ((Startable) getFlowConstruct(flowName)).start(); }
@Override public Transformer getTransformer() { EncryptionTransformer transformer = new EncryptionTransformer(); transformer.setStrategy(strat); try { transformer.initialise(); } catch (InitialisationException e) { fail(e.getMessage()); } return transformer; }
@Override public void initialise() throws InitialisationException { try { muleContext.getInjector().inject(javaInternalSerializerProtocol); muleContext.getInjector().inject(javaExternalSerializerProtocol); } catch (MuleException e) { throw new InitialisationException(e, this); } } }
private void startFlow(String flowName) throws Exception { ((Startable) getFlowConstruct(flowName)).start(); }
@Override public Transformer getRoundTripTransformer() { GZipUncompressTransformer transformer = new GZipUncompressTransformer(); transformer.setMuleContext(muleContext); try { transformer.initialise(); } catch (InitialisationException e) { fail(e.getMessage()); } return transformer; }
@Override public void initialise() throws InitialisationException { try { componentInitializedLatch.release(); waitLatch.await(); } catch (InterruptedException e) { throw new InitialisationException(e, this); } }
private void startFlow(String flowName) throws Exception { ((Startable) registry.lookupByName(flowName).get()).start(); }
@Override public Transformer getRoundTripTransformer() { DecryptionTransformer transformer = new DecryptionTransformer(); transformer.setStrategy(strat); try { transformer.initialise(); } catch (InitialisationException e) { fail(e.getMessage()); } return transformer; }
@Override public Transformer getRoundTripTransformer() { GZipUncompressTransformer transformer = new GZipUncompressTransformer(); transformer.setMuleContext(muleContext); transformer.setReturnDataType(DataType.STRING); try { transformer.initialise(); } catch (InitialisationException e) { fail(e.getMessage()); } return transformer; }