Example #1
0
        public static JvmManager Create(JvmManagerOptions options)
        {
            if (options == null) throw new ArgumentNullException(nameof(options));

            var result = new JvmManager(options);

            // start the JVM
            result.GetJavaVm();

            return result;
        }
Example #2
0
        private JvmManager(JvmManagerOptions options)
        {
            Debug.Assert(options != null);

            _options = options;
            _javaVmSemaphore = new SemaphoreSlim(1);
            _currentThreadProvider = new CurrentThreadProvider();
            _pooledThreadProvider = new PooledThreadProvider(options.MinThreadPoolSize);

            ProxyRegistry = new ProxyRegistry(options.GetProxyTypes());
        }