Package org.mule.transformer

Examples of org.mule.transformer.AbstractTransformer


        assertTrue(AbstractTransformer.class.isAssignableFrom(clazz));
        Transformer object= muleContext.getRegistry().lookupTransformer(name);

        assertNotNull(object);
        assertTrue(clazz.isAssignableFrom(object.getClass()));
        AbstractTransformer transformer = (AbstractTransformer) object;
        assertAbstractTransformerOk(transformer, name);
        return transformer;
    }
View Full Code Here


   
    protected AbstractTransformer getAndTestEndpointTransformer(String endpointName, Class clazz) throws MuleException
    {
        assertTrue(AbstractTransformer.class.isAssignableFrom(clazz));
        assertEquals(1, muleContext.getEndpointFactory().getInboundEndpoint(endpointName).getTransformers().size());
        AbstractTransformer transformer= (AbstractTransformer) muleContext.getEndpointFactory().getInboundEndpoint(endpointName).getTransformers().get(0);

        assertNotNull(transformer);
        assertTrue(clazz.isAssignableFrom(transformer.getClass()));
        return transformer;
    }
View Full Code Here

        assertTrue(!router.isMatch(message));

        router.setTransformers(
            CollectionUtils.singletonList(
                new AbstractTransformer()
                {
                    @Override
                    public Object doTransform(Object src, String encoding) throws TransformerException
                    {
                        return ((Exception)src).getMessage();
View Full Code Here

        }
    }

    public void testStringSourceTypeWithIgnoreBadInput() throws Exception
    {
        AbstractTransformer trans = (AbstractTransformer) getTransformer();
        trans.setIgnoreBadInput(true);
        Object result = trans.transform(getResultData());
        trans.setIgnoreBadInput(false);
        assertEquals(result, getResultData());
    }
View Full Code Here

        public TestRequiresNewMessageOutboundRouter(boolean expectCopy)
        {
            this.expectCopy = expectCopy;
            List<Transformer> transformers = new ArrayList<Transformer>();
            transformers.add(new AbstractTransformer()
            {
                @Override
                public Object doTransform(Object src, String encoding) throws TransformerException
                {
                    return src;
View Full Code Here

    }

    @Test
    public void testStringSourceTypeWithIgnoreBadInput() throws Exception
    {
        AbstractTransformer trans = (AbstractTransformer) getTransformer();
        trans.setIgnoreBadInput(true);
        ((DefaultMuleConfiguration) muleContext.getConfiguration()).setUseExtendedTransformations(false);
        Object result = trans.transform(getResultData());
        trans.setIgnoreBadInput(false);
        assertEquals(result, getResultData());
    }
View Full Code Here

        public TestRequiresNewMessageOutboundRouter(boolean expectCopy)
        {
            this.expectCopy = expectCopy;
            List<Transformer> transformers = new ArrayList<Transformer>();
            transformers.add(new AbstractTransformer()
            {
                @Override
                public Object doTransform(Object src, String encoding) throws TransformerException
                {
                    return src;
View Full Code Here

        assertTrue(!router.isMatch(message));

        router.setTransformers(
              Arrays.<Transformer>asList(
                new AbstractTransformer()
                {
                    @Override
                    public Object doTransform(Object src, String outputEncoding) throws TransformerException
                    {
                        return ((Exception)src).getMessage();
View Full Code Here

        assertTrue(AbstractTransformer.class.isAssignableFrom(clazz));
        Transformer object= muleContext.getRegistry().lookupTransformer(name);

        assertNotNull(object);
        assertTrue(clazz.isAssignableFrom(object.getClass()));
        AbstractTransformer transformer = (AbstractTransformer) object;
        assertAbstractTransformerOk(transformer, name);
        return transformer;
    }
View Full Code Here

   
    protected AbstractTransformer getAndTestEndpointTransformer(String endpointName, Class clazz) throws MuleException
    {
        assertTrue(AbstractTransformer.class.isAssignableFrom(clazz));
        assertEquals(1, muleContext.getEndpointFactory().getInboundEndpoint(endpointName).getTransformers().size());
        AbstractTransformer transformer= (AbstractTransformer) muleContext.getEndpointFactory().getInboundEndpoint(endpointName).getTransformers().get(0);

        assertNotNull(transformer);
        assertTrue(clazz.isAssignableFrom(transformer.getClass()));
        return transformer;
    }
View Full Code Here

TOP

Related Classes of org.mule.transformer.AbstractTransformer

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.