Ice.RouterPrxHelper Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ice-compat Show documentation
Show all versions of ice-compat Show documentation
Ice is a comprehensive RPC framework that helps you build distributed applications with minimal effort using familiar object-oriented idioms
// **********************************************************************
//
// Copyright (c) 2003-2018 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.7.1
//
//
//
// Generated from file `Router.ice'
//
// Warning: do not edit this file.
//
//
//
package Ice;
/**
* Provides type-specific helper functions.
**/
public final class RouterPrxHelper extends ObjectPrxHelperBase implements RouterPrx
{
private static final String _addProxies_name = "addProxies";
public Ice.ObjectPrx[] addProxies(Ice.ObjectPrx[] proxies)
{
return _iceI_addProxies(proxies, null, false);
}
public Ice.ObjectPrx[] addProxies(Ice.ObjectPrx[] proxies, java.util.Map context)
{
return _iceI_addProxies(proxies, context, true);
}
private Ice.ObjectPrx[] _iceI_addProxies(Ice.ObjectPrx[] iceP_proxies, java.util.Map context, boolean explicitCtx)
{
_checkTwowayOnly(_addProxies_name);
return end_addProxies(_iceI_begin_addProxies(iceP_proxies, context, explicitCtx, true, null));
}
public AsyncResult begin_addProxies(Ice.ObjectPrx[] proxies)
{
return _iceI_begin_addProxies(proxies, null, false, false, null);
}
public AsyncResult begin_addProxies(Ice.ObjectPrx[] proxies, java.util.Map context)
{
return _iceI_begin_addProxies(proxies, context, true, false, null);
}
public AsyncResult begin_addProxies(Ice.ObjectPrx[] proxies, Callback cb)
{
return _iceI_begin_addProxies(proxies, null, false, false, cb);
}
public AsyncResult begin_addProxies(Ice.ObjectPrx[] proxies, java.util.Map context, Callback cb)
{
return _iceI_begin_addProxies(proxies, context, true, false, cb);
}
public AsyncResult begin_addProxies(Ice.ObjectPrx[] proxies, Callback_Router_addProxies cb)
{
return _iceI_begin_addProxies(proxies, null, false, false, cb);
}
public AsyncResult begin_addProxies(Ice.ObjectPrx[] proxies, java.util.Map context, Callback_Router_addProxies cb)
{
return _iceI_begin_addProxies(proxies, context, true, false, cb);
}
public AsyncResult begin_addProxies(Ice.ObjectPrx[] proxies,
IceInternal.Functional_GenericCallback1 responseCb,
IceInternal.Functional_GenericCallback1 exceptionCb)
{
return _iceI_begin_addProxies(proxies, null, false, false, responseCb, exceptionCb, null);
}
public AsyncResult begin_addProxies(Ice.ObjectPrx[] proxies,
IceInternal.Functional_GenericCallback1 responseCb,
IceInternal.Functional_GenericCallback1 exceptionCb,
IceInternal.Functional_BoolCallback sentCb)
{
return _iceI_begin_addProxies(proxies, null, false, false, responseCb, exceptionCb, sentCb);
}
public AsyncResult begin_addProxies(Ice.ObjectPrx[] proxies,
java.util.Map context,
IceInternal.Functional_GenericCallback1 responseCb,
IceInternal.Functional_GenericCallback1 exceptionCb)
{
return _iceI_begin_addProxies(proxies, context, true, false, responseCb, exceptionCb, null);
}
public AsyncResult begin_addProxies(Ice.ObjectPrx[] proxies,
java.util.Map context,
IceInternal.Functional_GenericCallback1 responseCb,
IceInternal.Functional_GenericCallback1 exceptionCb,
IceInternal.Functional_BoolCallback sentCb)
{
return _iceI_begin_addProxies(proxies, context, true, false, responseCb, exceptionCb, sentCb);
}
private AsyncResult _iceI_begin_addProxies(Ice.ObjectPrx[] iceP_proxies,
java.util.Map context,
boolean explicitCtx,
boolean synchronous,
IceInternal.Functional_GenericCallback1 responseCb,
IceInternal.Functional_GenericCallback1 exceptionCb,
IceInternal.Functional_BoolCallback sentCb)
{
return _iceI_begin_addProxies(iceP_proxies,
context,
explicitCtx,
synchronous,
new IceInternal.Functional_TwowayCallbackArg1(responseCb, exceptionCb, sentCb)
{
public final void _iceCompleted(AsyncResult result)
{
RouterPrxHelper._iceI_addProxies_completed(this, result);
}
});
}
private AsyncResult _iceI_begin_addProxies(Ice.ObjectPrx[] iceP_proxies,
java.util.Map context,
boolean explicitCtx,
boolean synchronous,
IceInternal.CallbackBase cb)
{
_checkAsyncTwowayOnly(_addProxies_name);
IceInternal.OutgoingAsync result = getOutgoingAsync(_addProxies_name, cb);
try
{
result.prepare(_addProxies_name, Ice.OperationMode.Idempotent, context, explicitCtx, synchronous);
OutputStream ostr = result.startWriteParams(Ice.FormatType.DefaultFormat);
ObjectProxySeqHelper.write(ostr, iceP_proxies);
result.endWriteParams();
result.invoke();
}
catch(Exception ex)
{
result.abort(ex);
}
return result;
}
public Ice.ObjectPrx[] end_addProxies(AsyncResult iresult)
{
IceInternal.OutgoingAsync result_ = IceInternal.OutgoingAsync.check(iresult, this, _addProxies_name);
try
{
if(!result_.waitForResponseOrUserEx())
{
try
{
result_.throwUserException();
}
catch(UserException ex_)
{
throw new UnknownUserException(ex_.ice_id(), ex_);
}
}
InputStream istr_ = result_.startReadParams();
Ice.ObjectPrx[] ret_;
ret_ = ObjectProxySeqHelper.read(istr_);
result_.endReadParams();
return ret_;
}
finally
{
if(result_ != null)
{
result_.cacheMessageBuffers();
}
}
}
static public void _iceI_addProxies_completed(TwowayCallbackArg1 cb, Ice.AsyncResult result)
{
Ice.RouterPrx _proxy = (Ice.RouterPrx)result.getProxy();
Ice.ObjectPrx[] ret = null;
try
{
ret = _proxy.end_addProxies(result);
}
catch(LocalException ex)
{
cb.exception(ex);
return;
}
catch(SystemException ex)
{
cb.exception(ex);
return;
}
cb.response(ret);
}
private static final String _getClientProxy_name = "getClientProxy";
public Ice.ObjectPrx getClientProxy(Ice.BooleanOptional hasRoutingTable)
{
return _iceI_getClientProxy(hasRoutingTable, null, false);
}
public Ice.ObjectPrx getClientProxy(Ice.BooleanOptional hasRoutingTable, java.util.Map context)
{
return _iceI_getClientProxy(hasRoutingTable, context, true);
}
private Ice.ObjectPrx _iceI_getClientProxy(Ice.BooleanOptional iceP_hasRoutingTable, java.util.Map context, boolean explicitCtx)
{
_checkTwowayOnly(_getClientProxy_name);
return end_getClientProxy(iceP_hasRoutingTable, _iceI_begin_getClientProxy(context, explicitCtx, true, null));
}
public AsyncResult begin_getClientProxy()
{
return _iceI_begin_getClientProxy(null, false, false, null);
}
public AsyncResult begin_getClientProxy(java.util.Map context)
{
return _iceI_begin_getClientProxy(context, true, false, null);
}
public AsyncResult begin_getClientProxy(Callback cb)
{
return _iceI_begin_getClientProxy(null, false, false, cb);
}
public AsyncResult begin_getClientProxy(java.util.Map context, Callback cb)
{
return _iceI_begin_getClientProxy(context, true, false, cb);
}
public AsyncResult begin_getClientProxy(Callback_Router_getClientProxy cb)
{
return _iceI_begin_getClientProxy(null, false, false, cb);
}
public AsyncResult begin_getClientProxy(java.util.Map context, Callback_Router_getClientProxy cb)
{
return _iceI_begin_getClientProxy(context, true, false, cb);
}
public AsyncResult begin_getClientProxy(FunctionalCallback_Router_getClientProxy_Response responseCb,
IceInternal.Functional_GenericCallback1 exceptionCb)
{
return _iceI_begin_getClientProxy(null, false, false, responseCb, exceptionCb, null);
}
public AsyncResult begin_getClientProxy(FunctionalCallback_Router_getClientProxy_Response responseCb,
IceInternal.Functional_GenericCallback1 exceptionCb,
IceInternal.Functional_BoolCallback sentCb)
{
return _iceI_begin_getClientProxy(null, false, false, responseCb, exceptionCb, sentCb);
}
public AsyncResult begin_getClientProxy(java.util.Map context,
FunctionalCallback_Router_getClientProxy_Response responseCb,
IceInternal.Functional_GenericCallback1 exceptionCb)
{
return _iceI_begin_getClientProxy(context, true, false, responseCb, exceptionCb, null);
}
public AsyncResult begin_getClientProxy(java.util.Map context,
FunctionalCallback_Router_getClientProxy_Response responseCb,
IceInternal.Functional_GenericCallback1 exceptionCb,
IceInternal.Functional_BoolCallback sentCb)
{
return _iceI_begin_getClientProxy(context, true, false, responseCb, exceptionCb, sentCb);
}
private AsyncResult _iceI_begin_getClientProxy(java.util.Map context,
boolean explicitCtx,
boolean synchronous,
FunctionalCallback_Router_getClientProxy_Response responseCb,
IceInternal.Functional_GenericCallback1 exceptionCb,
IceInternal.Functional_BoolCallback sentCb)
{
class CB extends IceInternal.Functional_TwowayCallback implements Ice._Callback_Router_getClientProxy
{
public CB(FunctionalCallback_Router_getClientProxy_Response responseCb,
IceInternal.Functional_GenericCallback1 exceptionCb,
IceInternal.Functional_BoolCallback sentCb)
{
super(responseCb != null, exceptionCb, sentCb);
_responseCb = responseCb;
}
public void response(Ice.ObjectPrx ret, Ice.BooleanOptional hasRoutingTable)
{
if(_responseCb != null)
{
_responseCb.apply(ret, hasRoutingTable);
}
}
public final void _iceCompleted(AsyncResult result)
{
RouterPrxHelper._iceI_getClientProxy_completed(this, result);
}
private final FunctionalCallback_Router_getClientProxy_Response _responseCb;
}
return _iceI_begin_getClientProxy(context, explicitCtx, synchronous, new CB(responseCb, exceptionCb, sentCb));
}
private AsyncResult _iceI_begin_getClientProxy(java.util.Map context,
boolean explicitCtx,
boolean synchronous,
IceInternal.CallbackBase cb)
{
_checkAsyncTwowayOnly(_getClientProxy_name);
IceInternal.OutgoingAsync result = getOutgoingAsync(_getClientProxy_name, cb);
try
{
result.prepare(_getClientProxy_name, Ice.OperationMode.Nonmutating, context, explicitCtx, synchronous);
result.writeEmptyParams();
result.invoke();
}
catch(Exception ex)
{
result.abort(ex);
}
return result;
}
public Ice.ObjectPrx end_getClientProxy(Ice.BooleanOptional hasRoutingTable, AsyncResult iresult)
{
IceInternal.OutgoingAsync result_ = IceInternal.OutgoingAsync.check(iresult, this, _getClientProxy_name);
try
{
if(!result_.waitForResponseOrUserEx())
{
try
{
result_.throwUserException();
}
catch(UserException ex_)
{
throw new UnknownUserException(ex_.ice_id(), ex_);
}
}
InputStream istr_ = result_.startReadParams();
Ice.ObjectPrx ret_;
ret_ = istr_.readProxy();
istr_.readBool(1, hasRoutingTable);
result_.endReadParams();
return ret_;
}
finally
{
if(result_ != null)
{
result_.cacheMessageBuffers();
}
}
}
static public void _iceI_getClientProxy_completed(_Callback_Router_getClientProxy cb, Ice.AsyncResult result)
{
Ice.RouterPrx _proxy = (Ice.RouterPrx)result.getProxy();
Ice.ObjectPrx ret = null;
Ice.BooleanOptional iceP_hasRoutingTable = new Ice.BooleanOptional();
try
{
ret = _proxy.end_getClientProxy(iceP_hasRoutingTable, result);
}
catch(LocalException ex)
{
cb.exception(ex);
return;
}
catch(SystemException ex)
{
cb.exception(ex);
return;
}
cb.response(ret, iceP_hasRoutingTable);
}
private static final String _getServerProxy_name = "getServerProxy";
public Ice.ObjectPrx getServerProxy()
{
return _iceI_getServerProxy(null, false);
}
public Ice.ObjectPrx getServerProxy(java.util.Map context)
{
return _iceI_getServerProxy(context, true);
}
private Ice.ObjectPrx _iceI_getServerProxy(java.util.Map context, boolean explicitCtx)
{
_checkTwowayOnly(_getServerProxy_name);
return end_getServerProxy(_iceI_begin_getServerProxy(context, explicitCtx, true, null));
}
public AsyncResult begin_getServerProxy()
{
return _iceI_begin_getServerProxy(null, false, false, null);
}
public AsyncResult begin_getServerProxy(java.util.Map context)
{
return _iceI_begin_getServerProxy(context, true, false, null);
}
public AsyncResult begin_getServerProxy(Callback cb)
{
return _iceI_begin_getServerProxy(null, false, false, cb);
}
public AsyncResult begin_getServerProxy(java.util.Map context, Callback cb)
{
return _iceI_begin_getServerProxy(context, true, false, cb);
}
public AsyncResult begin_getServerProxy(Callback_Router_getServerProxy cb)
{
return _iceI_begin_getServerProxy(null, false, false, cb);
}
public AsyncResult begin_getServerProxy(java.util.Map context, Callback_Router_getServerProxy cb)
{
return _iceI_begin_getServerProxy(context, true, false, cb);
}
public AsyncResult begin_getServerProxy(IceInternal.Functional_GenericCallback1 responseCb,
IceInternal.Functional_GenericCallback1 exceptionCb)
{
return _iceI_begin_getServerProxy(null, false, false, responseCb, exceptionCb, null);
}
public AsyncResult begin_getServerProxy(IceInternal.Functional_GenericCallback1 responseCb,
IceInternal.Functional_GenericCallback1 exceptionCb,
IceInternal.Functional_BoolCallback sentCb)
{
return _iceI_begin_getServerProxy(null, false, false, responseCb, exceptionCb, sentCb);
}
public AsyncResult begin_getServerProxy(java.util.Map context,
IceInternal.Functional_GenericCallback1 responseCb,
IceInternal.Functional_GenericCallback1 exceptionCb)
{
return _iceI_begin_getServerProxy(context, true, false, responseCb, exceptionCb, null);
}
public AsyncResult begin_getServerProxy(java.util.Map context,
IceInternal.Functional_GenericCallback1 responseCb,
IceInternal.Functional_GenericCallback1 exceptionCb,
IceInternal.Functional_BoolCallback sentCb)
{
return _iceI_begin_getServerProxy(context, true, false, responseCb, exceptionCb, sentCb);
}
private AsyncResult _iceI_begin_getServerProxy(java.util.Map context,
boolean explicitCtx,
boolean synchronous,
IceInternal.Functional_GenericCallback1 responseCb,
IceInternal.Functional_GenericCallback1 exceptionCb,
IceInternal.Functional_BoolCallback sentCb)
{
return _iceI_begin_getServerProxy(context,
explicitCtx,
synchronous,
new IceInternal.Functional_TwowayCallbackArg1(responseCb, exceptionCb, sentCb)
{
public final void _iceCompleted(AsyncResult result)
{
RouterPrxHelper._iceI_getServerProxy_completed(this, result);
}
});
}
private AsyncResult _iceI_begin_getServerProxy(java.util.Map context,
boolean explicitCtx,
boolean synchronous,
IceInternal.CallbackBase cb)
{
_checkAsyncTwowayOnly(_getServerProxy_name);
IceInternal.OutgoingAsync result = getOutgoingAsync(_getServerProxy_name, cb);
try
{
result.prepare(_getServerProxy_name, Ice.OperationMode.Nonmutating, context, explicitCtx, synchronous);
result.writeEmptyParams();
result.invoke();
}
catch(Exception ex)
{
result.abort(ex);
}
return result;
}
public Ice.ObjectPrx end_getServerProxy(AsyncResult iresult)
{
IceInternal.OutgoingAsync result_ = IceInternal.OutgoingAsync.check(iresult, this, _getServerProxy_name);
try
{
if(!result_.waitForResponseOrUserEx())
{
try
{
result_.throwUserException();
}
catch(UserException ex_)
{
throw new UnknownUserException(ex_.ice_id(), ex_);
}
}
InputStream istr_ = result_.startReadParams();
Ice.ObjectPrx ret_;
ret_ = istr_.readProxy();
result_.endReadParams();
return ret_;
}
finally
{
if(result_ != null)
{
result_.cacheMessageBuffers();
}
}
}
static public void _iceI_getServerProxy_completed(TwowayCallbackArg1 cb, Ice.AsyncResult result)
{
Ice.RouterPrx _proxy = (Ice.RouterPrx)result.getProxy();
Ice.ObjectPrx ret = null;
try
{
ret = _proxy.end_getServerProxy(result);
}
catch(LocalException ex)
{
cb.exception(ex);
return;
}
catch(SystemException ex)
{
cb.exception(ex);
return;
}
cb.response(ret);
}
/**
* Contacts the remote server to verify that the object implements this type.
* Raises a local exception if a communication error occurs.
* @param obj The untyped proxy.
* @return A proxy for this type, or null if the object does not support this type.
**/
public static RouterPrx checkedCast(ObjectPrx obj)
{
return checkedCastImpl(obj, ice_staticId(), RouterPrx.class, RouterPrxHelper.class);
}
/**
* Contacts the remote server to verify that the object implements this type.
* Raises a local exception if a communication error occurs.
* @param obj The untyped proxy.
* @param context The Context map to send with the invocation.
* @return A proxy for this type, or null if the object does not support this type.
**/
public static RouterPrx checkedCast(ObjectPrx obj, java.util.Map context)
{
return checkedCastImpl(obj, context, ice_staticId(), RouterPrx.class, RouterPrxHelper.class);
}
/**
* Contacts the remote server to verify that a facet of the object implements this type.
* Raises a local exception if a communication error occurs.
* @param obj The untyped proxy.
* @param facet The name of the desired facet.
* @return A proxy for this type, or null if the object does not support this type.
**/
public static RouterPrx checkedCast(ObjectPrx obj, String facet)
{
return checkedCastImpl(obj, facet, ice_staticId(), RouterPrx.class, RouterPrxHelper.class);
}
/**
* Contacts the remote server to verify that a facet of the object implements this type.
* Raises a local exception if a communication error occurs.
* @param obj The untyped proxy.
* @param facet The name of the desired facet.
* @param context The Context map to send with the invocation.
* @return A proxy for this type, or null if the object does not support this type.
**/
public static RouterPrx checkedCast(ObjectPrx obj, String facet, java.util.Map context)
{
return checkedCastImpl(obj, facet, context, ice_staticId(), RouterPrx.class, RouterPrxHelper.class);
}
/**
* Downcasts the given proxy to this type without contacting the remote server.
* @param obj The untyped proxy.
* @return A proxy for this type.
**/
public static RouterPrx uncheckedCast(ObjectPrx obj)
{
return uncheckedCastImpl(obj, RouterPrx.class, RouterPrxHelper.class);
}
/**
* Downcasts the given proxy to this type without contacting the remote server.
* @param obj The untyped proxy.
* @param facet The name of the desired facet.
* @return A proxy for this type.
**/
public static RouterPrx uncheckedCast(ObjectPrx obj, String facet)
{
return uncheckedCastImpl(obj, facet, RouterPrx.class, RouterPrxHelper.class);
}
private static final String[] _ids =
{
"::Ice::Object",
"::Ice::Router"
};
/**
* Provides the Slice type ID of this type.
* @return The Slice type ID.
**/
public static String ice_staticId()
{
return _ids[1];
}
public static void write(OutputStream ostr, RouterPrx v)
{
ostr.writeProxy(v);
}
public static RouterPrx read(InputStream istr)
{
ObjectPrx proxy = istr.readProxy();
if(proxy != null)
{
RouterPrxHelper result = new RouterPrxHelper();
result._copyFrom(proxy);
return result;
}
return null;
}
public static final long serialVersionUID = 0L;
}