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

Glacier2.SSLPermissionsVerifierPrxHelper Maven / Gradle / Ivy

There is a newer version: 3.7.10
Show newest version
//
// Copyright (c) ZeroC, Inc. All rights reserved.
//
//
// Ice version 3.7.7
//
// 
//
// Generated from file `PermissionsVerifier.ice'
//
// Warning: do not edit this file.
//
// 
//

package Glacier2;

/**
 * Provides type-specific helper functions.
 **/
public final class SSLPermissionsVerifierPrxHelper extends Ice.ObjectPrxHelperBase implements SSLPermissionsVerifierPrx
{
    private static final String _authorize_name = "authorize";

    public boolean authorize(SSLInfo info, Ice.StringHolder reason)
        throws PermissionDeniedException
    {
        return _iceI_authorize(info, reason, null, false);
    }

    public boolean authorize(SSLInfo info, Ice.StringHolder reason, java.util.Map context)
        throws PermissionDeniedException
    {
        return _iceI_authorize(info, reason, context, true);
    }

    private boolean _iceI_authorize(SSLInfo iceP_info, Ice.StringHolder iceP_reason, java.util.Map context, boolean explicitCtx)
        throws PermissionDeniedException
    {
        _checkTwowayOnly(_authorize_name);
        return end_authorize(iceP_reason, _iceI_begin_authorize(iceP_info, context, explicitCtx, true, null));
    }

    public Ice.AsyncResult begin_authorize(SSLInfo info)
    {
        return _iceI_begin_authorize(info, null, false, false, null);
    }

    public Ice.AsyncResult begin_authorize(SSLInfo info, java.util.Map context)
    {
        return _iceI_begin_authorize(info, context, true, false, null);
    }

    public Ice.AsyncResult begin_authorize(SSLInfo info, Ice.Callback cb)
    {
        return _iceI_begin_authorize(info, null, false, false, cb);
    }

    public Ice.AsyncResult begin_authorize(SSLInfo info, java.util.Map context, Ice.Callback cb)
    {
        return _iceI_begin_authorize(info, context, true, false, cb);
    }

    public Ice.AsyncResult begin_authorize(SSLInfo info, Callback_SSLPermissionsVerifier_authorize cb)
    {
        return _iceI_begin_authorize(info, null, false, false, cb);
    }

    public Ice.AsyncResult begin_authorize(SSLInfo info, java.util.Map context, Callback_SSLPermissionsVerifier_authorize cb)
    {
        return _iceI_begin_authorize(info, context, true, false, cb);
    }

    public Ice.AsyncResult begin_authorize(SSLInfo info,
                                           FunctionalCallback_SSLPermissionsVerifier_authorize_Response responseCb,
                                           IceInternal.Functional_GenericCallback1 userExceptionCb,
                                           IceInternal.Functional_GenericCallback1 exceptionCb)
    {
        return _iceI_begin_authorize(info, null, false, false, responseCb, userExceptionCb, exceptionCb, null);
    }

    public Ice.AsyncResult begin_authorize(SSLInfo info,
                                           FunctionalCallback_SSLPermissionsVerifier_authorize_Response responseCb,
                                           IceInternal.Functional_GenericCallback1 userExceptionCb,
                                           IceInternal.Functional_GenericCallback1 exceptionCb,
                                           IceInternal.Functional_BoolCallback sentCb)
    {
        return _iceI_begin_authorize(info, null, false, false, responseCb, userExceptionCb, exceptionCb, sentCb);
    }

    public Ice.AsyncResult begin_authorize(SSLInfo info,
                                           java.util.Map context,
                                           FunctionalCallback_SSLPermissionsVerifier_authorize_Response responseCb,
                                           IceInternal.Functional_GenericCallback1 userExceptionCb,
                                           IceInternal.Functional_GenericCallback1 exceptionCb)
    {
        return _iceI_begin_authorize(info, context, true, false, responseCb, userExceptionCb, exceptionCb, null);
    }

    public Ice.AsyncResult begin_authorize(SSLInfo info,
                                           java.util.Map context,
                                           FunctionalCallback_SSLPermissionsVerifier_authorize_Response responseCb,
                                           IceInternal.Functional_GenericCallback1 userExceptionCb,
                                           IceInternal.Functional_GenericCallback1 exceptionCb,
                                           IceInternal.Functional_BoolCallback sentCb)
    {
        return _iceI_begin_authorize(info, context, true, false, responseCb, userExceptionCb, exceptionCb, sentCb);
    }

    private Ice.AsyncResult _iceI_begin_authorize(SSLInfo iceP_info,
                                                  java.util.Map context,
                                                  boolean explicitCtx,
                                                  boolean synchronous,
                                                  FunctionalCallback_SSLPermissionsVerifier_authorize_Response responseCb,
                                                  IceInternal.Functional_GenericCallback1 userExceptionCb,
                                                  IceInternal.Functional_GenericCallback1 exceptionCb,
                                                  IceInternal.Functional_BoolCallback sentCb)
    {
        class CB extends IceInternal.Functional_TwowayCallbackUE implements Glacier2._Callback_SSLPermissionsVerifier_authorize
        {
            public CB(FunctionalCallback_SSLPermissionsVerifier_authorize_Response responseCb,
                      IceInternal.Functional_GenericCallback1 userExceptionCb,
                      IceInternal.Functional_GenericCallback1 exceptionCb,
                      IceInternal.Functional_BoolCallback sentCb)
            {
                super(responseCb != null, userExceptionCb, exceptionCb, sentCb);
                _responseCb = responseCb;
            }

            public void response(boolean ret, String reason)
            {
                if(_responseCb != null)
                {
                    _responseCb.apply(ret, reason);
                }
            }

            public final void _iceCompleted(Ice.AsyncResult result)
            {
                SSLPermissionsVerifierPrxHelper._iceI_authorize_completed(this, result);
            }

            private final FunctionalCallback_SSLPermissionsVerifier_authorize_Response _responseCb;
        }
        return _iceI_begin_authorize(iceP_info, context, explicitCtx, synchronous, new CB(responseCb, userExceptionCb, exceptionCb, sentCb));
    }

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

    public boolean end_authorize(Ice.StringHolder reason, Ice.AsyncResult iresult)
        throws PermissionDeniedException
    {
        IceInternal.OutgoingAsync result_ = IceInternal.OutgoingAsync.check(iresult, this, _authorize_name);
        try
        {
            if(!result_.waitForResponseOrUserEx())
            {
                try
                {
                    result_.throwUserException();
                }
                catch(PermissionDeniedException ex_)
                {
                    throw ex_;
                }
                catch(Ice.UserException ex_)
                {
                    throw new Ice.UnknownUserException(ex_.ice_id(), ex_);
                }
            }
            Ice.InputStream istr_ = result_.startReadParams();
            reason.value = istr_.readString();
            boolean ret_;
            ret_ = istr_.readBool();
            result_.endReadParams();
            return ret_;
        }
        finally
        {
            if(result_ != null)
            {
                result_.cacheMessageBuffers();
            }
        }
    }

    static public void _iceI_authorize_completed(_Callback_SSLPermissionsVerifier_authorize cb, Ice.AsyncResult result)
    {
        Glacier2.SSLPermissionsVerifierPrx _proxy = (Glacier2.SSLPermissionsVerifierPrx)result.getProxy();
        boolean ret = false;
        Ice.StringHolder iceP_reason = new Ice.StringHolder();
        try
        {
            ret = _proxy.end_authorize(iceP_reason, result);
        }
        catch(Ice.UserException ex)
        {
            cb.exception(ex);
            return;
        }
        catch(Ice.LocalException ex)
        {
            cb.exception(ex);
            return;
        }
        catch(Ice.SystemException ex)
        {
            cb.exception(ex);
            return;
        }
        cb.response(ret, iceP_reason.value);
    }

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

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

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

    public static final long serialVersionUID = 0L;
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy