001package com.dpillay.tools.tail4j.core;
002
003import java.util.concurrent.Callable;
004
005/**
006 * Tails a file
007 * 
008 * @author dpillay
009 * 
010 * @param <T>
011 *            Contents
012 * @param <S>
013 *            Source
014 */
015public interface TailedReader<T, S> extends Callable<T> {
016
017        /**
018         * Get the file being tailed
019         * 
020         * @return
021         */
022        public S getSource();
023
024        /**
025         * Set the file to be tailed
026         * 
027         * @param file
028         */
029        public void setSource(S source);
030
031        /**
032         * Get the tailed listener
033         * 
034         * @return
035         */
036        public TailListener<T> getListener();
037
038        /**
039         * Set the tailed listener
040         * 
041         * @param listener
042         */
043        public void setListener(TailListener<T> listener);
044
045}