Beispiel #1
0
        public ContextControllerFactory Make(ContextControllerFactoryContext factoryContext, ContextDetail detail, IList <FilterSpecCompiled> optFiltersNested)
        {
            ContextControllerFactory factory;

            if (detail is ContextDetailInitiatedTerminated)
            {
                factory = new ContextControllerInitTermFactoryImpl(factoryContext, (ContextDetailInitiatedTerminated)detail);
            }
            else if (detail is ContextDetailPartitioned)
            {
                factory = new ContextControllerPartitionedFactoryImpl(factoryContext, (ContextDetailPartitioned)detail, optFiltersNested);
            }
            else if (detail is ContextDetailCategory)
            {
                factory = new ContextControllerCategoryFactoryImpl(factoryContext, (ContextDetailCategory)detail, optFiltersNested);
            }
            else if (detail is ContextDetailHash)
            {
                factory = new ContextControllerHashFactoryImpl(factoryContext, (ContextDetailHash)detail, optFiltersNested);
            }
            else
            {
                throw new UnsupportedOperationException("Context detail " + detail + " is not yet supported in a nested context");
            }

            return(factory);
        }
Beispiel #2
0
 public ContextControllerHash(int pathId, ContextControllerLifecycleCallback activationCallback, ContextControllerHashFactoryImpl factory)
 {
     _pathId             = pathId;
     _activationCallback = activationCallback;
     _factory            = factory;
 }