com.levigo.jadice.document.read
Class ReaderParameters

java.lang.Object
  extended by com.levigo.jadice.document.read.ReaderParameters
All Implemented Interfaces:
MetadataProvider, PropertiesProvider

public class ReaderParameters
extends Object
implements PropertiesProvider, MetadataProvider

A wrapper class which provides everything a reader needs.


Constructor Summary
ReaderParameters(SeekableInputStream stream, Metadata metadata, Map<String,Object> properties, String readID, int streamIndex, Map<String,Object> sharedState, ReaderControls controls)
           
 
Method Summary
 ReaderControls getControls()
           
 Metadata getMetadata()
          Return the exposed meta-data or null if no meta-data is available.
 Map<String,Object> getProperties()
          Return a map of user properties.
 String getReadID()
           
 Map<String,Object> getSharedState()
           
 SeekableInputStream getStream()
           
 int getStreamIndex()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReaderParameters

public ReaderParameters(SeekableInputStream stream,
                        Metadata metadata,
                        Map<String,Object> properties,
                        String readID,
                        int streamIndex,
                        Map<String,Object> sharedState,
                        ReaderControls controls)
Method Detail

getStream

public SeekableInputStream getStream()

getMetadata

public Metadata getMetadata()
Description copied from interface: MetadataProvider
Return the exposed meta-data or null if no meta-data is available. An object being a MetadataProvider is not required to provide a non-null meta-data.

Specified by:
getMetadata in interface MetadataProvider
Returns:
the metadata document or null

getProperties

public Map<String,Object> getProperties()
Description copied from interface: PropertiesProvider
Return a map of user properties. What to store and which keys to use is largely up to the user of classes implementing this interface, since those classes will generally be oblivious to the map's contents. There are no guarantees regarding the thread-safety of the returned map, unless otherwise specified by implementors.

Specified by:
getProperties in interface PropertiesProvider
Returns:
the map of user properties

getReadID

public String getReadID()

getStreamIndex

public int getStreamIndex()

getSharedState

public Map<String,Object> getSharedState()

getControls

public ReaderControls getControls()


Copyright © 1995-2020 levigo holding gmbh. All Rights Reserved.