thinkmap.datasource.stream
Interface IStreamFormat

All Known Implementing Classes:
BinaryStreamFormat, JSONStreamFormat

public interface IStreamFormat

The IStreamFormat interface should be implemented by classes that want to define a custom format for the communication between the Thinkmap client and server. It produces stream writers and stream readers for the RemoteDataSource. Additionally, it provides the mime-type so that the RemoteDataSource can send the correct mime- type to the server.

Version:
$Revision: 1.2 $

Method Summary
 String getMimeType()
          Get the mime-type of this StreamFormat.
 IStreamReader getStreamReader(IStreamFactory factory)
          Produce a new StreamReader for this StreamFactory.
 StreamWriter getStreamWriter(IStreamFactory factory)
          Produce a new StreamWriter for this StreamFactory.
 

Method Detail

getMimeType

String getMimeType()
Get the mime-type of this StreamFormat.

Returns:
the mime-type of this StreamFormat

getStreamWriter

StreamWriter getStreamWriter(IStreamFactory factory)
Produce a new StreamWriter for this StreamFactory. The StreamFactory is usually passed to the constructor of the StreamWriter, so that it can aquire a stream to write to.

Parameters:
factory - the factory that is producing the stream.
Returns:
stream writer

getStreamReader

IStreamReader getStreamReader(IStreamFactory factory)
Produce a new StreamReader for this StreamFactory.

Parameters:
factory - the factory that is producing the stream.
Returns:
stream reader


Copyright © 2013 Thinkmap, Inc. All Rights Reserved.