All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.mule.rx.RxMessageSourceProvider Maven / Gradle / Ivy

There is a newer version: 3.6.1
Show newest version

package org.mule.rx;

import org.apache.commons.lang.Validate;
import org.mule.api.MuleException;
import org.mule.api.source.MessageSource;
import org.mule.construct.Flow;

import rx.functions.Func1;

public abstract class RxMessageSourceProvider implements Func1
{
    @Override
    public final MessageSource call(final Flow flow)
    {
        Validate.notNull(flow, "flow can't be null");

        try
        {
            return doCall(flow);
        }
        catch (final MuleException me)
        {
            throw new RuntimeException("Failed to create message source for flow: " + flow, me);
        }
    }

    public abstract MessageSource doCall(Flow flow) throws MuleException;
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy