コード例 #1
0
 /// <summary>
 /// Register processor to process command that has the command code of cmdCode.
 /// </summary>
 /// <param name="cmdCode"> </param>
 /// <param name="processor"> </param>
 public virtual void registerProcessor(CommandCode cmdCode, RemotingProcessor processor)
 {
     if (cmd2processors.ContainsKey(cmdCode))
     {
         //JAVA TO C# CONVERTER WARNING: The .NET Type.FullName property will not always yield results identical to the Java Class.getName method:
         cmd2processors.TryGetValue(cmdCode, out var remotingProcessor);
         logger.LogWarning("Processor for cmd={} is already registered, the processor is {}, and changed to {}", cmdCode, ikvm.extensions.ExtensionMethods.getClass(remotingProcessor).getName(), ikvm.extensions.ExtensionMethods.getClass(processor).getName());
     }
     cmd2processors.AddOrUpdate(cmdCode, processor, (commandCode, remotingProcessor) => processor);
 }
コード例 #2
0
 /// <summary>
 /// Register the default processor to process command with no specific processor registered.
 /// </summary>
 /// <param name="processor"> </param>
 public virtual void registerDefaultProcessor(RemotingProcessor processor)
 {
     if (defaultProcessor == null)
     {
         defaultProcessor = processor;
     }
     else
     {
         throw new System.InvalidOperationException("The defaultProcessor has already been registered: " + defaultProcessor.GetType());
     }
 }
コード例 #3
0
 /// <seealso cref= RemotingServer#registerProcessor(byte, CommandCode, RemotingProcessor) </seealso>
 public override void registerProcessor(byte protocolCode, CommandCode cmd, RemotingProcessor processor)
 {
     ProtocolManager.getProtocol(ProtocolCode.fromBytes(protocolCode)).CommandHandler.registerProcessor(cmd, processor);
 }
コード例 #4
0
 public void registerProcessor(CommandCode cmd, RemotingProcessor processor)
 {
     processorManager.registerProcessor(cmd, processor);
 }
コード例 #5
0
 public abstract void registerProcessor(byte protocolCode, CommandCode commandCode, RemotingProcessor processor);