com.legstar.coxb.transform
Interface IHostJsonTransformers

All Known Implementing Classes:
AbstractJsonTransformers

public interface IHostJsonTransformers

Alternative to IHostTransformers which works on JSON rather than java object.

Classes implementing this interface can transform JSON to mainframe data streams and vice versa.


Method Summary
 byte[] toHost(Reader reader)
          Transforms JSON source to host data.
 byte[] toHost(Reader reader, HostTransformStatus status)
          Transforms JSON source to host data.
 byte[] toHost(Reader reader, String hostCharset)
          Transforms JSON source to host data with a specific host character set.
 byte[] toHost(Reader reader, String hostCharset, HostTransformStatus status)
          Transforms JSON source to host data with a specific host character set.
 void toJson(byte[] hostData, Writer writer)
          Transforms host data to JSON.
 void toJson(byte[] hostData, Writer writer, HostTransformStatus status)
          Transforms host data to JSON.
 void toJson(byte[] hostData, Writer writer, String hostCharset)
          Transforms host data to JSON using a specific host character set.
 void toJson(byte[] hostData, Writer writer, String hostCharset, HostTransformStatus status)
          Transforms host data to JSON using a specific host character set.
 

Method Detail

toHost

byte[] toHost(Reader reader,
              String hostCharset)
              throws HostTransformException
Transforms JSON source to host data with a specific host character set.

Parameters:
reader - the JSON Reader to unmarshal JSON data from
hostCharset - the host character set
Returns:
a byte array with host data
Throws:
HostTransformException - if transformation fails

toHost

byte[] toHost(Reader reader)
              throws HostTransformException
Transforms JSON source to host data.

Parameters:
reader - the JSON Reader to unmarshal JSON data from
Returns:
a byte array with host data
Throws:
HostTransformException - if transformation fails

toJson

void toJson(byte[] hostData,
            Writer writer,
            String hostCharset)
            throws HostTransformException
Transforms host data to JSON using a specific host character set.

Parameters:
hostData - a byte array containing host data
writer - JSON will be sent to this writer.
hostCharset - the host character set
Throws:
HostTransformException - if transformation fails

toJson

void toJson(byte[] hostData,
            Writer writer)
            throws HostTransformException
Transforms host data to JSON.

Parameters:
hostData - a byte array containing host data
writer - JSON will be sent to this writer.
Throws:
HostTransformException - if transformation fails

toHost

byte[] toHost(Reader reader,
              String hostCharset,
              HostTransformStatus status)
              throws HostTransformException
Transforms JSON source to host data with a specific host character set.

Parameters:
reader - the JSON Reader to unmarshal JSON data from
hostCharset - the host character set
status - will contain information on the transformation after it is executed
Returns:
a byte array with host data
Throws:
HostTransformException - if transformation fails

toHost

byte[] toHost(Reader reader,
              HostTransformStatus status)
              throws HostTransformException
Transforms JSON source to host data.

Parameters:
reader - the JSON Reader to unmarshal JSON data from
status - will contain information on the transformation after it is executed
Returns:
a byte array with host data
Throws:
HostTransformException - if transformation fails

toJson

void toJson(byte[] hostData,
            Writer writer,
            String hostCharset,
            HostTransformStatus status)
            throws HostTransformException
Transforms host data to JSON using a specific host character set.

Parameters:
hostData - a byte array containing host data
writer - JSON will be sent to this writer.
hostCharset - the host character set
status - will contain information on the transformation after it is executed
Throws:
HostTransformException - if transformation fails

toJson

void toJson(byte[] hostData,
            Writer writer,
            HostTransformStatus status)
            throws HostTransformException
Transforms host data to JSON.

Parameters:
hostData - a byte array containing host data
writer - JSON will be sent to this writer.
status - will contain information on the transformation after it is executed
Throws:
HostTransformException - if transformation fails


Copyright © 2015 LegSem. All Rights Reserved.