org.objectweb.jonathan.apis.resources
Interface ChunkProvider


public interface ChunkProvider

Chunk providers are used to wrap input streams (like, e.g., socket input streams) in unmarshallers.

See Also:
MarshallerFactory

Method Summary
 void close()
          Closes the chunk provider.
 Chunk prepare()
          Returns a chunk to read data from.
 

Method Detail

prepare

Chunk prepare()
              throws JonathanException
Returns a chunk to read data from.

When done with the chunk, its user must update its offset and top members and release it.

ChunkProviders should not be used concurrently.

Returns:
a chunk;
Throws:
JonathanException - if no chunk can be provided.

close

void close()
Closes the chunk provider. This method must be called if the target provider is no longer used.



Copyright © 2008 OW2 Consortium. All Rights Reserved.