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

org.unix4j.unix.tail.AbstractTailProcessor Maven / Gradle / Ivy

There is a newer version: 0.6
Show newest version
package org.unix4j.unix.tail;

import org.unix4j.context.ExecutionContext;
import org.unix4j.processor.AbstractLineProcessor;
import org.unix4j.processor.LineProcessor;

/**
 * Base class for the line processors used by the {@link TailCommand}.
 */
abstract class AbstractTailProcessor extends AbstractLineProcessor {
	protected final long count;

    public abstract void resetCountersAndFlush();

	public AbstractTailProcessor(TailCommand command, ExecutionContext context, LineProcessor output) {
		super(command, context, output);
		final TailArguments args = getArguments();
		this.count = args.isCountSet() ? args.getCount() : 10;
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy