summaryrefslogtreecommitdiff
path: root/java/src/Ice/AMI_Object_ice_flushBatchRequests.java
blob: 08d363273afa4acadf4fb0c00f4e918f370d17bc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
// **********************************************************************
//
// Copyright (c) 2003-2009 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 Ice;

public abstract class AMI_Object_ice_flushBatchRequests extends IceInternal.BatchOutgoingAsync
{
    public abstract void ice_exception(LocalException ex);

    public final boolean __invoke(Ice.ObjectPrx prx)
    {
        __acquireCallback(prx);
        try
        {
            //
            // We don't automatically retry if ice_flushBatchRequests fails. Otherwise, if some batch
            // requests were queued with the connection, they would be lost without being noticed.
            //
            Ice._ObjectDel delegate = null;
            int cnt = -1; // Don't retry.
            Ice.ObjectPrxHelperBase proxy = (Ice.ObjectPrxHelperBase)prx;
            try
            {
                delegate = proxy.__getDelegate(true);
                return delegate.__getRequestHandler().flushAsyncBatchRequests(this);
            }
            catch(Ice.LocalException ex)
            {
                cnt = proxy.__handleException(delegate, ex, null, cnt);
            }
        }
        catch(Ice.LocalException ex)
        {
            __releaseCallback(ex);
        }
        return false;
    }
}