org.fudgemsg
Class FudgeContextConfiguration

java.lang.Object
  extended by org.fudgemsg.FudgeContextConfiguration

public abstract class FudgeContextConfiguration
extends Object

Abstraction of FudgeContext customization operations, such as registering user defined types or a specific taxonomy resolver. This can be used with FudgeContext.setConfiguration(org.fudgemsg.FudgeContextConfiguration...) to inject configuration into a context through Bean based frameworks such as Spring, or allow different components of an application to be composed to register a complete set of types.


Constructor Summary
FudgeContextConfiguration()
           
 
Method Summary
static FudgeContextConfiguration compose(FudgeContextConfiguration... configurations)
          Creates a composite configuration object that calls methods from the supplied objects in the order given.
 FudgeContextConfiguration compose(FudgeContextConfiguration runBefore)
          Creates a composite configuration object that calls methods from the supplied configuration before those from this one.
 void configureFudgeContext(FudgeContext fudgeContext)
          Updates any aspects of the context.
 void configureFudgeObjectDictionary(FudgeObjectDictionary dictionary)
          Updates the given dictionary to customize it for an application.
 void configureFudgeTypeDictionary(FudgeTypeDictionary dictionary)
          Updates the given dictionary to customize it for an application.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FudgeContextConfiguration

public FudgeContextConfiguration()
Method Detail

configureFudgeTypeDictionary

public void configureFudgeTypeDictionary(FudgeTypeDictionary dictionary)
Updates the given dictionary to customize it for an application. The default implementation here does nothing.

Parameters:
dictionary - the dictionary to customize

configureFudgeObjectDictionary

public void configureFudgeObjectDictionary(FudgeObjectDictionary dictionary)
Updates the given dictionary to customize it for an application. The default implementation here does nothing.

Parameters:
dictionary - the dictionary to customize

configureFudgeContext

public void configureFudgeContext(FudgeContext fudgeContext)
Updates any aspects of the context. The default implementation just calls the configureFudgeTypeDictionary(org.fudgemsg.FudgeTypeDictionary) and configureFudgeObjectDictionary(org.fudgemsg.mapping.FudgeObjectDictionary) methods.

Parameters:
fudgeContext - the context to configure

compose

public FudgeContextConfiguration compose(FudgeContextConfiguration runBefore)
Creates a composite configuration object that calls methods from the supplied configuration before those from this one. For example if three tool libraries all provide configuration objects a, b, c, the composite c.compose (b.compose (a)) will apply operations from a, then b, and finally c. A more efficient method however would be to use FudgeContextConfiguration.compose (a, b, c).

Parameters:
runBefore - configuration to apply before this objects configuration
Returns:
the composite configuration object

compose

public static FudgeContextConfiguration compose(FudgeContextConfiguration... configurations)
Creates a composite configuration object that calls methods from the supplied objects in the order given.

Parameters:
configurations - the configuration objects to apply, in the order to apply them
Returns:
the composite configuration object


Copyright 2009-Present by OpenGamma Inc. and individual contributors
Released under the Apache License, Version 2.0