Glacier2.PermissionsVerifierPrxHelper Maven / Gradle / Ivy
//
// 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 PermissionsVerifierPrxHelper extends Ice.ObjectPrxHelperBase implements PermissionsVerifierPrx
{
private static final String _checkPermissions_name = "checkPermissions";
public boolean checkPermissions(String userId, String password, Ice.StringHolder reason)
throws PermissionDeniedException
{
return _iceI_checkPermissions(userId, password, reason, null, false);
}
public boolean checkPermissions(String userId, String password, Ice.StringHolder reason, java.util.Map context)
throws PermissionDeniedException
{
return _iceI_checkPermissions(userId, password, reason, context, true);
}
private boolean _iceI_checkPermissions(String iceP_userId, String iceP_password, Ice.StringHolder iceP_reason, java.util.Map context, boolean explicitCtx)
throws PermissionDeniedException
{
_checkTwowayOnly(_checkPermissions_name);
return end_checkPermissions(iceP_reason, _iceI_begin_checkPermissions(iceP_userId, iceP_password, context, explicitCtx, true, null));
}
public Ice.AsyncResult begin_checkPermissions(String userId, String password)
{
return _iceI_begin_checkPermissions(userId, password, null, false, false, null);
}
public Ice.AsyncResult begin_checkPermissions(String userId, String password, java.util.Map context)
{
return _iceI_begin_checkPermissions(userId, password, context, true, false, null);
}
public Ice.AsyncResult begin_checkPermissions(String userId, String password, Ice.Callback cb)
{
return _iceI_begin_checkPermissions(userId, password, null, false, false, cb);
}
public Ice.AsyncResult begin_checkPermissions(String userId, String password, java.util.Map context, Ice.Callback cb)
{
return _iceI_begin_checkPermissions(userId, password, context, true, false, cb);
}
public Ice.AsyncResult begin_checkPermissions(String userId, String password, Callback_PermissionsVerifier_checkPermissions cb)
{
return _iceI_begin_checkPermissions(userId, password, null, false, false, cb);
}
public Ice.AsyncResult begin_checkPermissions(String userId, String password, java.util.Map context, Callback_PermissionsVerifier_checkPermissions cb)
{
return _iceI_begin_checkPermissions(userId, password, context, true, false, cb);
}
public Ice.AsyncResult begin_checkPermissions(String userId,
String password,
FunctionalCallback_PermissionsVerifier_checkPermissions_Response responseCb,
IceInternal.Functional_GenericCallback1 userExceptionCb,
IceInternal.Functional_GenericCallback1 exceptionCb)
{
return _iceI_begin_checkPermissions(userId, password, null, false, false, responseCb, userExceptionCb, exceptionCb, null);
}
public Ice.AsyncResult begin_checkPermissions(String userId,
String password,
FunctionalCallback_PermissionsVerifier_checkPermissions_Response responseCb,
IceInternal.Functional_GenericCallback1 userExceptionCb,
IceInternal.Functional_GenericCallback1 exceptionCb,
IceInternal.Functional_BoolCallback sentCb)
{
return _iceI_begin_checkPermissions(userId, password, null, false, false, responseCb, userExceptionCb, exceptionCb, sentCb);
}
public Ice.AsyncResult begin_checkPermissions(String userId,
String password,
java.util.Map context,
FunctionalCallback_PermissionsVerifier_checkPermissions_Response responseCb,
IceInternal.Functional_GenericCallback1 userExceptionCb,
IceInternal.Functional_GenericCallback1 exceptionCb)
{
return _iceI_begin_checkPermissions(userId, password, context, true, false, responseCb, userExceptionCb, exceptionCb, null);
}
public Ice.AsyncResult begin_checkPermissions(String userId,
String password,
java.util.Map context,
FunctionalCallback_PermissionsVerifier_checkPermissions_Response responseCb,
IceInternal.Functional_GenericCallback1 userExceptionCb,
IceInternal.Functional_GenericCallback1 exceptionCb,
IceInternal.Functional_BoolCallback sentCb)
{
return _iceI_begin_checkPermissions(userId, password, context, true, false, responseCb, userExceptionCb, exceptionCb, sentCb);
}
private Ice.AsyncResult _iceI_begin_checkPermissions(String iceP_userId,
String iceP_password,
java.util.Map context,
boolean explicitCtx,
boolean synchronous,
FunctionalCallback_PermissionsVerifier_checkPermissions_Response responseCb,
IceInternal.Functional_GenericCallback1 userExceptionCb,
IceInternal.Functional_GenericCallback1 exceptionCb,
IceInternal.Functional_BoolCallback sentCb)
{
class CB extends IceInternal.Functional_TwowayCallbackUE implements Glacier2._Callback_PermissionsVerifier_checkPermissions
{
public CB(FunctionalCallback_PermissionsVerifier_checkPermissions_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)
{
PermissionsVerifierPrxHelper._iceI_checkPermissions_completed(this, result);
}
private final FunctionalCallback_PermissionsVerifier_checkPermissions_Response _responseCb;
}
return _iceI_begin_checkPermissions(iceP_userId, iceP_password, context, explicitCtx, synchronous, new CB(responseCb, userExceptionCb, exceptionCb, sentCb));
}
private Ice.AsyncResult _iceI_begin_checkPermissions(String iceP_userId,
String iceP_password,
java.util.Map context,
boolean explicitCtx,
boolean synchronous,
IceInternal.CallbackBase cb)
{
_checkAsyncTwowayOnly(_checkPermissions_name);
IceInternal.OutgoingAsync result = getOutgoingAsync(_checkPermissions_name, cb);
try
{
result.prepare(_checkPermissions_name, Ice.OperationMode.Nonmutating, context, explicitCtx, synchronous);
Ice.OutputStream ostr = result.startWriteParams(Ice.FormatType.SlicedFormat);
ostr.writeString(iceP_userId);
ostr.writeString(iceP_password);
result.endWriteParams();
result.invoke();
}
catch(Ice.Exception ex)
{
result.abort(ex);
}
return result;
}
public boolean end_checkPermissions(Ice.StringHolder reason, Ice.AsyncResult iresult)
throws PermissionDeniedException
{
IceInternal.OutgoingAsync result_ = IceInternal.OutgoingAsync.check(iresult, this, _checkPermissions_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_checkPermissions_completed(_Callback_PermissionsVerifier_checkPermissions cb, Ice.AsyncResult result)
{
Glacier2.PermissionsVerifierPrx _proxy = (Glacier2.PermissionsVerifierPrx)result.getProxy();
boolean ret = false;
Ice.StringHolder iceP_reason = new Ice.StringHolder();
try
{
ret = _proxy.end_checkPermissions(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 PermissionsVerifierPrx checkedCast(Ice.ObjectPrx obj)
{
return checkedCastImpl(obj, ice_staticId(), PermissionsVerifierPrx.class, PermissionsVerifierPrxHelper.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 PermissionsVerifierPrx checkedCast(Ice.ObjectPrx obj, java.util.Map context)
{
return checkedCastImpl(obj, context, ice_staticId(), PermissionsVerifierPrx.class, PermissionsVerifierPrxHelper.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 PermissionsVerifierPrx checkedCast(Ice.ObjectPrx obj, String facet)
{
return checkedCastImpl(obj, facet, ice_staticId(), PermissionsVerifierPrx.class, PermissionsVerifierPrxHelper.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 PermissionsVerifierPrx checkedCast(Ice.ObjectPrx obj, String facet, java.util.Map context)
{
return checkedCastImpl(obj, facet, context, ice_staticId(), PermissionsVerifierPrx.class, PermissionsVerifierPrxHelper.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 PermissionsVerifierPrx uncheckedCast(Ice.ObjectPrx obj)
{
return uncheckedCastImpl(obj, PermissionsVerifierPrx.class, PermissionsVerifierPrxHelper.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 PermissionsVerifierPrx uncheckedCast(Ice.ObjectPrx obj, String facet)
{
return uncheckedCastImpl(obj, facet, PermissionsVerifierPrx.class, PermissionsVerifierPrxHelper.class);
}
private static final String[] _ids =
{
"::Glacier2::PermissionsVerifier",
"::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, PermissionsVerifierPrx v)
{
ostr.writeProxy(v);
}
public static PermissionsVerifierPrx read(Ice.InputStream istr)
{
Ice.ObjectPrx proxy = istr.readProxy();
if(proxy != null)
{
PermissionsVerifierPrxHelper result = new PermissionsVerifierPrxHelper();
result._copyFrom(proxy);
return result;
}
return null;
}
public static final long serialVersionUID = 0L;
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy