Copyright © 2009, 2010 Nu Echo Inc. All Rights Reserved.

com.nuecho.application.grammarserver.servlets
Class MultiJsonContextInitializer

java.lang.Object
  extended by com.nuecho.application.grammarserver.servlets.MultiJsonContextInitializer
All Implemented Interfaces:
ContextInitializer

public final class MultiJsonContextInitializer
extends java.lang.Object
implements ContextInitializer

Implementation of ContextInitializer that expects each value in the parameterMap to be a JSON string. The string is converted to a JSON value before being put in the instantiation context.

Version:
2.0.0
See Also:
ContextInitializer

Constructor Summary
MultiJsonContextInitializer()
           
 
Method Summary
 java.util.Map getContext(java.util.Map parameters, GrammarFragmentFactory factory, CacheControl control)
          Computes an instantiation context from a map of parameters.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MultiJsonContextInitializer

public MultiJsonContextInitializer()
Method Detail

getContext

public java.util.Map getContext(java.util.Map parameters,
                                GrammarFragmentFactory factory,
                                CacheControl control)
                         throws ContextInitializationException
Description copied from interface: ContextInitializer
Computes an instantiation context from a map of parameters. Each parameter name (a string) is bound to an array of values (an array of Java strings).

Specified by:
getContext in interface ContextInitializer
Parameters:
parameters - the input parameters
factory - a grammar fragment factory object
control - a cache control object
Returns:
the instantiation context that maps strings to objects.
Throws:
ContextInitializationException - when an error occurs during the building of the instantiation context

Copyright © 2009, 2010 Nu Echo Inc. All Rights Reserved.