com.metamatrix.connector.xml.cache
Class CachedXMLStream

java.lang.Object
  extended by java.io.InputStream
      extended by com.metamatrix.connector.xml.cache.CachedXMLStream
All Implemented Interfaces:
java.io.Closeable

public class CachedXMLStream
extends java.io.InputStream

Reassembles the Document stream that has been chunked into the cache. We chunk it into the cache in the first pace because we don't want to hold large documents in memory and we can't stream it into the cache. The structure in the cache is the same across the different implementations, but semantically different. CacheRoot ConnectorName queryNode chunks For the file connector, queryNode is one of the documents in directory specified in the connector binding. For this implementation the responses are not dynamic, so there is no need to group them by query. In the REST and SOAP implementations, the content of the xml is presumed to be dynamic and determined by request to the source. In these cases the queryNode is a key generated from the request. The chunk level in the cache contains the chunked pieces of the xml stream.


Constructor Summary
CachedXMLStream(ExecutionContext context, java.lang.String requestId)
           
 
Method Summary
 int read()
           
 
Methods inherited from class java.io.InputStream
available, close, mark, markSupported, read, read, reset, skip
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CachedXMLStream

public CachedXMLStream(ExecutionContext context,
                       java.lang.String requestId)
Method Detail

read

public int read()
         throws java.io.IOException
Specified by:
read in class java.io.InputStream
Throws:
java.io.IOException


Copyright © 2009. All Rights Reserved.