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

com.codetaco.funnel.publisher.PublisherFactory Maven / Gradle / Ivy

There is a newer version: 3.0.5
Show newest version
package com.codetaco.funnel.publisher;

import java.io.IOException;
import java.text.ParseException;

import com.codetaco.funnel.FunnelDataPublisher;
import com.codetaco.funnel.parameters.FunnelContext;

/**
 * 

* PublisherFactory class. *

* * @author Chris DeGreef [email protected] */ public class PublisherFactory { /** *

* create. *

* * @param context a {@link com.codetaco.funnel.parameters.FunnelContext} * object. * @return a {@link com.codetaco.funnel.FunnelDataPublisher} object. * @throws java.text.ParseException if any. * @throws java.io.IOException if any. */ static public FunnelDataPublisher create(final FunnelContext context) throws ParseException, IOException { if (context.getFixedRecordLengthOut() == 0) { if (context.isSysout()) return new VariableLengthSysoutPublisher(context); return new VariableLengthFilePublisher(context); } if (context.isSysout()) return new FixedLengthSysoutPublisher(context); return new FixedLengthFilePublisher(context); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy