Did this page help you?

   Yes   No   Tell us about it...

com.amazonaws.services.simpleworkflow.flow
Class DataConverter

java.lang.Object
  extended by com.amazonaws.services.simpleworkflow.flow.DataConverter
Direct Known Subclasses:
JsonDataConverter, NullDataConverter

public abstract class DataConverter
extends Object

Used by the framework to serialize/deserialize method parameters that need to be sent over the wire.


Constructor Summary
DataConverter()
           
 
Method Summary
abstract
<T> T
fromData(String content, Class<T> valueType)
          Implements conversion of the single value.
abstract  String toData(Object value)
          Implements conversion of the single value.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataConverter

public DataConverter()
Method Detail

toData

public abstract String toData(Object value)
                       throws DataConverterException
Implements conversion of the single value.

Parameters:
value - Java value to convert to String.
Returns:
converted value
Throws:
DataConverterException - if conversion of the value passed as parameter failed for any reason.

fromData

public abstract <T> T fromData(String content,
                               Class<T> valueType)
                    throws DataConverterException
Implements conversion of the single value.

Parameters:
data - Simple Workflow Data value to convert to a Java object.
Returns:
converted Java object
Throws:
DataConverterException - if conversion of the data passed as parameter failed for any reason.


Copyright © 2010 Amazon Web Services, Inc. All Rights Reserved.