Class MovieJsonReader

java.lang.Object
org.springframework.batch.item.ItemStreamSupport
org.springframework.batch.item.support.AbstractItemStreamItemReader<org.json.simple.JSONObject>
com.espacogeek.geek.batch.MovieJsonReader
All Implemented Interfaces:
org.springframework.batch.item.ItemReader<org.json.simple.JSONObject>, org.springframework.batch.item.ItemStream, org.springframework.batch.item.ItemStreamReader<org.json.simple.JSONObject>

@StepScope @Component public class MovieJsonReader extends org.springframework.batch.item.support.AbstractItemStreamItemReader<org.json.simple.JSONObject>
ItemReader that reads JSONObjects from the JSONArray returned by MediaApi.updateTitles(). Persists the current index in the Step ExecutionContext for restartability.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    open(org.springframework.batch.item.ExecutionContext executionContext)
     
    org.json.simple.JSONObject
     
    void
    update(org.springframework.batch.item.ExecutionContext executionContext)
     

    Methods inherited from class org.springframework.batch.item.ItemStreamSupport

    getExecutionContextKey, getName, setExecutionContextName, setName

    Methods inherited from class java.lang.Object

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

    Methods inherited from interface org.springframework.batch.item.ItemStream

    close
  • Constructor Details

    • MovieJsonReader

      public MovieJsonReader()
  • Method Details

    • open

      public void open(org.springframework.batch.item.ExecutionContext executionContext)
    • update

      public void update(org.springframework.batch.item.ExecutionContext executionContext)
    • read

      public org.json.simple.JSONObject read()