IceInternal.Functional_CallbackBase Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ice-compat Show documentation
Show all versions of ice-compat Show documentation
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.
//
package IceInternal;
public abstract class Functional_CallbackBase extends IceInternal.CallbackBase
{
public Functional_CallbackBase(boolean responseCb,
Functional_GenericCallback1 exceptionCb,
Functional_BoolCallback sentCb)
{
CallbackBase.check(responseCb || exceptionCb != null);
_exceptionCb = exceptionCb;
_sentCb = sentCb;
}
protected Functional_CallbackBase(Functional_GenericCallback1 exceptionCb,
Functional_BoolCallback sentCb)
{
_exceptionCb = exceptionCb;
_sentCb = sentCb;
}
@Override
public final void _iceSent(Ice.AsyncResult result)
{
if(_sentCb != null)
{
_sentCb.apply(result.sentSynchronously());
}
}
@Override
public final boolean _iceHasSentCallback()
{
return _sentCb != null;
}
@Override
public abstract void _iceCompleted(Ice.AsyncResult result);
protected final Functional_GenericCallback1 _exceptionCb;
protected final Functional_BoolCallback _sentCb;
}