public static void Construct() { try { ModuleN.InitN(); JNIEnv env = JNIEnv.ThreadEnv; JniGlobalHandle hmHandle = env.NewGlobalRef((JniHandle)domain.GetData("hostManager")); JniGlobalHandle peerHandle = env.NewGlobalRef((JniHandle)domain.GetData("peer")); JniGlobalHandle itemHandle = env.NewGlobalRef((JniHandle)domain.GetData("item")); hostManager = Bridge.CreateProxy <IHostManager>(hmHandle); robotPeer = Bridge.CreateProxy <IRobotPeer>(peerHandle); specification = Bridge.CreateProxy <IRobotItem>(itemHandle); statics = ((RobotStatics)domain.GetData("statics")); CreateProxy(); Assembly assembly = Assembly.LoadFrom(robotAssemblyShadowFileName); Reflection.CheckAssembly(assembly); string robotFullName = specification.getFullClassName(); robotType = assembly.GetType(robotFullName, false); robotProxy.setRobotType(robotType); } catch (Exception ex) { LoggerN.logError(ex); throw; } }
protected HostingRobotProxy(IRobotItem robotSpecification, IHostManager hostManager, IRobotPeer peer, RobotStatics statics) { this.peer = peer; this.statics = statics; this.hostManager = hostManager; this.robotSpecification = robotSpecification; outputSb = new StringBuilder(5000); output = TextWriter.Synchronized(new StringWriter(outputSb)); LoggerN.robotOut = output; robotFileSystemManager = new RobotFileSystemManager(this, (int)hostManager.getRobotFilesystemQuota(), robotSpecification.getWritableDirectory(), robotSpecification.getReadableDirectory()); }
public BasicRobotProxy(IRobotRepositoryItem specification, IHostManager hostManager, IRobotPeer peer, RobotStatics statics) : base(specification, hostManager, peer, statics) { eventManager = new EventManager(this); graphicsProxy = new GraphicsProxy(); // dummy execResults = new ExecResults(null, null, null, null, null, false, false, false); setSetCallCount(0); setGetCallCount(0); var sharedBuffer = new byte[10 * 1024 * 100]; execJavaBuffer = new DirectByteBuffer(sharedBuffer); execNetBuffer = ByteBuffer.wrap(sharedBuffer); rbSerializerN = new RbSerializerN(); this.peer.setupBuffer(execJavaBuffer); }
public StandardRobotProxy(IRobotItem specification, IHostManager hostManager, IRobotPeer peer, RobotStatics statics) : base(specification, hostManager, peer, statics) { }
public JuniorRobotProxy(IRobotRepositoryItem specification, IHostManager hostManager, IRobotPeer peer, RobotStatics statics) : base(specification, hostManager, peer, statics) { }