/// <summary>
 /// Registers a NiawaIpcEventTreeModelAdapterPool with the provider
 /// </summary>
 /// <param name="adapterPool"></param>
 public static void RegisterNiawaTreeModelAdapterPool(NiawaIpcEventTreeModelAdapterPool adapterPool)
 {
     try
     {
         _adapterPool = adapterPool;
     }
     catch (Exception ex)
     {
         Trace.TraceError("NiawaResourceProvider: Could not retrieve Tree Model Adapter Pool: " + ex.Message);
     }
 }
        /// <summary>
        /// Instantiates a NiawaIpcEventTreeModelAdapter.
        /// </summary>
        /// <param name="webPageSR"></param>
        public NiawaIpcEventTreeModelAdapter(NiawaSRHub webPageSR, NiawaIpcEventTreeModelAdapterPool adapterPool, string callerSessionID)
        {
            _lastUserActivity = DateTime.Now;
            _lastSessionPoll = DateTime.Now;
            _lastSessionPollAttempt = DateTime.Now;

            _adapterPool = adapterPool;
            _ipcEventQueue = new Queue<IpcController.IpcEvent>();

            _webPageSR = webPageSR;
            _callerSessionID = callerSessionID;

            //instantiate view
            _view = new TreeModel.TreeModelViewImpl(_webPageSR, callerSessionID);

            //instantiate node view factory
            _nodeViewFactory = new TreeModel.TreeModelNodeViewFactoryImpl();

            //instantiate tree model controller
            _treeModelController = new TreeModelNodeControls.TreeModelController(_view, _nodeViewFactory, null, "", callerSessionID);
        }
 /// <summary>
 /// Initializes adapter pool 
 /// </summary>
 private static void InitializeNiawaTreeModelAdapterPool()
 {
     _adapterPool = new NiawaIpcEventTreeModelAdapterPool();
 }