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

Ice.LocatorFinderPrxHelper Maven / Gradle / Ivy

Go to download

Ice is a comprehensive RPC framework that helps you build distributed applications with minimal effort using familiar object-oriented idioms

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

package Ice;

/**
 * Provides type-specific helper functions.
 **/
public final class LocatorFinderPrxHelper extends ObjectPrxHelperBase implements LocatorFinderPrx
{
    private static final String _getLocator_name = "getLocator";

    public LocatorPrx getLocator()
    {
        return _iceI_getLocator(null, false);
    }

    public LocatorPrx getLocator(java.util.Map context)
    {
        return _iceI_getLocator(context, true);
    }

    private LocatorPrx _iceI_getLocator(java.util.Map context, boolean explicitCtx)
    {
        _checkTwowayOnly(_getLocator_name);
        return end_getLocator(_iceI_begin_getLocator(context, explicitCtx, true, null));
    }

    public AsyncResult begin_getLocator()
    {
        return _iceI_begin_getLocator(null, false, false, null);
    }

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

    public AsyncResult begin_getLocator(Callback cb)
    {
        return _iceI_begin_getLocator(null, false, false, cb);
    }

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

    public AsyncResult begin_getLocator(Callback_LocatorFinder_getLocator cb)
    {
        return _iceI_begin_getLocator(null, false, false, cb);
    }

    public AsyncResult begin_getLocator(java.util.Map context, Callback_LocatorFinder_getLocator cb)
    {
        return _iceI_begin_getLocator(context, true, false, cb);
    }

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

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

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

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

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

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

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

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

    private static final String[] _ids =
    {
        "::Ice::LocatorFinder",
        "::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, LocatorFinderPrx v)
    {
        ostr.writeProxy(v);
    }

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

    public static final long serialVersionUID = 0L;
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy