Inheritance: System.MarshalByRefObject, Monodoc.Lucene.Net.Search.Searchable
Exemple #1
0
        public static void  Main(System.String[] args)
        {
            System.Runtime.Remoting.RemotingConfiguration.Configure("Monodoc.Lucene.Net.Search.RemoteSearchable.config");
            System.Runtime.Remoting.Channels.ChannelServices.RegisterChannel(new System.Runtime.Remoting.Channels.Http.HttpChannel(1099));
            // create and install a security manager
            if (false)             //{{}}// if (System.getSecurityManager() == null)    // {{Aroush}} >> 'java.lang.System.getSecurityManager()'
            {
                //{{}}// System.setSecurityManager(new RMISecurityManager());   // {{Aroush}} >> 'java.lang.System.setSecurityManager()' and 'java.rmi.RMISecurityManager.RMISecurityManager()'
            }

            Monodoc.Lucene.Net.Search.Searchable local = new IndexSearcher(args[0]);
            RemoteSearchable impl = new RemoteSearchable(local);

            // bind the implementation to "Searchable"
            System.Runtime.Remoting.RemotingServices.Marshal(impl, "tcp://localhost:1099/Searchable");
            System.Console.ReadLine();
        }
Exemple #2
0
		public static void  Main(System.String[] args)
		{
			System.Runtime.Remoting.RemotingConfiguration.Configure("Monodoc.Lucene.Net.Search.RemoteSearchable.config");
			System.Runtime.Remoting.Channels.ChannelServices.RegisterChannel(new System.Runtime.Remoting.Channels.Http.HttpChannel(1099));
			// create and install a security manager
			if (false) //{{}}// if (System.getSecurityManager() == null)    // {{Aroush}} >> 'java.lang.System.getSecurityManager()'
			{
				//{{}}// System.setSecurityManager(new RMISecurityManager());   // {{Aroush}} >> 'java.lang.System.setSecurityManager()' and 'java.rmi.RMISecurityManager.RMISecurityManager()'
			}
			
			Monodoc.Lucene.Net.Search.Searchable local = new IndexSearcher(args[0]);
			RemoteSearchable impl = new RemoteSearchable(local);
			
			// bind the implementation to "Searchable"
			System.Runtime.Remoting.RemotingServices.Marshal(impl, "tcp://localhost:1099/Searchable");
			System.Console.ReadLine();
		}