本文整理汇总了C#中Ice.getProperties方法的典型用法代码示例。如果您正苦于以下问题:C# Ice.getProperties方法的具体用法?C# Ice.getProperties怎么用?C# Ice.getProperties使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Ice
的用法示例。
在下文中一共展示了Ice.getProperties方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: run
private static int run(string[] args, Ice.Communicator communicator)
{
communicator.getProperties().setProperty("TestAdapter1.Endpoints", "default -p 12010:udp");
communicator.getProperties().setProperty("TestAdapter1.ThreadPool.Size", "5");
communicator.getProperties().setProperty("TestAdapter1.ThreadPool.SizeMax", "5");
communicator.getProperties().setProperty("TestAdapter1.ThreadPool.SizeWarn", "0");
communicator.getProperties().setProperty("TestAdapter1.ThreadPool.Serialize", "0");
Ice.ObjectAdapter adapter1 = communicator.createObjectAdapter("TestAdapter1");
adapter1.add(new HoldI(adapter1), communicator.stringToIdentity("hold"));
communicator.getProperties().setProperty("TestAdapter2.Endpoints", "default -p 12011:udp");
communicator.getProperties().setProperty("TestAdapter2.ThreadPool.Size", "5");
communicator.getProperties().setProperty("TestAdapter2.ThreadPool.SizeMax", "5");
communicator.getProperties().setProperty("TestAdapter2.ThreadPool.SizeWarn", "0");
communicator.getProperties().setProperty("TestAdapter2.ThreadPool.Serialize", "1");
Ice.ObjectAdapter adapter2 = communicator.createObjectAdapter("TestAdapter2");
adapter2.add(new HoldI(adapter2), communicator.stringToIdentity("hold"));
adapter1.activate();
adapter2.activate();
communicator.waitForShutdown();
return 0;
}
示例2: ServiceManagerI
public ServiceManagerI(Ice.Communicator communicator, string[] args)
{
_communicator = communicator;
_logger = _communicator.getLogger();
Ice.Properties props = _communicator.getProperties();
if(props.getProperty("Ice.Admin.Enabled").Length == 0)
{
_adminEnabled = props.getProperty("Ice.Admin.Endpoints").Length > 0;
}
else
{
_adminEnabled = props.getPropertyAsInt("Ice.Admin.Enabled") > 0;
}
if(_adminEnabled)
{
string[] facetFilter = props.getPropertyAsList("Ice.Admin.Facets");
if(facetFilter.Length > 0)
{
_adminFacetFilter = new HashSet<string>(facetFilter);
}
else
{
_adminFacetFilter = new HashSet<string>();
}
}
_argv = args;
_traceServiceObserver = _communicator.getProperties().getPropertyAsInt("IceBox.Trace.ServiceObserver");
}
示例3: start
public void start(string name, Ice.Communicator communicator, string[] args)
{
Console.WriteLine("STARTING Service: {0}", name);
string prop = communicator.getProperties().getProperty("IDHT.Master");
bool isMasterNode = (prop == null)? false: prop.Equals("1");
if (isMasterNode)
{
Console.WriteLine("Is master node");
}
_node = new DHTNodeI(communicator.getProperties().getProperty(name+".AdapterId"), isMasterNode, communicator);
_adapter = communicator.createObjectAdapter(name);
_adapter.add(_node, Ice.Util.stringToIdentity(Constants.SERVICE_NAME));
_adapter.activate();
}
示例4: run
public static int run(string[] args, Ice.Communicator communicator)
{
communicator.getProperties().setProperty("TestAdapter.Endpoints", "default -p 12010");
communicator.getProperties().setProperty("TestAdapter.ACM.Timeout", "0");
Ice.ObjectAdapter adapter = communicator.createObjectAdapter("TestAdapter");
Ice.Identity id = communicator.stringToIdentity("communicator");
adapter.add(new RemoteCommunicatorI(), id);
adapter.activate();
communicator.getProperties().setProperty("Ice.PrintAdapterReady", "0");
communicator.waitForShutdown();
return 0;
}
示例5: run
private static int run(string[] args, Ice.Communicator communicator)
{
//
// We don't want connection warnings because of the timeout test.
//
communicator.getProperties().setProperty("Ice.Warn.Connections", "0");
communicator.getProperties().setProperty("TestAdapter.Endpoints", "default -p 12010:udp");
Ice.ObjectAdapter adapter = communicator.createObjectAdapter("TestAdapter");
adapter.add(new MyDerivedClassI(), communicator.stringToIdentity("test"));
adapter.activate();
communicator.waitForShutdown();
return 0;
}
示例6: ServiceManagerI
public ServiceManagerI(Ice.Communicator communicator, string[] args)
{
_communicator = communicator;
_logger = _communicator.getLogger();
_argv = args;
_traceServiceObserver = _communicator.getProperties().getPropertyAsInt("IceBox.Trace.ServiceObserver");
}
示例7: run
private static int run(string[] args, Ice.Communicator communicator)
{
communicator.getProperties().setProperty("TestAdapter.Endpoints", "default -p 12010:udp");
Ice.ObjectAdapter adapter = communicator.createObjectAdapter("TestAdapter");
adapter.add(new decimalI(), communicator.stringToIdentity("test"));
adapter.add(new Test1I(), communicator.stringToIdentity("test1"));
adapter.add(new Test2I(), communicator.stringToIdentity("test2"));
adapter.activate();
Console.Out.Write("testing operation name... ");
Console.Out.Flush();
@[email protected] p = @[email protected](
adapter.createProxy(communicator.stringToIdentity("test")));
[email protected]();
Console.Out.WriteLine("ok");
Console.Out.Write("testing System as module name... ");
Console.Out.Flush();
@abstract.System.TestPrx t1 = @abstract.System.TestPrxHelper.uncheckedCast(
adapter.createProxy(communicator.stringToIdentity("test1")));
t1.op();
System.TestPrx t2 = System.TestPrxHelper.uncheckedCast(
adapter.createProxy(communicator.stringToIdentity("test2")));
t2.op();
Console.Out.WriteLine("ok");
Console.Out.Write("testing types... ");
Console.Out.Flush();
testtypes();
Console.Out.WriteLine("ok");
return 0;
}
示例8: run
private static int run(String[] args, Ice.Communicator communicator)
{
communicator.getProperties().setProperty("TestAdapter.AdapterId", "test");
communicator.getProperties().setProperty("TestAdapter.Endpoints", "default -p 12010:udp");
Ice.ObjectAdapter adapter = communicator.createObjectAdapter("TestAdapter");
Ice.ObjectPrx prx = adapter.add(new MyDerivedClassI(), communicator.stringToIdentity("test"));
//adapter.activate(); // Don't activate OA to ensure collocation is used.
if(prx.ice_getConnection() != null)
{
throw new System.Exception();
}
AllTests.allTests(communicator);
return 0;
}
示例9: start
public void start(string name, Ice.Communicator communicator, string[] args)
{
_adapter = communicator.createObjectAdapter("Hello-" + name);
string helloIdentity = communicator.getProperties().getProperty("Hello.Identity");
_adapter.add(new HelloI(name), Ice.Util.stringToIdentity(helloIdentity));
_adapter.activate();
}
示例10: run
private static int run(string[] args, Ice.Communicator communicator)
{
communicator.getProperties().setProperty("TestAdapter.Endpoints", "default -p 12010");
communicator.getProperties().setProperty("ControllerAdapter.Endpoints", "tcp -p 12011");
communicator.getProperties().setProperty("ControllerAdapter.ThreadPool.Size", "1");
Ice.ObjectAdapter adapter = communicator.createObjectAdapter("TestAdapter");
Ice.ObjectAdapter adapter2 = communicator.createObjectAdapter("ControllerAdapter");
adapter.add(new TestI(), communicator.stringToIdentity("test"));
adapter.activate();
adapter2.add(new TestControllerI(adapter), communicator.stringToIdentity("testController"));
adapter2.activate();
communicator.waitForShutdown();
return 0;
}
示例11: run
private static int run(string[] args, Ice.Communicator communicator)
{
communicator.getProperties().setProperty("TestAdapter.Endpoints", "default -p 12010");
communicator.getProperties().setProperty("ControllerAdapter.Endpoints", "default -p 12011");
communicator.getProperties().setProperty("ControllerAdapter.ThreadPool.Size", "1");
Ice.ObjectAdapter adapter = communicator.createObjectAdapter("TestAdapter");
Ice.ObjectAdapter adapter2 = communicator.createObjectAdapter("ControllerAdapter");
adapter.add(new TestI(), communicator.stringToIdentity("test"));
//adapter.activate(); // Collocated test doesn't need to activate the OA
adapter2.add(new TestControllerI(adapter), communicator.stringToIdentity("testController"));
//adapter2.activate(); // Collocated test doesn't need to activate the OA
AllTests.allTests(communicator, true);
return 0;
}
示例12: run
private static int run(string[] args, Ice.Communicator communicator)
{
communicator.getProperties().setProperty("TestAdapter.Endpoints", "default -p 12010 -t 2000");
Ice.ObjectAdapter adapter = communicator.createObjectAdapter("TestAdapter");
Ice.Object @object = new Test.ChecksumI();
adapter.add(@object, Ice.Util.stringToIdentity("test"));
adapter.activate();
communicator.waitForShutdown();
return 0;
}
示例13: run
private static int run(string[] args, Ice.Communicator communicator)
{
communicator.getProperties().setProperty("TestAdapter.Endpoints", "default -p 12010");
Ice.ObjectAdapter adapter = communicator.createObjectAdapter("TestAdapter");
adapter.add(new MyClassI(), communicator.stringToIdentity("test"));
adapter.activate();
communicator.waitForShutdown();
return 0;
}
示例14: run
private static int run(string[] args, Ice.Communicator communicator)
{
communicator.getProperties().setProperty("TestAdapter.Endpoints", "default -p 12010");
Ice.ObjectAdapter adapter = communicator.createObjectAdapter("TestAdapter");
Initial initial = new InitialI(adapter);
adapter.add(initial, communicator.stringToIdentity("initial"));
AllTests.allTests(communicator, true);
// We must call shutdown even in the collocated case for cyclic dependency cleanup
initial.shutdown();
return 0;
}
示例15: run
private static int run(string[] args, Ice.Communicator communicator)
{
communicator.getProperties().setProperty("TestAdapter.Endpoints", "tcp -p 12010");
Ice.ObjectAdapter adapter = communicator.createObjectAdapter("TestAdapter");
Ice.Identity id = communicator.stringToIdentity("factory");
adapter.add(new ServerFactoryI(), id);
adapter.activate();
communicator.waitForShutdown();
return 0;
}