IceMX.ObserverWithDelegate Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ice Show documentation
Show all versions of ice Show documentation
Ice is a comprehensive RPC framework that helps you build distributed applications with minimal effort using familiar object-oriented idioms
// **********************************************************************
//
// Copyright (c) 2003-2017 ZeroC, Inc. All rights reserved.
//
// This copy of Ice is licensed to you under the terms described in the
// ICE_LICENSE file included in this distribution.
//
// **********************************************************************
package IceMX;
public class ObserverWithDelegate extends Observer
{
@Override
public void
attach()
{
super.attach();
if(_delegate != null)
{
_delegate.attach();
}
}
@Override
public void
detach()
{
super.detach();
if(_delegate != null)
{
_delegate.detach();
}
}
@Override
public void
failed(String exceptionName)
{
super.failed(exceptionName);
if(_delegate != null)
{
_delegate.failed(exceptionName);
}
}
public O
getDelegate()
{
return _delegate;
}
public void
setDelegate(O del)
{
_delegate = del;
}
@SuppressWarnings("unchecked")
public ,
Obs extends Ice.Instrumentation.Observer> Obs
getObserver(String mapName, MetricsHelper helper, Class mcl, Class ocl, Obs delegate)
{
ObserverImpl obsv = super.getObserver(mapName, helper, mcl, ocl);
if(obsv != null)
{
obsv.setDelegate(delegate);
return (Obs)obsv;
}
return delegate;
}
protected O _delegate;
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy