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

Ice.PropertiesAdminPrxHelper 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 `PropertiesAdmin.ice'
//
// Warning: do not edit this file.
//
// 
//

package Ice;

/**
 * Provides type-specific helper functions.
 **/
public final class PropertiesAdminPrxHelper extends ObjectPrxHelperBase implements PropertiesAdminPrx
{
    private static final String _getProperty_name = "getProperty";

    public String getProperty(String key)
    {
        return _iceI_getProperty(key, null, false);
    }

    public String getProperty(String key, java.util.Map context)
    {
        return _iceI_getProperty(key, context, true);
    }

    private String _iceI_getProperty(String iceP_key, java.util.Map context, boolean explicitCtx)
    {
        _checkTwowayOnly(_getProperty_name);
        return end_getProperty(_iceI_begin_getProperty(iceP_key, context, explicitCtx, true, null));
    }

    public AsyncResult begin_getProperty(String key)
    {
        return _iceI_begin_getProperty(key, null, false, false, null);
    }

    public AsyncResult begin_getProperty(String key, java.util.Map context)
    {
        return _iceI_begin_getProperty(key, context, true, false, null);
    }

    public AsyncResult begin_getProperty(String key, Callback cb)
    {
        return _iceI_begin_getProperty(key, null, false, false, cb);
    }

    public AsyncResult begin_getProperty(String key, java.util.Map context, Callback cb)
    {
        return _iceI_begin_getProperty(key, context, true, false, cb);
    }

    public AsyncResult begin_getProperty(String key, Callback_PropertiesAdmin_getProperty cb)
    {
        return _iceI_begin_getProperty(key, null, false, false, cb);
    }

    public AsyncResult begin_getProperty(String key, java.util.Map context, Callback_PropertiesAdmin_getProperty cb)
    {
        return _iceI_begin_getProperty(key, context, true, false, cb);
    }

    public AsyncResult begin_getProperty(String key,
                                         IceInternal.Functional_GenericCallback1 responseCb,
                                         IceInternal.Functional_GenericCallback1 exceptionCb)
    {
        return _iceI_begin_getProperty(key, null, false, false, responseCb, exceptionCb, null);
    }

    public AsyncResult begin_getProperty(String key,
                                         IceInternal.Functional_GenericCallback1 responseCb,
                                         IceInternal.Functional_GenericCallback1 exceptionCb,
                                         IceInternal.Functional_BoolCallback sentCb)
    {
        return _iceI_begin_getProperty(key, null, false, false, responseCb, exceptionCb, sentCb);
    }

    public AsyncResult begin_getProperty(String key,
                                         java.util.Map context,
                                         IceInternal.Functional_GenericCallback1 responseCb,
                                         IceInternal.Functional_GenericCallback1 exceptionCb)
    {
        return _iceI_begin_getProperty(key, context, true, false, responseCb, exceptionCb, null);
    }

    public AsyncResult begin_getProperty(String key,
                                         java.util.Map context,
                                         IceInternal.Functional_GenericCallback1 responseCb,
                                         IceInternal.Functional_GenericCallback1 exceptionCb,
                                         IceInternal.Functional_BoolCallback sentCb)
    {
        return _iceI_begin_getProperty(key, context, true, false, responseCb, exceptionCb, sentCb);
    }

    private AsyncResult _iceI_begin_getProperty(String iceP_key,
                                                java.util.Map context,
                                                boolean explicitCtx,
                                                boolean synchronous,
                                                IceInternal.Functional_GenericCallback1 responseCb,
                                                IceInternal.Functional_GenericCallback1 exceptionCb,
                                                IceInternal.Functional_BoolCallback sentCb)
    {
        return _iceI_begin_getProperty(iceP_key,
                                       context,
                                       explicitCtx,
                                       synchronous,
                                       new IceInternal.Functional_TwowayCallbackArg1(responseCb, exceptionCb, sentCb)
                                           {
                                               public final void _iceCompleted(AsyncResult result)
                                               {
                                                   PropertiesAdminPrxHelper._iceI_getProperty_completed(this, result);
                                               }
                                           });
    }

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

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

    static public void _iceI_getProperty_completed(TwowayCallbackArg1 cb, Ice.AsyncResult result)
    {
        Ice.PropertiesAdminPrx _proxy = (Ice.PropertiesAdminPrx)result.getProxy();
        String ret = null;
        try
        {
            ret = _proxy.end_getProperty(result);
        }
        catch(LocalException ex)
        {
            cb.exception(ex);
            return;
        }
        catch(SystemException ex)
        {
            cb.exception(ex);
            return;
        }
        cb.response(ret);
    }

    private static final String _getPropertiesForPrefix_name = "getPropertiesForPrefix";

    public java.util.Map getPropertiesForPrefix(String prefix)
    {
        return _iceI_getPropertiesForPrefix(prefix, null, false);
    }

    public java.util.Map getPropertiesForPrefix(String prefix, java.util.Map context)
    {
        return _iceI_getPropertiesForPrefix(prefix, context, true);
    }

    private java.util.Map _iceI_getPropertiesForPrefix(String iceP_prefix, java.util.Map context, boolean explicitCtx)
    {
        _checkTwowayOnly(_getPropertiesForPrefix_name);
        return end_getPropertiesForPrefix(_iceI_begin_getPropertiesForPrefix(iceP_prefix, context, explicitCtx, true, null));
    }

    public AsyncResult begin_getPropertiesForPrefix(String prefix)
    {
        return _iceI_begin_getPropertiesForPrefix(prefix, null, false, false, null);
    }

    public AsyncResult begin_getPropertiesForPrefix(String prefix, java.util.Map context)
    {
        return _iceI_begin_getPropertiesForPrefix(prefix, context, true, false, null);
    }

    public AsyncResult begin_getPropertiesForPrefix(String prefix, Callback cb)
    {
        return _iceI_begin_getPropertiesForPrefix(prefix, null, false, false, cb);
    }

    public AsyncResult begin_getPropertiesForPrefix(String prefix, java.util.Map context, Callback cb)
    {
        return _iceI_begin_getPropertiesForPrefix(prefix, context, true, false, cb);
    }

    public AsyncResult begin_getPropertiesForPrefix(String prefix, Callback_PropertiesAdmin_getPropertiesForPrefix cb)
    {
        return _iceI_begin_getPropertiesForPrefix(prefix, null, false, false, cb);
    }

    public AsyncResult begin_getPropertiesForPrefix(String prefix, java.util.Map context, Callback_PropertiesAdmin_getPropertiesForPrefix cb)
    {
        return _iceI_begin_getPropertiesForPrefix(prefix, context, true, false, cb);
    }

    public AsyncResult begin_getPropertiesForPrefix(String prefix,
                                                    IceInternal.Functional_GenericCallback1> responseCb,
                                                    IceInternal.Functional_GenericCallback1 exceptionCb)
    {
        return _iceI_begin_getPropertiesForPrefix(prefix, null, false, false, responseCb, exceptionCb, null);
    }

    public AsyncResult begin_getPropertiesForPrefix(String prefix,
                                                    IceInternal.Functional_GenericCallback1> responseCb,
                                                    IceInternal.Functional_GenericCallback1 exceptionCb,
                                                    IceInternal.Functional_BoolCallback sentCb)
    {
        return _iceI_begin_getPropertiesForPrefix(prefix, null, false, false, responseCb, exceptionCb, sentCb);
    }

    public AsyncResult begin_getPropertiesForPrefix(String prefix,
                                                    java.util.Map context,
                                                    IceInternal.Functional_GenericCallback1> responseCb,
                                                    IceInternal.Functional_GenericCallback1 exceptionCb)
    {
        return _iceI_begin_getPropertiesForPrefix(prefix, context, true, false, responseCb, exceptionCb, null);
    }

    public AsyncResult begin_getPropertiesForPrefix(String prefix,
                                                    java.util.Map context,
                                                    IceInternal.Functional_GenericCallback1> responseCb,
                                                    IceInternal.Functional_GenericCallback1 exceptionCb,
                                                    IceInternal.Functional_BoolCallback sentCb)
    {
        return _iceI_begin_getPropertiesForPrefix(prefix, context, true, false, responseCb, exceptionCb, sentCb);
    }

    private AsyncResult _iceI_begin_getPropertiesForPrefix(String iceP_prefix,
                                                           java.util.Map context,
                                                           boolean explicitCtx,
                                                           boolean synchronous,
                                                           IceInternal.Functional_GenericCallback1> responseCb,
                                                           IceInternal.Functional_GenericCallback1 exceptionCb,
                                                           IceInternal.Functional_BoolCallback sentCb)
    {
        return _iceI_begin_getPropertiesForPrefix(iceP_prefix,
                                                  context,
                                                  explicitCtx,
                                                  synchronous,
                                                  new IceInternal.Functional_TwowayCallbackArg1>(responseCb, exceptionCb, sentCb)
                                                      {
                                                          public final void _iceCompleted(AsyncResult result)
                                                          {
                                                              PropertiesAdminPrxHelper._iceI_getPropertiesForPrefix_completed(this, result);
                                                          }
                                                      });
    }

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

    public java.util.Map end_getPropertiesForPrefix(AsyncResult iresult)
    {
        IceInternal.OutgoingAsync result_ = IceInternal.OutgoingAsync.check(iresult, this, _getPropertiesForPrefix_name);
        try
        {
            if(!result_.waitForResponseOrUserEx())
            {
                try
                {
                    result_.throwUserException();
                }
                catch(UserException ex_)
                {
                    throw new UnknownUserException(ex_.ice_id(), ex_);
                }
            }
            InputStream istr_ = result_.startReadParams();
            java.util.Map ret_;
            ret_ = new java.util.TreeMap();
            int sz0 = istr_.readSize();
            for(int i0 = 0; i0 < sz0; i0++)
            {
                String key;
                key = istr_.readString();
                String value;
                value = istr_.readString();
                ret_.put(key, value);
            }
            result_.endReadParams();
            return ret_;
        }
        finally
        {
            if(result_ != null)
            {
                result_.cacheMessageBuffers();
            }
        }
    }

    static public void _iceI_getPropertiesForPrefix_completed(TwowayCallbackArg1> cb, Ice.AsyncResult result)
    {
        Ice.PropertiesAdminPrx _proxy = (Ice.PropertiesAdminPrx)result.getProxy();
        java.util.Map ret = null;
        try
        {
            ret = _proxy.end_getPropertiesForPrefix(result);
        }
        catch(LocalException ex)
        {
            cb.exception(ex);
            return;
        }
        catch(SystemException ex)
        {
            cb.exception(ex);
            return;
        }
        cb.response(ret);
    }

    private static final String _setProperties_name = "setProperties";

    public void setProperties(java.util.Map newProperties)
    {
        _iceI_setProperties(newProperties, null, false);
    }

    public void setProperties(java.util.Map newProperties, java.util.Map context)
    {
        _iceI_setProperties(newProperties, context, true);
    }

    private void _iceI_setProperties(java.util.Map iceP_newProperties, java.util.Map context, boolean explicitCtx)
    {
        end_setProperties(_iceI_begin_setProperties(iceP_newProperties, context, explicitCtx, true, null));
    }

    public AsyncResult begin_setProperties(java.util.Map newProperties)
    {
        return _iceI_begin_setProperties(newProperties, null, false, false, null);
    }

    public AsyncResult begin_setProperties(java.util.Map newProperties, java.util.Map context)
    {
        return _iceI_begin_setProperties(newProperties, context, true, false, null);
    }

    public AsyncResult begin_setProperties(java.util.Map newProperties, Callback cb)
    {
        return _iceI_begin_setProperties(newProperties, null, false, false, cb);
    }

    public AsyncResult begin_setProperties(java.util.Map newProperties, java.util.Map context, Callback cb)
    {
        return _iceI_begin_setProperties(newProperties, context, true, false, cb);
    }

    public AsyncResult begin_setProperties(java.util.Map newProperties, Callback_PropertiesAdmin_setProperties cb)
    {
        return _iceI_begin_setProperties(newProperties, null, false, false, cb);
    }

    public AsyncResult begin_setProperties(java.util.Map newProperties, java.util.Map context, Callback_PropertiesAdmin_setProperties cb)
    {
        return _iceI_begin_setProperties(newProperties, context, true, false, cb);
    }

    public AsyncResult begin_setProperties(java.util.Map newProperties,
                                           IceInternal.Functional_VoidCallback responseCb,
                                           IceInternal.Functional_GenericCallback1 exceptionCb)
    {
        return _iceI_begin_setProperties(newProperties, null, false, false, responseCb, exceptionCb, null);
    }

    public AsyncResult begin_setProperties(java.util.Map newProperties,
                                           IceInternal.Functional_VoidCallback responseCb,
                                           IceInternal.Functional_GenericCallback1 exceptionCb,
                                           IceInternal.Functional_BoolCallback sentCb)
    {
        return _iceI_begin_setProperties(newProperties, null, false, false, responseCb, exceptionCb, sentCb);
    }

    public AsyncResult begin_setProperties(java.util.Map newProperties,
                                           java.util.Map context,
                                           IceInternal.Functional_VoidCallback responseCb,
                                           IceInternal.Functional_GenericCallback1 exceptionCb)
    {
        return _iceI_begin_setProperties(newProperties, context, true, false, responseCb, exceptionCb, null);
    }

    public AsyncResult begin_setProperties(java.util.Map newProperties,
                                           java.util.Map context,
                                           IceInternal.Functional_VoidCallback responseCb,
                                           IceInternal.Functional_GenericCallback1 exceptionCb,
                                           IceInternal.Functional_BoolCallback sentCb)
    {
        return _iceI_begin_setProperties(newProperties, context, true, false, responseCb, exceptionCb, sentCb);
    }

    private AsyncResult _iceI_begin_setProperties(java.util.Map iceP_newProperties,
                                                  java.util.Map context,
                                                  boolean explicitCtx,
                                                  boolean synchronous,
                                                  IceInternal.Functional_VoidCallback responseCb,
                                                  IceInternal.Functional_GenericCallback1 exceptionCb,
                                                  IceInternal.Functional_BoolCallback sentCb)
    {
        return _iceI_begin_setProperties(iceP_newProperties,
                                         context,
                                         explicitCtx,
                                         synchronous,
                                         new IceInternal.Functional_OnewayCallback(responseCb, exceptionCb, sentCb));
    }

    private AsyncResult _iceI_begin_setProperties(java.util.Map iceP_newProperties,
                                                  java.util.Map context,
                                                  boolean explicitCtx,
                                                  boolean synchronous,
                                                  IceInternal.CallbackBase cb)
    {
        IceInternal.OutgoingAsync result = getOutgoingAsync(_setProperties_name, cb);
        try
        {
            result.prepare(_setProperties_name, Ice.OperationMode.Normal, context, explicitCtx, synchronous);
            OutputStream ostr = result.startWriteParams(Ice.FormatType.DefaultFormat);
            PropertyDictHelper.write(ostr, iceP_newProperties);
            result.endWriteParams();
            result.invoke();
        }
        catch(Exception ex)
        {
            result.abort(ex);
        }
        return result;
    }

    public void end_setProperties(AsyncResult iresult)
    {
        _end(iresult, _setProperties_name);
    }

    /**
     * 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 PropertiesAdminPrx checkedCast(ObjectPrx obj)
    {
        return checkedCastImpl(obj, ice_staticId(), PropertiesAdminPrx.class, PropertiesAdminPrxHelper.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 PropertiesAdminPrx checkedCast(ObjectPrx obj, java.util.Map context)
    {
        return checkedCastImpl(obj, context, ice_staticId(), PropertiesAdminPrx.class, PropertiesAdminPrxHelper.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 PropertiesAdminPrx checkedCast(ObjectPrx obj, String facet)
    {
        return checkedCastImpl(obj, facet, ice_staticId(), PropertiesAdminPrx.class, PropertiesAdminPrxHelper.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 PropertiesAdminPrx checkedCast(ObjectPrx obj, String facet, java.util.Map context)
    {
        return checkedCastImpl(obj, facet, context, ice_staticId(), PropertiesAdminPrx.class, PropertiesAdminPrxHelper.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 PropertiesAdminPrx uncheckedCast(ObjectPrx obj)
    {
        return uncheckedCastImpl(obj, PropertiesAdminPrx.class, PropertiesAdminPrxHelper.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 PropertiesAdminPrx uncheckedCast(ObjectPrx obj, String facet)
    {
        return uncheckedCastImpl(obj, facet, PropertiesAdminPrx.class, PropertiesAdminPrxHelper.class);
    }

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

    /**
     * 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, PropertiesAdminPrx v)
    {
        ostr.writeProxy(v);
    }

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

    public static final long serialVersionUID = 0L;
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy