// **********************************************************************
//
// Copyright (c) 2003-2010 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.
//
// **********************************************************************
// Ice version 3.4.0
package drakkar.oar.slice.transfer;
// <auto-generated>
//
// Generated from file `FileTransfer.ice'
//
// Warning: do not edit this file.
//
// </auto-generated>
public final class FilePrxHelper extends Ice.ObjectPrxHelperBase implements FilePrx
{
public byte[]
next()
{
return next(null, false);
}
public byte[]
next(java.util.Map<String, String> __ctx)
{
return next(__ctx, true);
}
private byte[]
next(java.util.Map<String, String> __ctx, boolean __explicitCtx)
{
if(__explicitCtx && __ctx == null)
{
__ctx = _emptyContext;
}
int __cnt = 0;
while(true)
{
Ice._ObjectDel __delBase = null;
try
{
__checkTwowayOnly("next");
__delBase = __getDelegate(false);
_FileDel __del = (_FileDel)__delBase;
return __del.next(__ctx);
}
catch(IceInternal.LocalExceptionWrapper __ex)
{
__handleExceptionWrapper(__delBase, __ex);
}
catch(Ice.LocalException __ex)
{
__cnt = __handleException(__delBase, __ex, null, __cnt);
}
}
}
private static final String __next_name = "next";
public Ice.AsyncResult begin_next()
{
return begin_next(null, false, null);
}
public Ice.AsyncResult begin_next(java.util.Map<String, String> __ctx)
{
return begin_next(__ctx, true, null);
}
public Ice.AsyncResult begin_next(Ice.Callback __cb)
{
return begin_next(null, false, __cb);
}
public Ice.AsyncResult begin_next(java.util.Map<String, String> __ctx, Ice.Callback __cb)
{
return begin_next(__ctx, true, __cb);
}
public Ice.AsyncResult begin_next(Callback_File_next __cb)
{
return begin_next(null, false, __cb);
}
public Ice.AsyncResult begin_next(java.util.Map<String, String> __ctx, Callback_File_next __cb)
{
return begin_next(__ctx, true, __cb);
}
private Ice.AsyncResult begin_next(java.util.Map<String, String> __ctx, boolean __explicitCtx, IceInternal.CallbackBase __cb)
{
__checkAsyncTwowayOnly(__next_name);
IceInternal.OutgoingAsync __result = new IceInternal.OutgoingAsync(this, __next_name, __cb);
try
{
__result.__prepare(__next_name, Ice.OperationMode.Normal, __ctx, __explicitCtx);
IceInternal.BasicStream __os = __result.__os();
__os.endWriteEncaps();
__result.__send(true);
}
catch(Ice.LocalException __ex)
{
__result.__exceptionAsync(__ex);
}
return __result;
}
public byte[] end_next(Ice.AsyncResult __result)
{
Ice.AsyncResult.__check(__result, this, __next_name);
if(!__result.__wait())
{
try
{
__result.__throwUserException();
}
catch(Ice.UserException __ex)
{
throw new Ice.UnknownUserException(__ex.ice_name());
}
}
byte[] __ret;
IceInternal.BasicStream __is = __result.__is();
__is.startReadEncaps();
__ret = Ice.ByteSeqHelper.read(__is);
__is.endReadEncaps();
return __ret;
}
public boolean
next_async(AMI_File_next __cb)
{
Ice.AsyncResult __r;
try
{
__checkTwowayOnly(__next_name);
__r = begin_next(null, false, __cb);
}
catch(Ice.TwowayOnlyException ex)
{
__r = new IceInternal.OutgoingAsync(this, __next_name, __cb);
__r.__exceptionAsync(ex);
}
return __r.sentSynchronously();
}
public boolean
next_async(AMI_File_next __cb, java.util.Map<String, String> __ctx)
{
Ice.AsyncResult __r;
try
{
__checkTwowayOnly(__next_name);
__r = begin_next(__ctx, true, __cb);
}
catch(Ice.TwowayOnlyException ex)
{
__r = new IceInternal.OutgoingAsync(this, __next_name, __cb);
__r.__exceptionAsync(ex);
}
return __r.sentSynchronously();
}
public static FilePrx
checkedCast(Ice.ObjectPrx __obj)
{
FilePrx __d = null;
if(__obj != null)
{
try
{
__d = (FilePrx)__obj;
}
catch(ClassCastException ex)
{
if(__obj.ice_isA("::drakkar::oar::slice::transfer::File"))
{
FilePrxHelper __h = new FilePrxHelper();
__h.__copyFrom(__obj);
__d = __h;
}
}
}
return __d;
}
public static FilePrx
checkedCast(Ice.ObjectPrx __obj, java.util.Map<String, String> __ctx)
{
FilePrx __d = null;
if(__obj != null)
{
try
{
__d = (FilePrx)__obj;
}
catch(ClassCastException ex)
{
if(__obj.ice_isA("::drakkar::oar::slice::transfer::File", __ctx))
{
FilePrxHelper __h = new FilePrxHelper();
__h.__copyFrom(__obj);
__d = __h;
}
}
}
return __d;
}
public static FilePrx
checkedCast(Ice.ObjectPrx __obj, String __facet)
{
FilePrx __d = null;
if(__obj != null)
{
Ice.ObjectPrx __bb = __obj.ice_facet(__facet);
try
{
if(__bb.ice_isA("::drakkar::oar::slice::transfer::File"))
{
FilePrxHelper __h = new FilePrxHelper();
__h.__copyFrom(__bb);
__d = __h;
}
}
catch(Ice.FacetNotExistException ex)
{
}
}
return __d;
}
public static FilePrx
checkedCast(Ice.ObjectPrx __obj, String __facet, java.util.Map<String, String> __ctx)
{
FilePrx __d = null;
if(__obj != null)
{
Ice.ObjectPrx __bb = __obj.ice_facet(__facet);
try
{
if(__bb.ice_isA("::drakkar::oar::slice::transfer::File", __ctx))
{
FilePrxHelper __h = new FilePrxHelper();
__h.__copyFrom(__bb);
__d = __h;
}
}
catch(Ice.FacetNotExistException ex)
{
}
}
return __d;
}
public static FilePrx
uncheckedCast(Ice.ObjectPrx __obj)
{
FilePrx __d = null;
if(__obj != null)
{
try
{
__d = (FilePrx)__obj;
}
catch(ClassCastException ex)
{
FilePrxHelper __h = new FilePrxHelper();
__h.__copyFrom(__obj);
__d = __h;
}
}
return __d;
}
public static FilePrx
uncheckedCast(Ice.ObjectPrx __obj, String __facet)
{
FilePrx __d = null;
if(__obj != null)
{
Ice.ObjectPrx __bb = __obj.ice_facet(__facet);
FilePrxHelper __h = new FilePrxHelper();
__h.__copyFrom(__bb);
__d = __h;
}
return __d;
}
protected Ice._ObjectDelM
__createDelegateM()
{
return new _FileDelM();
}
protected Ice._ObjectDelD
__createDelegateD()
{
return new _FileDelD();
}
public static void
__write(IceInternal.BasicStream __os, FilePrx v)
{
__os.writeProxy(v);
}
public static FilePrx
__read(IceInternal.BasicStream __is)
{
Ice.ObjectPrx proxy = __is.readProxy();
if(proxy != null)
{
FilePrxHelper result = new FilePrxHelper();
result.__copyFrom(proxy);
return result;
}
return null;
}
}