org.restlet.ext.javamail
Class JavaMailConverter

java.lang.Object
  extended by org.restlet.engine.Helper
      extended by org.restlet.engine.converter.ConverterHelper
          extended by org.restlet.ext.javamail.JavaMailConverter

public class JavaMailConverter
extends ConverterHelper

A JavaMail converter helper to convert from Message objects to MessageRepresentation.

Author:
Thierry Boileau

Constructor Summary
JavaMailConverter()
           
 
Method Summary
 List<Class<?>> getObjectClasses(Variant source)
           
 List<VariantInfo> getVariants(Class<?> source)
           
 float score(Object source, Variant target, UniformResource resource)
           
<T> float
score(Representation source, Class<T> target, UniformResource resource)
           
<T> T
toObject(Representation source, Class<T> target, UniformResource resource)
           
 Representation toRepresentation(Object source, Variant target, UniformResource resource)
           
 
Methods inherited from class org.restlet.engine.converter.ConverterHelper
addObjectClass, addVariant, updatePreferences, updatePreferences
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JavaMailConverter

public JavaMailConverter()
Method Detail

getObjectClasses

public List<Class<?>> getObjectClasses(Variant source)
Specified by:
getObjectClasses in class ConverterHelper

getVariants

public List<VariantInfo> getVariants(Class<?> source)
Specified by:
getVariants in class ConverterHelper

score

public <T> float score(Representation source,
                       Class<T> target,
                       UniformResource resource)
Specified by:
score in class ConverterHelper

score

public float score(Object source,
                   Variant target,
                   UniformResource resource)
Specified by:
score in class ConverterHelper

toObject

public <T> T toObject(Representation source,
                      Class<T> target,
                      UniformResource resource)
           throws IOException
Specified by:
toObject in class ConverterHelper
Throws:
IOException

toRepresentation

public Representation toRepresentation(Object source,
                                       Variant target,
                                       UniformResource resource)
                                throws IOException
Specified by:
toRepresentation in class ConverterHelper
Throws:
IOException


Copyright © 2005-2011 Noelios Technologies.