Beispiel #1
0
        public void enqueue(Ice.BatchRequest request, int count, int size)
        {
            test(request.getOperation().Equals("opByteSOneway") || request.getOperation().Equals("ice_ping"));
            test(request.getProxy().ice_isBatchOneway());

            if(count > 0)
            {
                test(_lastRequestSize + _size == size);
            }
            _count = count;
            _size = size;

            if(_size + request.getSize() > 25000)
            {
                request.getProxy().begin_ice_flushBatchRequests();
                _size = 18; // header
            }

            if(_enabled)
            {
                _lastRequestSize = request.getSize();
                ++_count;
                request.enqueue();
            }
        }
Beispiel #2
0
 private void initCompleted(Ice.AsyncResult r)
 {
     Ice.RemoteLoggerPrx remoteLogger = Ice.RemoteLoggerPrxHelper.uncheckedCast(r.getProxy());
     
     try 
     {
         remoteLogger.end_init(r);
         
         if(_traceLevel > 1)
         {
             _logger.trace(_traceCategory, r.getOperation() + " on `" + remoteLogger.ToString() 
                           + "' completed successfully");
         }
     }
     catch(Ice.LocalException ex)
     {
         deadRemoteLogger(remoteLogger, _logger, ex, r.getOperation());
     }      
 }
Beispiel #3
0
        private void logCompleted(Ice.AsyncResult r)
        {
            Ice.RemoteLoggerPrx remoteLogger = Ice.RemoteLoggerPrxHelper.uncheckedCast(r.getProxy());

            try
            {
            remoteLogger.end_log(r);

            if(_loggerAdmin.getTraceLevel() > 1)
            {
                _localLogger.trace(_traceCategory, r.getOperation() + " on `" + remoteLogger.ToString()
                                   + "' completed successfully");
            }
            }
            catch(Ice.CommunicatorDestroyedException)
            {
            // expected if there are outstanding calls during communicator destruction
            }
            catch(Ice.LocalException ex)
            {
            _loggerAdmin.deadRemoteLogger(remoteLogger, _localLogger, ex, r.getOperation());
            }
        }
Beispiel #4
0
 public static AsyncResultI check(Ice.AsyncResult r, string operation)
 {
     if(r == null)
     {
         throw new System.ArgumentException("AsyncResult == null");
     }
     if(r.getOperation() != operation)
     {
         throw new System.ArgumentException("Incorrect operation for end_" + operation + " method: " +
                                            r.getOperation());
     }
     if(!(r is AsyncResultI))
     {
         throw new System.ArgumentException("Incorrect AsyncResult object for end_" + operation + " method");
     }
     return (AsyncResultI)r;
 }