com.ibm.streamsx.topology.file

Class DirectoryWatcher

  • java.lang.Object
    • com.ibm.streams.operator.AbstractOperator
      • com.ibm.streams.operator.samples.patterns.TupleProducer
        • com.ibm.streams.operator.samples.patterns.ProcessTupleProducer
          • com.ibm.streamsx.topology.file.DirectoryWatcher
  • All Implemented Interfaces:
    com.ibm.streams.operator.Operator, java.io.FileFilter


    @PrimitiveOperator
     @OutputPortSet(cardinality=1)
    public class DirectoryWatcher
    extends com.ibm.streams.operator.samples.patterns.ProcessTupleProducer
    implements java.io.FileFilter
    • Nested Class Summary

      • Nested classes/interfaces inherited from interface com.ibm.streams.operator.Operator

        com.ibm.streams.operator.Operator.TagNames
    • Field Summary

      • Fields inherited from class com.ibm.streams.operator.samples.patterns.TupleProducer

        IBM_COPYRIGHT
    • Constructor Summary

      Constructors 
      Constructor and Description
      DirectoryWatcher() 
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      boolean accept(java.io.File pathname) 
      protected java.lang.String getDirectory() 
      void initialize(com.ibm.streams.operator.OperatorContext context) 
      protected void process() 
      void setDirectory(java.lang.String directory) 
      protected void sortAndSubmit(java.util.List<java.io.File> files) 
      • Methods inherited from class com.ibm.streams.operator.samples.patterns.ProcessTupleProducer

        producerInitialize, shutdown, startProcessing
      • Methods inherited from class com.ibm.streams.operator.samples.patterns.TupleProducer

        allPortsReady, getInitialDelay, getInitialDelayUnit, setInitDelay, setInitDelay, setInitialDelay
      • Methods inherited from class com.ibm.streams.operator.AbstractOperator

        checkPorts, createAvoidCompletionThread, createAvoidCompletionThread, createAvoidCompletionThreadIfNoInputs, getControlPlaneContext, getException, getInput, getOperatorContext, getOutput, process, processPunctuation, setLoggerAspects, setTagData
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DirectoryWatcher

        public DirectoryWatcher()
    • Method Detail

      • getDirectory

        protected java.lang.String getDirectory()
      • initialize

        public void initialize(com.ibm.streams.operator.OperatorContext context)
                        throws java.lang.Exception
        Specified by:
        initialize in interface com.ibm.streams.operator.Operator
        Overrides:
        initialize in class com.ibm.streams.operator.samples.patterns.ProcessTupleProducer
        Throws:
        java.lang.Exception
      • setDirectory

        @Parameter
        public void setDirectory(java.lang.String directory)
      • sortAndSubmit

        protected void sortAndSubmit(java.util.List<java.io.File> files)
                              throws java.lang.Exception
        Throws:
        java.lang.Exception
      • process

        protected void process()
                        throws java.lang.Exception
        Specified by:
        process in class com.ibm.streams.operator.samples.patterns.ProcessTupleProducer
        Throws:
        java.lang.Exception
      • accept

        public boolean accept(java.io.File pathname)
        Specified by:
        accept in interface java.io.FileFilter
streamsx.topology 2.1 @ IBMStreams GitHub