diff options
Diffstat (limited to 'java/src/IceInternal/ProxyBatchOutgoingAsync.java')
-rw-r--r-- | java/src/IceInternal/ProxyBatchOutgoingAsync.java | 97 |
1 files changed, 0 insertions, 97 deletions
diff --git a/java/src/IceInternal/ProxyBatchOutgoingAsync.java b/java/src/IceInternal/ProxyBatchOutgoingAsync.java deleted file mode 100644 index 4a575142da7..00000000000 --- a/java/src/IceInternal/ProxyBatchOutgoingAsync.java +++ /dev/null @@ -1,97 +0,0 @@ -// ********************************************************************** -// -// Copyright (c) 2003-2014 ZeroC, Inc. All rights reserved. -// -// This copy of Ice is licensed to you under the terms described in the -// ICE_LICENSE file included in this distribution. -// -// ********************************************************************** - -package IceInternal; - -public class ProxyBatchOutgoingAsync extends BatchOutgoingAsync -{ - public ProxyBatchOutgoingAsync(Ice.ObjectPrxHelperBase prx, String operation, CallbackBase callback) - { - super(prx.ice_getCommunicator(), prx.__reference().getInstance(), operation, callback); - _proxy = prx; - _observer = ObserverHelper.get(prx, operation); - } - - public void __invoke() - { - Protocol.checkSupportedProtocol(_proxy.__reference().getProtocol()); - - try - { - _handler = _proxy.__getRequestHandler(); - int status = _handler.sendAsyncRequest(this); - if((status & AsyncStatus.Sent) > 0) - { - _sentSynchronously = true; - if((status & AsyncStatus.InvokeSentCallback) > 0) - { - invokeSent(); - } - } - else - { - synchronized(_monitor) - { - if((_state & StateDone) == 0) - { - int invocationTimeout = _handler.getReference().getInvocationTimeout(); - if(invocationTimeout > 0) - { - _future = _instance.timer().schedule(new Runnable() - { - @Override - public void run() - { - timeout(); - } - }, invocationTimeout, java.util.concurrent.TimeUnit.MILLISECONDS); - _timeoutRequestHandler = _handler; - } - } - } - } - } - catch(RetryException ex) - { - // - // Clear request handler but don't retry or throw. Retrying - // isn't useful, there were no batch requests associated with - // the proxy's request handler. - // - _proxy.__setRequestHandler(_handler, null); - } - catch(Ice.Exception ex) - { - if(_observer != null) - { - _observer.failed(ex.ice_name()); - } - _proxy.__setRequestHandler(_handler, null); // Clear request handler - throw ex; // Throw to notify the user lthat batch requests were potentially lost. - } - } - - @Override - public Ice.ObjectPrx getProxy() - { - return _proxy; - } - - @Override - protected void cancelRequest() - { - if(_handler != null) - { - _handler.asyncRequestCanceled(this, new Ice.OperationInterruptedException()); - } - } - - final private Ice.ObjectPrxHelperBase _proxy; - private RequestHandler _handler = null; -} |