Class BarracudaOverridesModule

java.lang.Object
com.google.inject.AbstractModule
com.caplin.orders.barracuda.extension.BarracudaOverridesModule
All Implemented Interfaces:
com.google.inject.Module

public abstract class BarracudaOverridesModule extends com.google.inject.AbstractModule
An abstract class that extends the guice AbstractModule The Barracuda Order Adapter is able to load an external guice module. Only modules with the annotation BarracudaOverridesModule will be loaded. Such a class only needs to be on the classpath, and will be picked up by scanning annotations via reflection. example:

        @BarracudaOverride
        public class ExampleBarracudaOverridesModule extends BarracudaOverridesModule
        {
                ...
        }
 
Only certain classes may be overwritten. The interface methods on this class define which classes are overridable. If you plan on provide an override, then the implementation method should have the annotation @Provides. Please also consider the annotation @Singleton. example:

        @Provides
        @Singleton
        @Nullable
        @Override
        public DataSource getDataSource()
        {
                return DataSourceFactory.createDataSource(args);
        }
 
If you do not plan on providing an implementation as defined by the interface method. Then simply return null, and make sure to not add the @Provides annotation. example:

        @Nullable
        @Override
        public PrecisionManager getPrecisionManager()
        {
                return null;
        }
 
You may provide instances of the following: - com.caplin.datasource.DataSource - com.caplin.orders.barracuda.extension.blotter.BlotterFieldsExtender - com.caplin.orders.barracuda.extension.config.AccountMapping - com.caplin.orders.barracuda.extension.config.SSOUserMapping - com.caplin.orders.barracuda.extension.config.SalesUserMapping - com.caplin.orders.barracuda.extension.config.ClientCodeMapping - com.caplin.orders.barracuda.extension.config.ClientTraderMapping You may inject the following classes: - @Named("CaplinProgramArgs") String[] - com.typesafe.config.Config - com.caplin.motif.fx.trading.orders.FXOrdersAdapter
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Methods inherited from class com.google.inject.AbstractModule

    addError, addError, addError, bind, bind, bind, bindConstant, binder, bindInterceptor, bindListener, bindListener, bindScope, configure, configure, convertToTypes, currentStage, getMembersInjector, getMembersInjector, getProvider, getProvider, install, requestInjection, requestStaticInjection, requireBinding, requireBinding

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • BarracudaOverridesModule

      public BarracudaOverridesModule()