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

com.zeroc.IceMX.ObserverFactoryWithDelegate 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

There is a newer version: 3.7.10
Show newest version
//
// Copyright (c) ZeroC, Inc. All rights reserved.
//

package com.zeroc.IceMX;

public class ObserverFactoryWithDelegate,
                                         O extends com.zeroc.Ice.Instrumentation.Observer>
    extends ObserverFactory
{
    public
    ObserverFactoryWithDelegate(com.zeroc.IceInternal.MetricsAdminI metrics, String name, Class cl)
    {
        super(metrics, name, cl);
    }

    @SuppressWarnings("unchecked")
    public O
    getObserver(MetricsHelper helper, Class cl, O delegate)
    {
        OImpl o = super.getObserver(helper, cl);
        if(o != null)
        {
            o.setDelegate(delegate);
            return (O)o;
        }
        return delegate;
    }

    @SuppressWarnings("unchecked")
    public O
    getObserver(MetricsHelper helper, Object observer, Class cl, O delegate)
    {
        OImpl o = super.getObserver(helper, observer, cl);
        if(o != null)
        {
            o.setDelegate(delegate);
            return (O)o;
        }
        return delegate;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy