org.directwebremoting.guice
Class InternalConverterManager

java.lang.Object
  extended by org.directwebremoting.guice.InternalConverterManager
All Implemented Interfaces:
org.directwebremoting.extend.ConverterManager

public class InternalConverterManager
extends java.lang.Object
implements org.directwebremoting.extend.ConverterManager

Extends an existing converter manager with an injected list of converters specified at Guice bind-time. Only to be used in conjection with DwrGuiceServlet.

Author:
Tim Peierls [tim at peierls dot net]

Constructor Summary
InternalConverterManager()
          Retrieves an underlying converter manager from thread-local state to which this class delegates ConverterManager calls.
 
Method Summary
 void addConverter(java.lang.String match, org.directwebremoting.extend.Converter converter)
           
 void addConverter(java.lang.String match, java.lang.String type, java.util.Map params)
           
 void addConverterType(java.lang.String id, java.lang.String className)
           
 java.lang.Object convertInbound(java.lang.Class paramType, org.directwebremoting.extend.InboundVariable iv, org.directwebremoting.extend.InboundContext inctx, org.directwebremoting.extend.TypeHintContext incc)
           
 org.directwebremoting.extend.OutboundVariable convertOutbound(java.lang.Object object, org.directwebremoting.extend.OutboundContext outctx)
           
 org.directwebremoting.extend.Converter getConverterByMatchString(java.lang.String match)
           
 java.util.Collection getConverterMatchStrings()
           
 java.lang.Class getExtraTypeInfo(org.directwebremoting.extend.TypeHintContext thc)
           
 boolean isConvertable(java.lang.Class paramType)
           
 void setConverters(java.util.Map converters)
           
 void setExtraTypeInfo(org.directwebremoting.extend.TypeHintContext thc, java.lang.Class type)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InternalConverterManager

public InternalConverterManager()
Retrieves an underlying converter manager from thread-local state to which this class delegates ConverterManager calls.

Method Detail

addConverterType

public void addConverterType(java.lang.String id,
                             java.lang.String className)
Specified by:
addConverterType in interface org.directwebremoting.extend.ConverterManager

addConverter

public void addConverter(java.lang.String match,
                         java.lang.String type,
                         java.util.Map params)
                  throws java.lang.IllegalArgumentException,
                         java.lang.InstantiationException,
                         java.lang.IllegalAccessException
Specified by:
addConverter in interface org.directwebremoting.extend.ConverterManager
Throws:
java.lang.IllegalArgumentException
java.lang.InstantiationException
java.lang.IllegalAccessException

addConverter

public void addConverter(java.lang.String match,
                         org.directwebremoting.extend.Converter converter)
                  throws java.lang.IllegalArgumentException
Specified by:
addConverter in interface org.directwebremoting.extend.ConverterManager
Throws:
java.lang.IllegalArgumentException

getConverterMatchStrings

public java.util.Collection getConverterMatchStrings()
Specified by:
getConverterMatchStrings in interface org.directwebremoting.extend.ConverterManager

getConverterByMatchString

public org.directwebremoting.extend.Converter getConverterByMatchString(java.lang.String match)
Specified by:
getConverterByMatchString in interface org.directwebremoting.extend.ConverterManager

isConvertable

public boolean isConvertable(java.lang.Class paramType)
Specified by:
isConvertable in interface org.directwebremoting.extend.ConverterManager

convertInbound

public java.lang.Object convertInbound(java.lang.Class paramType,
                                       org.directwebremoting.extend.InboundVariable iv,
                                       org.directwebremoting.extend.InboundContext inctx,
                                       org.directwebremoting.extend.TypeHintContext incc)
                                throws org.directwebremoting.extend.MarshallException
Specified by:
convertInbound in interface org.directwebremoting.extend.ConverterManager
Throws:
org.directwebremoting.extend.MarshallException

convertOutbound

public org.directwebremoting.extend.OutboundVariable convertOutbound(java.lang.Object object,
                                                                     org.directwebremoting.extend.OutboundContext outctx)
                                                              throws org.directwebremoting.extend.MarshallException
Specified by:
convertOutbound in interface org.directwebremoting.extend.ConverterManager
Throws:
org.directwebremoting.extend.MarshallException

setExtraTypeInfo

public void setExtraTypeInfo(org.directwebremoting.extend.TypeHintContext thc,
                             java.lang.Class type)
Specified by:
setExtraTypeInfo in interface org.directwebremoting.extend.ConverterManager

getExtraTypeInfo

public java.lang.Class getExtraTypeInfo(org.directwebremoting.extend.TypeHintContext thc)
Specified by:
getExtraTypeInfo in interface org.directwebremoting.extend.ConverterManager

setConverters

public void setConverters(java.util.Map converters)
Specified by:
setConverters in interface org.directwebremoting.extend.ConverterManager


Copyright © 2007. All Rights Reserved.