Fetcher (gCube Species Discovery 3.3.0-SNAPSHOT API)
Date: 2013-07-19

org.gcube.portlets.user.speciesdiscovery.server.session

## Class Fetcher<T extends FetchingElement>

- java.lang.Object
- - org.gcube.portlets.user.speciesdiscovery.server.session.Fetcher<T>

- All Implemented Interfaces:
    Closeable, AutoCloseable, Runnable

      public class Fetcher<T extends FetchingElement>
      extends Object
      implements Runnable, Closeable

  Author:
    "Federico De Faveri defaveri@isti.cnr.it"

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected FetchingBuffer<T>` | `buffer`
    `protected boolean` | `complete`
    `protected org.apache.log4j.Logger` | `logger`
    `protected CloseableIterator<T>` | `source`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Fetcher(CloseableIterator<T> source, FetchingBuffer<T> buffer)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `close()`
    `CloseableIterator<T>` | `getSource()`
    `boolean` | `isComplete()`
    `void` | `run()`
    `void` | `setSource(CloseableIterator<T> source)`
    `protected void` | `silentClose()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### logger

          protected org.apache.log4j.Logger logger

    - #### buffer

          protected FetchingBuffer<T extends FetchingElement> buffer

    - #### source

          protected CloseableIterator<T extends FetchingElement> source

    - #### complete

          protected boolean complete

  - ### Constructor Detail

    - #### Fetcher

          public Fetcher(CloseableIterator<T> source,
                 FetchingBuffer<T> buffer)

  - ### Method Detail

    - #### getSource

          public CloseableIterator<T> getSource()

      Returns:
        the source

    - #### setSource

          public void setSource(CloseableIterator<T> source)

      Parameters:
        `source` - the source to set

    - #### run

          public void run()

      Specified by:
        `run` in interface `Runnable`

    - #### silentClose

          protected void silentClose()

    - #### close

          public void close()
                     throws IOException

      Specified by:
        `close` in interface `Closeable`
      Specified by:
        `close` in interface `AutoCloseable`
      Throws:
        `IOException`

    - #### isComplete

          public boolean isComplete()

Copyright © 2013. All Rights Reserved.