All Downloads are FREE. Search and download functionalities are using the official Maven repository.

Ice.LocatorPrxHelper Maven / Gradle / Ivy

//
// Copyright (c) ZeroC, Inc. All rights reserved.
//
//
// Ice version 3.7.4
//
// 
//
// Generated from file `Locator.ice'
//
// Warning: do not edit this file.
//
// 
//

package Ice;

/**
 * Provides type-specific helper functions.
 **/
public final class LocatorPrxHelper extends ObjectPrxHelperBase implements LocatorPrx
{
    private static final String _findObjectById_name = "findObjectById";

    public Ice.ObjectPrx findObjectById(Identity id)
        throws ObjectNotFoundException
    {
        return _iceI_findObjectById(id, null, false);
    }

    public Ice.ObjectPrx findObjectById(Identity id, java.util.Map context)
        throws ObjectNotFoundException
    {
        return _iceI_findObjectById(id, context, true);
    }

    private Ice.ObjectPrx _iceI_findObjectById(Identity iceP_id, java.util.Map context, boolean explicitCtx)
        throws ObjectNotFoundException
    {
        _checkTwowayOnly(_findObjectById_name);
        return end_findObjectById(_iceI_begin_findObjectById(iceP_id, context, explicitCtx, true, null));
    }

    public AsyncResult begin_findObjectById(Identity id)
    {
        return _iceI_begin_findObjectById(id, null, false, false, null);
    }

    public AsyncResult begin_findObjectById(Identity id, java.util.Map context)
    {
        return _iceI_begin_findObjectById(id, context, true, false, null);
    }

    public AsyncResult begin_findObjectById(Identity id, Callback cb)
    {
        return _iceI_begin_findObjectById(id, null, false, false, cb);
    }

    public AsyncResult begin_findObjectById(Identity id, java.util.Map context, Callback cb)
    {
        return _iceI_begin_findObjectById(id, context, true, false, cb);
    }

    public AsyncResult begin_findObjectById(Identity id, Callback_Locator_findObjectById cb)
    {
        return _iceI_begin_findObjectById(id, null, false, false, cb);
    }

    public AsyncResult begin_findObjectById(Identity id, java.util.Map context, Callback_Locator_findObjectById cb)
    {
        return _iceI_begin_findObjectById(id, context, true, false, cb);
    }

    public AsyncResult begin_findObjectById(Identity id,
                                            IceInternal.Functional_GenericCallback1 responseCb,
                                            IceInternal.Functional_GenericCallback1 userExceptionCb,
                                            IceInternal.Functional_GenericCallback1 exceptionCb)
    {
        return _iceI_begin_findObjectById(id, null, false, false, responseCb, userExceptionCb, exceptionCb, null);
    }

    public AsyncResult begin_findObjectById(Identity id,
                                            IceInternal.Functional_GenericCallback1 responseCb,
                                            IceInternal.Functional_GenericCallback1 userExceptionCb,
                                            IceInternal.Functional_GenericCallback1 exceptionCb,
                                            IceInternal.Functional_BoolCallback sentCb)
    {
        return _iceI_begin_findObjectById(id, null, false, false, responseCb, userExceptionCb, exceptionCb, sentCb);
    }

    public AsyncResult begin_findObjectById(Identity id,
                                            java.util.Map context,
                                            IceInternal.Functional_GenericCallback1 responseCb,
                                            IceInternal.Functional_GenericCallback1 userExceptionCb,
                                            IceInternal.Functional_GenericCallback1 exceptionCb)
    {
        return _iceI_begin_findObjectById(id, context, true, false, responseCb, userExceptionCb, exceptionCb, null);
    }

    public AsyncResult begin_findObjectById(Identity id,
                                            java.util.Map context,
                                            IceInternal.Functional_GenericCallback1 responseCb,
                                            IceInternal.Functional_GenericCallback1 userExceptionCb,
                                            IceInternal.Functional_GenericCallback1 exceptionCb,
                                            IceInternal.Functional_BoolCallback sentCb)
    {
        return _iceI_begin_findObjectById(id, context, true, false, responseCb, userExceptionCb, exceptionCb, sentCb);
    }

    private AsyncResult _iceI_begin_findObjectById(Identity iceP_id,
                                                   java.util.Map context,
                                                   boolean explicitCtx,
                                                   boolean synchronous,
                                                   IceInternal.Functional_GenericCallback1 responseCb,
                                                   IceInternal.Functional_GenericCallback1 userExceptionCb,
                                                   IceInternal.Functional_GenericCallback1 exceptionCb,
                                                   IceInternal.Functional_BoolCallback sentCb)
    {
        return _iceI_begin_findObjectById(iceP_id,
                                          context,
                                          explicitCtx,
                                          synchronous,
                                          new IceInternal.Functional_TwowayCallbackArg1UE(responseCb, userExceptionCb, exceptionCb, sentCb)
                                              {
                                                  public final void _iceCompleted(AsyncResult result)
                                                  {
                                                      LocatorPrxHelper._iceI_findObjectById_completed(this, result);
                                                  }
                                              });
    }

    private AsyncResult _iceI_begin_findObjectById(Identity iceP_id,
                                                   java.util.Map context,
                                                   boolean explicitCtx,
                                                   boolean synchronous,
                                                   IceInternal.CallbackBase cb)
    {
        _checkAsyncTwowayOnly(_findObjectById_name);
        IceInternal.OutgoingAsync result = getOutgoingAsync(_findObjectById_name, cb);
        try
        {
            result.prepare(_findObjectById_name, Ice.OperationMode.Nonmutating, context, explicitCtx, synchronous);
            OutputStream ostr = result.startWriteParams(Ice.FormatType.DefaultFormat);
            Identity.ice_write(ostr, iceP_id);
            result.endWriteParams();
            result.invoke();
        }
        catch(Exception ex)
        {
            result.abort(ex);
        }
        return result;
    }

    public Ice.ObjectPrx end_findObjectById(AsyncResult iresult)
        throws ObjectNotFoundException
    {
        IceInternal.OutgoingAsync result_ = IceInternal.OutgoingAsync.check(iresult, this, _findObjectById_name);
        try
        {
            if(!result_.waitForResponseOrUserEx())
            {
                try
                {
                    result_.throwUserException();
                }
                catch(ObjectNotFoundException ex_)
                {
                    throw ex_;
                }
                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_findObjectById_completed(TwowayCallbackArg1UE cb, Ice.AsyncResult result)
    {
        Ice.LocatorPrx _proxy = (Ice.LocatorPrx)result.getProxy();
        Ice.ObjectPrx ret = null;
        try
        {
            ret = _proxy.end_findObjectById(result);
        }
        catch(UserException ex)
        {
            cb.exception(ex);
            return;
        }
        catch(LocalException ex)
        {
            cb.exception(ex);
            return;
        }
        catch(SystemException ex)
        {
            cb.exception(ex);
            return;
        }
        cb.response(ret);
    }

    private static final String _findAdapterById_name = "findAdapterById";

    public Ice.ObjectPrx findAdapterById(String id)
        throws AdapterNotFoundException
    {
        return _iceI_findAdapterById(id, null, false);
    }

    public Ice.ObjectPrx findAdapterById(String id, java.util.Map context)
        throws AdapterNotFoundException
    {
        return _iceI_findAdapterById(id, context, true);
    }

    private Ice.ObjectPrx _iceI_findAdapterById(String iceP_id, java.util.Map context, boolean explicitCtx)
        throws AdapterNotFoundException
    {
        _checkTwowayOnly(_findAdapterById_name);
        return end_findAdapterById(_iceI_begin_findAdapterById(iceP_id, context, explicitCtx, true, null));
    }

    public AsyncResult begin_findAdapterById(String id)
    {
        return _iceI_begin_findAdapterById(id, null, false, false, null);
    }

    public AsyncResult begin_findAdapterById(String id, java.util.Map context)
    {
        return _iceI_begin_findAdapterById(id, context, true, false, null);
    }

    public AsyncResult begin_findAdapterById(String id, Callback cb)
    {
        return _iceI_begin_findAdapterById(id, null, false, false, cb);
    }

    public AsyncResult begin_findAdapterById(String id, java.util.Map context, Callback cb)
    {
        return _iceI_begin_findAdapterById(id, context, true, false, cb);
    }

    public AsyncResult begin_findAdapterById(String id, Callback_Locator_findAdapterById cb)
    {
        return _iceI_begin_findAdapterById(id, null, false, false, cb);
    }

    public AsyncResult begin_findAdapterById(String id, java.util.Map context, Callback_Locator_findAdapterById cb)
    {
        return _iceI_begin_findAdapterById(id, context, true, false, cb);
    }

    public AsyncResult begin_findAdapterById(String id,
                                             IceInternal.Functional_GenericCallback1 responseCb,
                                             IceInternal.Functional_GenericCallback1 userExceptionCb,
                                             IceInternal.Functional_GenericCallback1 exceptionCb)
    {
        return _iceI_begin_findAdapterById(id, null, false, false, responseCb, userExceptionCb, exceptionCb, null);
    }

    public AsyncResult begin_findAdapterById(String id,
                                             IceInternal.Functional_GenericCallback1 responseCb,
                                             IceInternal.Functional_GenericCallback1 userExceptionCb,
                                             IceInternal.Functional_GenericCallback1 exceptionCb,
                                             IceInternal.Functional_BoolCallback sentCb)
    {
        return _iceI_begin_findAdapterById(id, null, false, false, responseCb, userExceptionCb, exceptionCb, sentCb);
    }

    public AsyncResult begin_findAdapterById(String id,
                                             java.util.Map context,
                                             IceInternal.Functional_GenericCallback1 responseCb,
                                             IceInternal.Functional_GenericCallback1 userExceptionCb,
                                             IceInternal.Functional_GenericCallback1 exceptionCb)
    {
        return _iceI_begin_findAdapterById(id, context, true, false, responseCb, userExceptionCb, exceptionCb, null);
    }

    public AsyncResult begin_findAdapterById(String id,
                                             java.util.Map context,
                                             IceInternal.Functional_GenericCallback1 responseCb,
                                             IceInternal.Functional_GenericCallback1 userExceptionCb,
                                             IceInternal.Functional_GenericCallback1 exceptionCb,
                                             IceInternal.Functional_BoolCallback sentCb)
    {
        return _iceI_begin_findAdapterById(id, context, true, false, responseCb, userExceptionCb, exceptionCb, sentCb);
    }

    private AsyncResult _iceI_begin_findAdapterById(String iceP_id,
                                                    java.util.Map context,
                                                    boolean explicitCtx,
                                                    boolean synchronous,
                                                    IceInternal.Functional_GenericCallback1 responseCb,
                                                    IceInternal.Functional_GenericCallback1 userExceptionCb,
                                                    IceInternal.Functional_GenericCallback1 exceptionCb,
                                                    IceInternal.Functional_BoolCallback sentCb)
    {
        return _iceI_begin_findAdapterById(iceP_id,
                                           context,
                                           explicitCtx,
                                           synchronous,
                                           new IceInternal.Functional_TwowayCallbackArg1UE(responseCb, userExceptionCb, exceptionCb, sentCb)
                                               {
                                                   public final void _iceCompleted(AsyncResult result)
                                                   {
                                                       LocatorPrxHelper._iceI_findAdapterById_completed(this, result);
                                                   }
                                               });
    }

    private AsyncResult _iceI_begin_findAdapterById(String iceP_id,
                                                    java.util.Map context,
                                                    boolean explicitCtx,
                                                    boolean synchronous,
                                                    IceInternal.CallbackBase cb)
    {
        _checkAsyncTwowayOnly(_findAdapterById_name);
        IceInternal.OutgoingAsync result = getOutgoingAsync(_findAdapterById_name, cb);
        try
        {
            result.prepare(_findAdapterById_name, Ice.OperationMode.Nonmutating, context, explicitCtx, synchronous);
            OutputStream ostr = result.startWriteParams(Ice.FormatType.DefaultFormat);
            ostr.writeString(iceP_id);
            result.endWriteParams();
            result.invoke();
        }
        catch(Exception ex)
        {
            result.abort(ex);
        }
        return result;
    }

    public Ice.ObjectPrx end_findAdapterById(AsyncResult iresult)
        throws AdapterNotFoundException
    {
        IceInternal.OutgoingAsync result_ = IceInternal.OutgoingAsync.check(iresult, this, _findAdapterById_name);
        try
        {
            if(!result_.waitForResponseOrUserEx())
            {
                try
                {
                    result_.throwUserException();
                }
                catch(AdapterNotFoundException ex_)
                {
                    throw ex_;
                }
                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_findAdapterById_completed(TwowayCallbackArg1UE cb, Ice.AsyncResult result)
    {
        Ice.LocatorPrx _proxy = (Ice.LocatorPrx)result.getProxy();
        Ice.ObjectPrx ret = null;
        try
        {
            ret = _proxy.end_findAdapterById(result);
        }
        catch(UserException ex)
        {
            cb.exception(ex);
            return;
        }
        catch(LocalException ex)
        {
            cb.exception(ex);
            return;
        }
        catch(SystemException ex)
        {
            cb.exception(ex);
            return;
        }
        cb.response(ret);
    }

    private static final String _getRegistry_name = "getRegistry";

    public LocatorRegistryPrx getRegistry()
    {
        return _iceI_getRegistry(null, false);
    }

    public LocatorRegistryPrx getRegistry(java.util.Map context)
    {
        return _iceI_getRegistry(context, true);
    }

    private LocatorRegistryPrx _iceI_getRegistry(java.util.Map context, boolean explicitCtx)
    {
        _checkTwowayOnly(_getRegistry_name);
        return end_getRegistry(_iceI_begin_getRegistry(context, explicitCtx, true, null));
    }

    public AsyncResult begin_getRegistry()
    {
        return _iceI_begin_getRegistry(null, false, false, null);
    }

    public AsyncResult begin_getRegistry(java.util.Map context)
    {
        return _iceI_begin_getRegistry(context, true, false, null);
    }

    public AsyncResult begin_getRegistry(Callback cb)
    {
        return _iceI_begin_getRegistry(null, false, false, cb);
    }

    public AsyncResult begin_getRegistry(java.util.Map context, Callback cb)
    {
        return _iceI_begin_getRegistry(context, true, false, cb);
    }

    public AsyncResult begin_getRegistry(Callback_Locator_getRegistry cb)
    {
        return _iceI_begin_getRegistry(null, false, false, cb);
    }

    public AsyncResult begin_getRegistry(java.util.Map context, Callback_Locator_getRegistry cb)
    {
        return _iceI_begin_getRegistry(context, true, false, cb);
    }

    public AsyncResult begin_getRegistry(IceInternal.Functional_GenericCallback1 responseCb,
                                         IceInternal.Functional_GenericCallback1 exceptionCb)
    {
        return _iceI_begin_getRegistry(null, false, false, responseCb, exceptionCb, null);
    }

    public AsyncResult begin_getRegistry(IceInternal.Functional_GenericCallback1 responseCb,
                                         IceInternal.Functional_GenericCallback1 exceptionCb,
                                         IceInternal.Functional_BoolCallback sentCb)
    {
        return _iceI_begin_getRegistry(null, false, false, responseCb, exceptionCb, sentCb);
    }

    public AsyncResult begin_getRegistry(java.util.Map context,
                                         IceInternal.Functional_GenericCallback1 responseCb,
                                         IceInternal.Functional_GenericCallback1 exceptionCb)
    {
        return _iceI_begin_getRegistry(context, true, false, responseCb, exceptionCb, null);
    }

    public AsyncResult begin_getRegistry(java.util.Map context,
                                         IceInternal.Functional_GenericCallback1 responseCb,
                                         IceInternal.Functional_GenericCallback1 exceptionCb,
                                         IceInternal.Functional_BoolCallback sentCb)
    {
        return _iceI_begin_getRegistry(context, true, false, responseCb, exceptionCb, sentCb);
    }

    private AsyncResult _iceI_begin_getRegistry(java.util.Map context,
                                                boolean explicitCtx,
                                                boolean synchronous,
                                                IceInternal.Functional_GenericCallback1 responseCb,
                                                IceInternal.Functional_GenericCallback1 exceptionCb,
                                                IceInternal.Functional_BoolCallback sentCb)
    {
        return _iceI_begin_getRegistry(context,
                                       explicitCtx,
                                       synchronous,
                                       new IceInternal.Functional_TwowayCallbackArg1(responseCb, exceptionCb, sentCb)
                                           {
                                               public final void _iceCompleted(AsyncResult result)
                                               {
                                                   LocatorPrxHelper._iceI_getRegistry_completed(this, result);
                                               }
                                           });
    }

    private AsyncResult _iceI_begin_getRegistry(java.util.Map context,
                                                boolean explicitCtx,
                                                boolean synchronous,
                                                IceInternal.CallbackBase cb)
    {
        _checkAsyncTwowayOnly(_getRegistry_name);
        IceInternal.OutgoingAsync result = getOutgoingAsync(_getRegistry_name, cb);
        try
        {
            result.prepare(_getRegistry_name, Ice.OperationMode.Nonmutating, context, explicitCtx, synchronous);
            result.writeEmptyParams();
            result.invoke();
        }
        catch(Exception ex)
        {
            result.abort(ex);
        }
        return result;
    }

    public LocatorRegistryPrx end_getRegistry(AsyncResult iresult)
    {
        IceInternal.OutgoingAsync result_ = IceInternal.OutgoingAsync.check(iresult, this, _getRegistry_name);
        try
        {
            if(!result_.waitForResponseOrUserEx())
            {
                try
                {
                    result_.throwUserException();
                }
                catch(UserException ex_)
                {
                    throw new UnknownUserException(ex_.ice_id(), ex_);
                }
            }
            InputStream istr_ = result_.startReadParams();
            LocatorRegistryPrx ret_;
            ret_ = LocatorRegistryPrxHelper.read(istr_);
            result_.endReadParams();
            return ret_;
        }
        finally
        {
            if(result_ != null)
            {
                result_.cacheMessageBuffers();
            }
        }
    }

    static public void _iceI_getRegistry_completed(TwowayCallbackArg1 cb, Ice.AsyncResult result)
    {
        Ice.LocatorPrx _proxy = (Ice.LocatorPrx)result.getProxy();
        LocatorRegistryPrx ret = null;
        try
        {
            ret = _proxy.end_getRegistry(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 LocatorPrx checkedCast(ObjectPrx obj)
    {
        return checkedCastImpl(obj, ice_staticId(), LocatorPrx.class, LocatorPrxHelper.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 LocatorPrx checkedCast(ObjectPrx obj, java.util.Map context)
    {
        return checkedCastImpl(obj, context, ice_staticId(), LocatorPrx.class, LocatorPrxHelper.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 LocatorPrx checkedCast(ObjectPrx obj, String facet)
    {
        return checkedCastImpl(obj, facet, ice_staticId(), LocatorPrx.class, LocatorPrxHelper.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 LocatorPrx checkedCast(ObjectPrx obj, String facet, java.util.Map context)
    {
        return checkedCastImpl(obj, facet, context, ice_staticId(), LocatorPrx.class, LocatorPrxHelper.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 LocatorPrx uncheckedCast(ObjectPrx obj)
    {
        return uncheckedCastImpl(obj, LocatorPrx.class, LocatorPrxHelper.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 LocatorPrx uncheckedCast(ObjectPrx obj, String facet)
    {
        return uncheckedCastImpl(obj, facet, LocatorPrx.class, LocatorPrxHelper.class);
    }

    private static final String[] _ids =
    {
        "::Ice::Locator",
        "::Ice::Object"
    };

    /**
     * Provides the Slice type ID of this type.
     * @return The Slice type ID.
     **/
    public static String ice_staticId()
    {
        return _ids[0];
    }

    public static void write(OutputStream ostr, LocatorPrx v)
    {
        ostr.writeProxy(v);
    }

    public static LocatorPrx read(InputStream istr)
    {
        ObjectPrx proxy = istr.readProxy();
        if(proxy != null)
        {
            LocatorPrxHelper result = new LocatorPrxHelper();
            result._copyFrom(proxy);
            return result;
        }
        return null;
    }

    public static final long serialVersionUID = 0L;
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy