// **********************************************************************
//
// Copyright (c) 2003-2013 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.
//
// **********************************************************************
//
// Ice version 3.5.0
//
// <auto-generated>
//
// Generated from file `Metrics.ice'
//
// Warning: do not edit this file.
//
// </auto-generated>
//

#ifndef __Ice_Metrics_h__
#define __Ice_Metrics_h__

#include <Ice/ProxyF.h>
#include <Ice/ObjectF.h>
#include <Ice/Exception.h>
#include <Ice/LocalObject.h>
#include <Ice/StreamHelpers.h>
#include <Ice/Proxy.h>
#include <Ice/Object.h>
#include <Ice/Outgoing.h>
#include <Ice/OutgoingAsync.h>
#include <Ice/Incoming.h>
#include <Ice/Direct.h>
#include <Ice/FactoryTableInit.h>
#include <IceUtil/ScopedArray.h>
#include <IceUtil/Optional.h>
#include <Ice/StreamF.h>
#include <Ice/BuiltinSequences.h>
#include <Ice/UndefSysMacros.h>

#ifndef ICE_IGNORE_VERSION
#   if ICE_INT_VERSION / 100 != 305
#       error Ice version mismatch!
#   endif
#   if ICE_INT_VERSION % 100 > 50
#       error Beta header file detected
#   endif
#   if ICE_INT_VERSION % 100 < 0
#       error Ice patch level mismatch!
#   endif
#endif

#ifndef ICE_API
#   ifdef ICE_API_EXPORTS
#       define ICE_API ICE_DECLSPEC_EXPORT
#   else
#       define ICE_API ICE_DECLSPEC_IMPORT
#   endif
#endif

namespace IceProxy
{

namespace IceMX
{

class Metrics;
ICE_API void __read(::IceInternal::BasicStream*, ::IceInternal::ProxyHandle< ::IceProxy::IceMX::Metrics>&);
ICE_API ::IceProxy::Ice::Object* upCast(::IceProxy::IceMX::Metrics*);

class MetricsAdmin;
ICE_API void __read(::IceInternal::BasicStream*, ::IceInternal::ProxyHandle< ::IceProxy::IceMX::MetricsAdmin>&);
ICE_API ::IceProxy::Ice::Object* upCast(::IceProxy::IceMX::MetricsAdmin*);

class ThreadMetrics;
ICE_API void __read(::IceInternal::BasicStream*, ::IceInternal::ProxyHandle< ::IceProxy::IceMX::ThreadMetrics>&);
ICE_API ::IceProxy::Ice::Object* upCast(::IceProxy::IceMX::ThreadMetrics*);

class DispatchMetrics;
ICE_API void __read(::IceInternal::BasicStream*, ::IceInternal::ProxyHandle< ::IceProxy::IceMX::DispatchMetrics>&);
ICE_API ::IceProxy::Ice::Object* upCast(::IceProxy::IceMX::DispatchMetrics*);

class RemoteMetrics;
ICE_API void __read(::IceInternal::BasicStream*, ::IceInternal::ProxyHandle< ::IceProxy::IceMX::RemoteMetrics>&);
ICE_API ::IceProxy::Ice::Object* upCast(::IceProxy::IceMX::RemoteMetrics*);

class InvocationMetrics;
ICE_API void __read(::IceInternal::BasicStream*, ::IceInternal::ProxyHandle< ::IceProxy::IceMX::InvocationMetrics>&);
ICE_API ::IceProxy::Ice::Object* upCast(::IceProxy::IceMX::InvocationMetrics*);

class ConnectionMetrics;
ICE_API void __read(::IceInternal::BasicStream*, ::IceInternal::ProxyHandle< ::IceProxy::IceMX::ConnectionMetrics>&);
ICE_API ::IceProxy::Ice::Object* upCast(::IceProxy::IceMX::ConnectionMetrics*);

}

}

namespace IceMX
{

class Metrics;
bool operator==(const Metrics&, const Metrics&);
bool operator<(const Metrics&, const Metrics&);
ICE_API ::Ice::Object* upCast(::IceMX::Metrics*);
typedef ::IceInternal::Handle< ::IceMX::Metrics> MetricsPtr;
typedef ::IceInternal::ProxyHandle< ::IceProxy::IceMX::Metrics> MetricsPrx;
ICE_API void __patch(MetricsPtr&, const ::Ice::ObjectPtr&);

class MetricsAdmin;
bool operator==(const MetricsAdmin&, const MetricsAdmin&);
bool operator<(const MetricsAdmin&, const MetricsAdmin&);
ICE_API ::Ice::Object* upCast(::IceMX::MetricsAdmin*);
typedef ::IceInternal::Handle< ::IceMX::MetricsAdmin> MetricsAdminPtr;
typedef ::IceInternal::ProxyHandle< ::IceProxy::IceMX::MetricsAdmin> MetricsAdminPrx;
ICE_API void __patch(MetricsAdminPtr&, const ::Ice::ObjectPtr&);

class ThreadMetrics;
bool operator==(const ThreadMetrics&, const ThreadMetrics&);
bool operator<(const ThreadMetrics&, const ThreadMetrics&);
ICE_API ::Ice::Object* upCast(::IceMX::ThreadMetrics*);
typedef ::IceInternal::Handle< ::IceMX::ThreadMetrics> ThreadMetricsPtr;
typedef ::IceInternal::ProxyHandle< ::IceProxy::IceMX::ThreadMetrics> ThreadMetricsPrx;
ICE_API void __patch(ThreadMetricsPtr&, const ::Ice::ObjectPtr&);

class DispatchMetrics;
bool operator==(const DispatchMetrics&, const DispatchMetrics&);
bool operator<(const DispatchMetrics&, const DispatchMetrics&);
ICE_API ::Ice::Object* upCast(::IceMX::DispatchMetrics*);
typedef ::IceInternal::Handle< ::IceMX::DispatchMetrics> DispatchMetricsPtr;
typedef ::IceInternal::ProxyHandle< ::IceProxy::IceMX::DispatchMetrics> DispatchMetricsPrx;
ICE_API void __patch(DispatchMetricsPtr&, const ::Ice::ObjectPtr&);

class RemoteMetrics;
bool operator==(const RemoteMetrics&, const RemoteMetrics&);
bool operator<(const RemoteMetrics&, const RemoteMetrics&);
ICE_API ::Ice::Object* upCast(::IceMX::RemoteMetrics*);
typedef ::IceInternal::Handle< ::IceMX::RemoteMetrics> RemoteMetricsPtr;
typedef ::IceInternal::ProxyHandle< ::IceProxy::IceMX::RemoteMetrics> RemoteMetricsPrx;
ICE_API void __patch(RemoteMetricsPtr&, const ::Ice::ObjectPtr&);

class InvocationMetrics;
bool operator==(const InvocationMetrics&, const InvocationMetrics&);
bool operator<(const InvocationMetrics&, const InvocationMetrics&);
ICE_API ::Ice::Object* upCast(::IceMX::InvocationMetrics*);
typedef ::IceInternal::Handle< ::IceMX::InvocationMetrics> InvocationMetricsPtr;
typedef ::IceInternal::ProxyHandle< ::IceProxy::IceMX::InvocationMetrics> InvocationMetricsPrx;
ICE_API void __patch(InvocationMetricsPtr&, const ::Ice::ObjectPtr&);

class ConnectionMetrics;
bool operator==(const ConnectionMetrics&, const ConnectionMetrics&);
bool operator<(const ConnectionMetrics&, const ConnectionMetrics&);
ICE_API ::Ice::Object* upCast(::IceMX::ConnectionMetrics*);
typedef ::IceInternal::Handle< ::IceMX::ConnectionMetrics> ConnectionMetricsPtr;
typedef ::IceInternal::ProxyHandle< ::IceProxy::IceMX::ConnectionMetrics> ConnectionMetricsPrx;
ICE_API void __patch(ConnectionMetricsPtr&, const ::Ice::ObjectPtr&);

}

namespace IceMX
{

typedef ::std::map< ::std::string, ::Ice::Int> StringIntDict;

struct MetricsFailures
{
    ::std::string id;
    ::IceMX::StringIntDict failures;
};

typedef ::std::vector< ::IceMX::MetricsFailures> MetricsFailuresSeq;

typedef ::std::vector< ::IceMX::MetricsPtr> MetricsMap;

typedef ::std::map< ::std::string, ::IceMX::MetricsMap> MetricsView;

class ICE_API UnknownMetricsView : public ::Ice::UserException
{
public:

    UnknownMetricsView() {}
    virtual ~UnknownMetricsView() throw();

    virtual ::std::string ice_name() const;
    virtual UnknownMetricsView* ice_clone() const;
    virtual void ice_throw() const;

protected:
    virtual void __writeImpl(::IceInternal::BasicStream*) const;
    virtual void __readImpl(::IceInternal::BasicStream*);
    #ifdef __SUNPRO_CC
    using ::Ice::UserException::__writeImpl;
    using ::Ice::UserException::__readImpl;
    #endif
};

static UnknownMetricsView __UnknownMetricsView_init;

}

namespace Ice
{
template<>
struct StreamableTraits< ::IceMX::MetricsFailures>
{
    static const StreamHelperCategory helper = StreamHelperCategoryStruct;
    static const int minWireSize = 2;
    static const bool fixedLength = false;
};

template<class S>
struct StreamWriter< ::IceMX::MetricsFailures, S>
{
    static void write(S* __os, const ::IceMX::MetricsFailures& v)
    {
        __os->write(v.id);
        __os->write(v.failures);
    }
};

template<class S>
struct StreamReader< ::IceMX::MetricsFailures, S>
{
    static void read(S* __is, ::IceMX::MetricsFailures& v)
    {
        __is->read(v.id);
        __is->read(v.failures);
    }
};

#if defined(ICE_HAS_DECLSPEC_IMPORT_EXPORT) && !defined(ICE_API_EXPORTS)
template struct ICE_API StreamWriter< ::IceMX::MetricsFailures, ::IceInternal::BasicStream>;
template struct ICE_API StreamReader< ::IceMX::MetricsFailures, ::IceInternal::BasicStream>;
#endif

template<>
struct StreamableTraits< ::IceMX::UnknownMetricsView>
{
    static const StreamHelperCategory helper = StreamHelperCategoryUserException;
};

}

namespace IceMX
{

class Callback_MetricsAdmin_getMetricsViewNames_Base : virtual public ::IceInternal::CallbackBase { };
typedef ::IceUtil::Handle< Callback_MetricsAdmin_getMetricsViewNames_Base> Callback_MetricsAdmin_getMetricsViewNamesPtr;

class Callback_MetricsAdmin_enableMetricsView_Base : virtual public ::IceInternal::CallbackBase { };
typedef ::IceUtil::Handle< Callback_MetricsAdmin_enableMetricsView_Base> Callback_MetricsAdmin_enableMetricsViewPtr;

class Callback_MetricsAdmin_disableMetricsView_Base : virtual public ::IceInternal::CallbackBase { };
typedef ::IceUtil::Handle< Callback_MetricsAdmin_disableMetricsView_Base> Callback_MetricsAdmin_disableMetricsViewPtr;

class Callback_MetricsAdmin_getMetricsView_Base : virtual public ::IceInternal::CallbackBase { };
typedef ::IceUtil::Handle< Callback_MetricsAdmin_getMetricsView_Base> Callback_MetricsAdmin_getMetricsViewPtr;

class Callback_MetricsAdmin_getMapMetricsFailures_Base : virtual public ::IceInternal::CallbackBase { };
typedef ::IceUtil::Handle< Callback_MetricsAdmin_getMapMetricsFailures_Base> Callback_MetricsAdmin_getMapMetricsFailuresPtr;

class Callback_MetricsAdmin_getMetricsFailures_Base : virtual public ::IceInternal::CallbackBase { };
typedef ::IceUtil::Handle< Callback_MetricsAdmin_getMetricsFailures_Base> Callback_MetricsAdmin_getMetricsFailuresPtr;

}

namespace IceProxy
{

namespace IceMX
{

class Metrics : virtual public ::IceProxy::Ice::Object
{
public:
    
    ::IceInternal::ProxyHandle<Metrics> ice_context(const ::Ice::Context& __context) const
    {
        return dynamic_cast<Metrics*>(::IceProxy::Ice::Object::ice_context(__context).get());
    }
    
    ::IceInternal::ProxyHandle<Metrics> ice_adapterId(const ::std::string& __id) const
    {
        return dynamic_cast<Metrics*>(::IceProxy::Ice::Object::ice_adapterId(__id).get());
    }
    
    ::IceInternal::ProxyHandle<Metrics> ice_endpoints(const ::Ice::EndpointSeq& __endpoints) const
    {
        return dynamic_cast<Metrics*>(::IceProxy::Ice::Object::ice_endpoints(__endpoints).get());
    }
    
    ::IceInternal::ProxyHandle<Metrics> ice_locatorCacheTimeout(int __timeout) const
    {
        return dynamic_cast<Metrics*>(::IceProxy::Ice::Object::ice_locatorCacheTimeout(__timeout).get());
    }
    
    ::IceInternal::ProxyHandle<Metrics> ice_connectionCached(bool __cached) const
    {
        return dynamic_cast<Metrics*>(::IceProxy::Ice::Object::ice_connectionCached(__cached).get());
    }
    
    ::IceInternal::ProxyHandle<Metrics> ice_endpointSelection(::Ice::EndpointSelectionType __est) const
    {
        return dynamic_cast<Metrics*>(::IceProxy::Ice::Object::ice_endpointSelection(__est).get());
    }
    
    ::IceInternal::ProxyHandle<Metrics> ice_secure(bool __secure) const
    {
        return dynamic_cast<Metrics*>(::IceProxy::Ice::Object::ice_secure(__secure).get());
    }
    
    ::IceInternal::ProxyHandle<Metrics> ice_preferSecure(bool __preferSecure) const
    {
        return dynamic_cast<Metrics*>(::IceProxy::Ice::Object::ice_preferSecure(__preferSecure).get());
    }
    
    ::IceInternal::ProxyHandle<Metrics> ice_router(const ::Ice::RouterPrx& __router) const
    {
        return dynamic_cast<Metrics*>(::IceProxy::Ice::Object::ice_router(__router).get());
    }
    
    ::IceInternal::ProxyHandle<Metrics> ice_locator(const ::Ice::LocatorPrx& __locator) const
    {
        return dynamic_cast<Metrics*>(::IceProxy::Ice::Object::ice_locator(__locator).get());
    }
    
    ::IceInternal::ProxyHandle<Metrics> ice_collocationOptimized(bool __co) const
    {
        return dynamic_cast<Metrics*>(::IceProxy::Ice::Object::ice_collocationOptimized(__co).get());
    }
    
    ::IceInternal::ProxyHandle<Metrics> ice_twoway() const
    {
        return dynamic_cast<Metrics*>(::IceProxy::Ice::Object::ice_twoway().get());
    }
    
    ::IceInternal::ProxyHandle<Metrics> ice_oneway() const
    {
        return dynamic_cast<Metrics*>(::IceProxy::Ice::Object::ice_oneway().get());
    }
    
    ::IceInternal::ProxyHandle<Metrics> ice_batchOneway() const
    {
        return dynamic_cast<Metrics*>(::IceProxy::Ice::Object::ice_batchOneway().get());
    }
    
    ::IceInternal::ProxyHandle<Metrics> ice_datagram() const
    {
        return dynamic_cast<Metrics*>(::IceProxy::Ice::Object::ice_datagram().get());
    }
    
    ::IceInternal::ProxyHandle<Metrics> ice_batchDatagram() const
    {
        return dynamic_cast<Metrics*>(::IceProxy::Ice::Object::ice_batchDatagram().get());
    }
    
    ::IceInternal::ProxyHandle<Metrics> ice_compress(bool __compress) const
    {
        return dynamic_cast<Metrics*>(::IceProxy::Ice::Object::ice_compress(__compress).get());
    }
    
    ::IceInternal::ProxyHandle<Metrics> ice_timeout(int __timeout) const
    {
        return dynamic_cast<Metrics*>(::IceProxy::Ice::Object::ice_timeout(__timeout).get());
    }
    
    ::IceInternal::ProxyHandle<Metrics> ice_connectionId(const ::std::string& __id) const
    {
        return dynamic_cast<Metrics*>(::IceProxy::Ice::Object::ice_connectionId(__id).get());
    }
    
    ::IceInternal::ProxyHandle<Metrics> ice_encodingVersion(const ::Ice::EncodingVersion& __v) const
    {
        return dynamic_cast<Metrics*>(::IceProxy::Ice::Object::ice_encodingVersion(__v).get());
    }
    
    ICE_API static const ::std::string& ice_staticId();

private: 

    ICE_API virtual ::IceInternal::Handle< ::IceDelegateM::Ice::Object> __createDelegateM();
    ICE_API virtual ::IceInternal::Handle< ::IceDelegateD::Ice::Object> __createDelegateD();
    ICE_API virtual ::IceProxy::Ice::Object* __newInstance() const;
};

class MetricsAdmin : virtual public ::IceProxy::Ice::Object
{
public:

    ::Ice::StringSeq getMetricsViewNames(::Ice::StringSeq& disabledViews)
    {
        return getMetricsViewNames(disabledViews, 0);
    }
    ::Ice::StringSeq getMetricsViewNames(::Ice::StringSeq& disabledViews, const ::Ice::Context& __ctx)
    {
        return getMetricsViewNames(disabledViews, &__ctx);
    }
#ifdef ICE_CPP11
    ::Ice::AsyncResultPtr
    begin_getMetricsViewNames(const ::IceInternal::Function<void (const ::Ice::StringSeq&, const ::Ice::StringSeq&)>& response, const ::IceInternal::Function<void (const ::Ice::Exception&)>& exception = ::IceInternal::Function<void (const ::Ice::Exception&)>(), const ::IceInternal::Function<void (bool)>& sent = ::IceInternal::Function<void (bool)>())
    {
        return __begin_getMetricsViewNames(0, response, exception, sent);
    }
    ::Ice::AsyncResultPtr
    begin_getMetricsViewNames(const ::IceInternal::Function<void (const ::Ice::AsyncResultPtr&)>& completed, const ::IceInternal::Function<void (const ::Ice::AsyncResultPtr&)>& sent = ::IceInternal::Function<void (const ::Ice::AsyncResultPtr&)>())
    {
        return begin_getMetricsViewNames(0, ::Ice::newCallback(completed, sent), 0);
    }
    ::Ice::AsyncResultPtr
    begin_getMetricsViewNames(const ::Ice::Context& ctx, const ::IceInternal::Function<void (const ::Ice::StringSeq&, const ::Ice::StringSeq&)>& response, const ::IceInternal::Function<void (const ::Ice::Exception&)>& exception = ::IceInternal::Function<void (const ::Ice::Exception&)>(), const ::IceInternal::Function<void (bool)>& sent = ::IceInternal::Function<void (bool)>())
    {
        return __begin_getMetricsViewNames(&ctx, response, exception, sent);
    }
    ::Ice::AsyncResultPtr
    begin_getMetricsViewNames(const ::Ice::Context& ctx, const ::IceInternal::Function<void (const ::Ice::AsyncResultPtr&)>& completed, const ::IceInternal::Function<void (const ::Ice::AsyncResultPtr&)>& sent = ::IceInternal::Function<void (const ::Ice::AsyncResultPtr&)>())
    {
        return begin_getMetricsViewNames(&ctx, ::Ice::newCallback(completed, sent));
    }
    
private:

    ::Ice::AsyncResultPtr __begin_getMetricsViewNames(const ::Ice::Context* ctx, const ::IceInternal::Function<void (const ::Ice::StringSeq&, const ::Ice::StringSeq&)>& response, const ::IceInternal::Function<void (const ::Ice::Exception&)>& exception, const ::IceInternal::Function<void (bool)>& sent)
    {
        class Cpp11CB : public ::IceInternal::Cpp11FnCallbackNC
        {
        public:

            Cpp11CB(const ::std::function<void (const ::Ice::StringSeq&, const ::Ice::StringSeq&)>& responseFunc, const ::std::function<void (const ::Ice::Exception&)>& exceptionFunc, const ::std::function<void (bool)>& sentFunc) :
                ::IceInternal::Cpp11FnCallbackNC(exceptionFunc, sentFunc),
                _response(responseFunc)
            {
                CallbackBase::checkCallback(true, responseFunc || exceptionFunc != nullptr);
            }

            virtual void __completed(const ::Ice::AsyncResultPtr& __result) const
            {
                ::IceMX::MetricsAdminPrx __proxy = ::IceMX::MetricsAdminPrx::uncheckedCast(__result->getProxy());
                ::Ice::StringSeq disabledViews;
                ::Ice::StringSeq __ret;
                try
                {
                    __ret = __proxy->end_getMetricsViewNames(disabledViews, __result);
                }
                catch(::Ice::Exception& ex)
                {
                    Cpp11FnCallbackNC::__exception(__result, ex);
                    return;
                }
                if(_response != nullptr)
                {
                    _response(__ret, disabledViews);
                }
            }
        
        private:
            
            ::std::function<void (const ::Ice::StringSeq&, const ::Ice::StringSeq&)> _response;
        };
        return begin_getMetricsViewNames(ctx, new Cpp11CB(response, exception, sent));
    }
    
public:
#endif

    ::Ice::AsyncResultPtr begin_getMetricsViewNames()
    {
        return begin_getMetricsViewNames(0, ::IceInternal::__dummyCallback, 0);
    }

    ::Ice::AsyncResultPtr begin_getMetricsViewNames(const ::Ice::Context& __ctx)
    {
        return begin_getMetricsViewNames(&__ctx, ::IceInternal::__dummyCallback, 0);
    }

    ::Ice::AsyncResultPtr begin_getMetricsViewNames(const ::Ice::CallbackPtr& __del, const ::Ice::LocalObjectPtr& __cookie = 0)
    {
        return begin_getMetricsViewNames(0, __del, __cookie);
    }

    ::Ice::AsyncResultPtr begin_getMetricsViewNames(const ::Ice::Context& __ctx, const ::Ice::CallbackPtr& __del, const ::Ice::LocalObjectPtr& __cookie = 0)
    {
        return begin_getMetricsViewNames(&__ctx, __del, __cookie);
    }

    ::Ice::AsyncResultPtr begin_getMetricsViewNames(const ::IceMX::Callback_MetricsAdmin_getMetricsViewNamesPtr& __del, const ::Ice::LocalObjectPtr& __cookie = 0)
    {
        return begin_getMetricsViewNames(0, __del, __cookie);
    }

    ::Ice::AsyncResultPtr begin_getMetricsViewNames(const ::Ice::Context& __ctx, const ::IceMX::Callback_MetricsAdmin_getMetricsViewNamesPtr& __del, const ::Ice::LocalObjectPtr& __cookie = 0)
    {
        return begin_getMetricsViewNames(&__ctx, __del, __cookie);
    }

    ICE_API ::Ice::StringSeq end_getMetricsViewNames(::Ice::StringSeq& disabledViews, const ::Ice::AsyncResultPtr&);
    
private:

    ICE_API ::Ice::StringSeq getMetricsViewNames(::Ice::StringSeq&, const ::Ice::Context*);
    ICE_API ::Ice::AsyncResultPtr begin_getMetricsViewNames(const ::Ice::Context*, const ::IceInternal::CallbackBasePtr&, const ::Ice::LocalObjectPtr& __cookie = 0);
    
public:

    void enableMetricsView(const ::std::string& name)
    {
        enableMetricsView(name, 0);
    }
    void enableMetricsView(const ::std::string& name, const ::Ice::Context& __ctx)
    {
        enableMetricsView(name, &__ctx);
    }
#ifdef ICE_CPP11
    ::Ice::AsyncResultPtr
    begin_enableMetricsView(const ::std::string& name, const ::IceInternal::Function<void ()>& response, const ::IceInternal::Function<void (const ::Ice::Exception&)>& exception = ::IceInternal::Function<void (const ::Ice::Exception&)>(), const ::IceInternal::Function<void (bool)>& sent = ::IceInternal::Function<void (bool)>())
    {
        return __begin_enableMetricsView(name, 0, response, exception, sent);
    }
    ::Ice::AsyncResultPtr
    begin_enableMetricsView(const ::std::string& name, const ::IceInternal::Function<void (const ::Ice::AsyncResultPtr&)>& completed, const ::IceInternal::Function<void (const ::Ice::AsyncResultPtr&)>& sent = ::IceInternal::Function<void (const ::Ice::AsyncResultPtr&)>())
    {
        return begin_enableMetricsView(name, 0, ::Ice::newCallback(completed, sent), 0);
    }
    ::Ice::AsyncResultPtr
    begin_enableMetricsView(const ::std::string& name, const ::Ice::Context& ctx, const ::IceInternal::Function<void ()>& response, const ::IceInternal::Function<void (const ::Ice::Exception&)>& exception = ::IceInternal::Function<void (const ::Ice::Exception&)>(), const ::IceInternal::Function<void (bool)>& sent = ::IceInternal::Function<void (bool)>())
    {
        return __begin_enableMetricsView(name, &ctx, response, exception, sent);
    }
    ::Ice::AsyncResultPtr
    begin_enableMetricsView(const ::std::string& name, const ::Ice::Context& ctx, const ::IceInternal::Function<void (const ::Ice::AsyncResultPtr&)>& completed, const ::IceInternal::Function<void (const ::Ice::AsyncResultPtr&)>& sent = ::IceInternal::Function<void (const ::Ice::AsyncResultPtr&)>())
    {
        return begin_enableMetricsView(name, &ctx, ::Ice::newCallback(completed, sent));
    }
    
private:

    ::Ice::AsyncResultPtr __begin_enableMetricsView(const ::std::string& name, const ::Ice::Context* ctx, const ::IceInternal::Function<void ()>& response, const ::IceInternal::Function<void (const ::Ice::Exception&)>& exception, const ::IceInternal::Function<void (bool)>& sent)
    {
        class Cpp11CB : public ::IceInternal::Cpp11FnCallbackNC
        {
        public:

            Cpp11CB(const ::std::function<void ()>& responseFunc, const ::std::function<void (const ::Ice::Exception&)>& exceptionFunc, const ::std::function<void (bool)>& sentFunc) :
                ::IceInternal::Cpp11FnCallbackNC(exceptionFunc, sentFunc),
                _response(responseFunc)
            {
                CallbackBase::checkCallback(true, responseFunc || exceptionFunc != nullptr);
            }

            virtual void __completed(const ::Ice::AsyncResultPtr& __result) const
            {
                ::IceMX::MetricsAdminPrx __proxy = ::IceMX::MetricsAdminPrx::uncheckedCast(__result->getProxy());
                try
                {
                    __proxy->end_enableMetricsView(__result);
                }
                catch(::Ice::Exception& ex)
                {
                    Cpp11FnCallbackNC::__exception(__result, ex);
                    return;
                }
                if(_response != nullptr)
                {
                    _response();
                }
            }
        
        private:
            
            ::std::function<void ()> _response;
        };
        return begin_enableMetricsView(name, ctx, new Cpp11CB(response, exception, sent));
    }
    
public:
#endif

    ::Ice::AsyncResultPtr begin_enableMetricsView(const ::std::string& name)
    {
        return begin_enableMetricsView(name, 0, ::IceInternal::__dummyCallback, 0);
    }

    ::Ice::AsyncResultPtr begin_enableMetricsView(const ::std::string& name, const ::Ice::Context& __ctx)
    {
        return begin_enableMetricsView(name, &__ctx, ::IceInternal::__dummyCallback, 0);
    }

    ::Ice::AsyncResultPtr begin_enableMetricsView(const ::std::string& name, const ::Ice::CallbackPtr& __del, const ::Ice::LocalObjectPtr& __cookie = 0)
    {
        return begin_enableMetricsView(name, 0, __del, __cookie);
    }

    ::Ice::AsyncResultPtr begin_enableMetricsView(const ::std::string& name, const ::Ice::Context& __ctx, const ::Ice::CallbackPtr& __del, const ::Ice::LocalObjectPtr& __cookie = 0)
    {
        return begin_enableMetricsView(name, &__ctx, __del, __cookie);
    }

    ::Ice::AsyncResultPtr begin_enableMetricsView(const ::std::string& name, const ::IceMX::Callback_MetricsAdmin_enableMetricsViewPtr& __del, const ::Ice::LocalObjectPtr& __cookie = 0)
    {
        return begin_enableMetricsView(name, 0, __del, __cookie);
    }

    ::Ice::AsyncResultPtr begin_enableMetricsView(const ::std::string& name, const ::Ice::Context& __ctx, const ::IceMX::Callback_MetricsAdmin_enableMetricsViewPtr& __del, const ::Ice::LocalObjectPtr& __cookie = 0)
    {
        return begin_enableMetricsView(name, &__ctx, __del, __cookie);
    }

    ICE_API void end_enableMetricsView(const ::Ice::AsyncResultPtr&);
    
private:

    ICE_API void enableMetricsView(const ::std::string&, const ::Ice::Context*);
    ICE_API ::Ice::AsyncResultPtr begin_enableMetricsView(const ::std::string&, const ::Ice::Context*, const ::IceInternal::CallbackBasePtr&, const ::Ice::LocalObjectPtr& __cookie = 0);
    
public:

    void disableMetricsView(const ::std::string& name)
    {
        disableMetricsView(name, 0);
    }
    void disableMetricsView(const ::std::string& name, const ::Ice::Context& __ctx)
    {
        disableMetricsView(name, &__ctx);
    }
#ifdef ICE_CPP11
    ::Ice::AsyncResultPtr
    begin_disableMetricsView(const ::std::string& name, const ::IceInternal::Function<void ()>& response, const ::IceInternal::Function<void (const ::Ice::Exception&)>& exception = ::IceInternal::Function<void (const ::Ice::Exception&)>(), const ::IceInternal::Function<void (bool)>& sent = ::IceInternal::Function<void (bool)>())
    {
        return __begin_disableMetricsView(name, 0, response, exception, sent);
    }
    ::Ice::AsyncResultPtr
    begin_disableMetricsView(const ::std::string& name, const ::IceInternal::Function<void (const ::Ice::AsyncResultPtr&)>& completed, const ::IceInternal::Function<void (const ::Ice::AsyncResultPtr&)>& sent = ::IceInternal::Function<void (const ::Ice::AsyncResultPtr&)>())
    {
        return begin_disableMetricsView(name, 0, ::Ice::newCallback(completed, sent), 0);
    }
    ::Ice::AsyncResultPtr
    begin_disableMetricsView(const ::std::string& name, const ::Ice::Context& ctx, const ::IceInternal::Function<void ()>& response, const ::IceInternal::Function<void (const ::Ice::Exception&)>& exception = ::IceInternal::Function<void (const ::Ice::Exception&)>(), const ::IceInternal::Function<void (bool)>& sent = ::IceInternal::Function<void (bool)>())
    {
        return __begin_disableMetricsView(name, &ctx, response, exception, sent);
    }
    ::Ice::AsyncResultPtr
    begin_disableMetricsView(const ::std::string& name, const ::Ice::Context& ctx, const ::IceInternal::Function<void (const ::Ice::AsyncResultPtr&)>& completed, const ::IceInternal::Function<void (const ::Ice::AsyncResultPtr&)>& sent = ::IceInternal::Function<void (const ::Ice::AsyncResultPtr&)>())
    {
        return begin_disableMetricsView(name, &ctx, ::Ice::newCallback(completed, sent));
    }
    
private:

    ::Ice::AsyncResultPtr __begin_disableMetricsView(const ::std::string& name, const ::Ice::Context* ctx, const ::IceInternal::Function<void ()>& response, const ::IceInternal::Function<void (const ::Ice::Exception&)>& exception, const ::IceInternal::Function<void (bool)>& sent)
    {
        class Cpp11CB : public ::IceInternal::Cpp11FnCallbackNC
        {
        public:

            Cpp11CB(const ::std::function<void ()>& responseFunc, const ::std::function<void (const ::Ice::Exception&)>& exceptionFunc, const ::std::function<void (bool)>& sentFunc) :
                ::IceInternal::Cpp11FnCallbackNC(exceptionFunc, sentFunc),
                _response(responseFunc)
            {
                CallbackBase::checkCallback(true, responseFunc || exceptionFunc != nullptr);
            }

            virtual void __completed(const ::Ice::AsyncResultPtr& __result) const
            {
                ::IceMX::MetricsAdminPrx __proxy = ::IceMX::MetricsAdminPrx::uncheckedCast(__result->getProxy());
                try
                {
                    __proxy->end_disableMetricsView(__result);
                }
                catch(::Ice::Exception& ex)
                {
                    Cpp11FnCallbackNC::__exception(__result, ex);
                    return;
                }
                if(_response != nullptr)
                {
                    _response();
                }
            }
        
        private:
            
            ::std::function<void ()> _response;
        };
        return begin_disableMetricsView(name, ctx, new Cpp11CB(response, exception, sent));
    }
    
public:
#endif

    ::Ice::AsyncResultPtr begin_disableMetricsView(const ::std::string& name)
    {
        return begin_disableMetricsView(name, 0, ::IceInternal::__dummyCallback, 0);
    }

    ::Ice::AsyncResultPtr begin_disableMetricsView(const ::std::string& name, const ::Ice::Context& __ctx)
    {
        return begin_disableMetricsView(name, &__ctx, ::IceInternal::__dummyCallback, 0);
    }

    ::Ice::AsyncResultPtr begin_disableMetricsView(const ::std::string& name, const ::Ice::CallbackPtr& __del, const ::Ice::LocalObjectPtr& __cookie = 0)
    {
        return begin_disableMetricsView(name, 0, __del, __cookie);
    }

    ::Ice::AsyncResultPtr begin_disableMetricsView(const ::std::string& name, const ::Ice::Context& __ctx, const ::Ice::CallbackPtr& __del, const ::Ice::LocalObjectPtr& __cookie = 0)
    {
        return begin_disableMetricsView(name, &__ctx, __del, __cookie);
    }

    ::Ice::AsyncResultPtr begin_disableMetricsView(const ::std::string& name, const ::IceMX::Callback_MetricsAdmin_disableMetricsViewPtr& __del, const ::Ice::LocalObjectPtr& __cookie = 0)
    {
        return begin_disableMetricsView(name, 0, __del, __cookie);
    }

    ::Ice::AsyncResultPtr begin_disableMetricsView(const ::std::string& name, const ::Ice::Context& __ctx, const ::IceMX::Callback_MetricsAdmin_disableMetricsViewPtr& __del, const ::Ice::LocalObjectPtr& __cookie = 0)
    {
        return begin_disableMetricsView(name, &__ctx, __del, __cookie);
    }

    ICE_API void end_disableMetricsView(const ::Ice::AsyncResultPtr&);
    
private:

    ICE_API void disableMetricsView(const ::std::string&, const ::Ice::Context*);
    ICE_API ::Ice::AsyncResultPtr begin_disableMetricsView(const ::std::string&, const ::Ice::Context*, const ::IceInternal::CallbackBasePtr&, const ::Ice::LocalObjectPtr& __cookie = 0);
    
public:

    ::IceMX::MetricsView getMetricsView(const ::std::string& view, ::Ice::Long& timestamp)
    {
        return getMetricsView(view, timestamp, 0);
    }
    ::IceMX::MetricsView getMetricsView(const ::std::string& view, ::Ice::Long& timestamp, const ::Ice::Context& __ctx)
    {
        return getMetricsView(view, timestamp, &__ctx);
    }
#ifdef ICE_CPP11
    ::Ice::AsyncResultPtr
    begin_getMetricsView(const ::std::string& view, const ::IceInternal::Function<void (const ::IceMX::MetricsView&, ::Ice::Long)>& response, const ::IceInternal::Function<void (const ::Ice::Exception&)>& exception = ::IceInternal::Function<void (const ::Ice::Exception&)>(), const ::IceInternal::Function<void (bool)>& sent = ::IceInternal::Function<void (bool)>())
    {
        return __begin_getMetricsView(view, 0, response, exception, sent);
    }
    ::Ice::AsyncResultPtr
    begin_getMetricsView(const ::std::string& view, const ::IceInternal::Function<void (const ::Ice::AsyncResultPtr&)>& completed, const ::IceInternal::Function<void (const ::Ice::AsyncResultPtr&)>& sent = ::IceInternal::Function<void (const ::Ice::AsyncResultPtr&)>())
    {
        return begin_getMetricsView(view, 0, ::Ice::newCallback(completed, sent), 0);
    }
    ::Ice::AsyncResultPtr
    begin_getMetricsView(const ::std::string& view, const ::Ice::Context& ctx, const ::IceInternal::Function<void (const ::IceMX::MetricsView&, ::Ice::Long)>& response, const ::IceInternal::Function<void (const ::Ice::Exception&)>& exception = ::IceInternal::Function<void (const ::Ice::Exception&)>(), const ::IceInternal::Function<void (bool)>& sent = ::IceInternal::Function<void (bool)>())
    {
        return __begin_getMetricsView(view, &ctx, response, exception, sent);
    }
    ::Ice::AsyncResultPtr
    begin_getMetricsView(const ::std::string& view, const ::Ice::Context& ctx, const ::IceInternal::Function<void (const ::Ice::AsyncResultPtr&)>& completed, const ::IceInternal::Function<void (const ::Ice::AsyncResultPtr&)>& sent = ::IceInternal::Function<void (const ::Ice::AsyncResultPtr&)>())
    {
        return begin_getMetricsView(view, &ctx, ::Ice::newCallback(completed, sent));
    }
    
private:

    ::Ice::AsyncResultPtr __begin_getMetricsView(const ::std::string& view, const ::Ice::Context* ctx, const ::IceInternal::Function<void (const ::IceMX::MetricsView&, ::Ice::Long)>& response, const ::IceInternal::Function<void (const ::Ice::Exception&)>& exception, const ::IceInternal::Function<void (bool)>& sent)
    {
        class Cpp11CB : public ::IceInternal::Cpp11FnCallbackNC
        {
        public:

            Cpp11CB(const ::std::function<void (const ::IceMX::MetricsView&, ::Ice::Long)>& responseFunc, const ::std::function<void (const ::Ice::Exception&)>& exceptionFunc, const ::std::function<void (bool)>& sentFunc) :
                ::IceInternal::Cpp11FnCallbackNC(exceptionFunc, sentFunc),
                _response(responseFunc)
            {
                CallbackBase::checkCallback(true, responseFunc || exceptionFunc != nullptr);
            }

            virtual void __completed(const ::Ice::AsyncResultPtr& __result) const
            {
                ::IceMX::MetricsAdminPrx __proxy = ::IceMX::MetricsAdminPrx::uncheckedCast(__result->getProxy());
                ::Ice::Long timestamp;
                ::IceMX::MetricsView __ret;
                try
                {
                    __ret = __proxy->end_getMetricsView(timestamp, __result);
                }
                catch(::Ice::Exception& ex)
                {
                    Cpp11FnCallbackNC::__exception(__result, ex);
                    return;
                }
                if(_response != nullptr)
                {
                    _response(__ret, timestamp);
                }
            }
        
        private:
            
            ::std::function<void (const ::IceMX::MetricsView&, ::Ice::Long)> _response;
        };
        return begin_getMetricsView(view, ctx, new Cpp11CB(response, exception, sent));
    }
    
public:
#endif

    ::Ice::AsyncResultPtr begin_getMetricsView(const ::std::string& view)
    {
        return begin_getMetricsView(view, 0, ::IceInternal::__dummyCallback, 0);
    }

    ::Ice::AsyncResultPtr begin_getMetricsView(const ::std::string& view, const ::Ice::Context& __ctx)
    {
        return begin_getMetricsView(view, &__ctx, ::IceInternal::__dummyCallback, 0);
    }

    ::Ice::AsyncResultPtr begin_getMetricsView(const ::std::string& view, const ::Ice::CallbackPtr& __del, const ::Ice::LocalObjectPtr& __cookie = 0)
    {
        return begin_getMetricsView(view, 0, __del, __cookie);
    }

    ::Ice::AsyncResultPtr begin_getMetricsView(const ::std::string& view, const ::Ice::Context& __ctx, const ::Ice::CallbackPtr& __del, const ::Ice::LocalObjectPtr& __cookie = 0)
    {
        return begin_getMetricsView(view, &__ctx, __del, __cookie);
    }

    ::Ice::AsyncResultPtr begin_getMetricsView(const ::std::string& view, const ::IceMX::Callback_MetricsAdmin_getMetricsViewPtr& __del, const ::Ice::LocalObjectPtr& __cookie = 0)
    {
        return begin_getMetricsView(view, 0, __del, __cookie);
    }

    ::Ice::AsyncResultPtr begin_getMetricsView(const ::std::string& view, const ::Ice::Context& __ctx, const ::IceMX::Callback_MetricsAdmin_getMetricsViewPtr& __del, const ::Ice::LocalObjectPtr& __cookie = 0)
    {
        return begin_getMetricsView(view, &__ctx, __del, __cookie);
    }

    ICE_API ::IceMX::MetricsView end_getMetricsView(::Ice::Long& timestamp, const ::Ice::AsyncResultPtr&);
    
private:

    ICE_API ::IceMX::MetricsView getMetricsView(const ::std::string&, ::Ice::Long&, const ::Ice::Context*);
    ICE_API ::Ice::AsyncResultPtr begin_getMetricsView(const ::std::string&, const ::Ice::Context*, const ::IceInternal::CallbackBasePtr&, const ::Ice::LocalObjectPtr& __cookie = 0);
    
public:

    ::IceMX::MetricsFailuresSeq getMapMetricsFailures(const ::std::string& view, const ::std::string& map)
    {
        return getMapMetricsFailures(view, map, 0);
    }
    ::IceMX::MetricsFailuresSeq getMapMetricsFailures(const ::std::string& view, const ::std::string& map, const ::Ice::Context& __ctx)
    {
        return getMapMetricsFailures(view, map, &__ctx);
    }
#ifdef ICE_CPP11
    ::Ice::AsyncResultPtr
    begin_getMapMetricsFailures(const ::std::string& view, const ::std::string& map, const ::IceInternal::Function<void (const ::IceMX::MetricsFailuresSeq&)>& response, const ::IceInternal::Function<void (const ::Ice::Exception&)>& exception = ::IceInternal::Function<void (const ::Ice::Exception&)>(), const ::IceInternal::Function<void (bool)>& sent = ::IceInternal::Function<void (bool)>())
    {
        return __begin_getMapMetricsFailures(view, map, 0, response, exception, sent);
    }
    ::Ice::AsyncResultPtr
    begin_getMapMetricsFailures(const ::std::string& view, const ::std::string& map, const ::IceInternal::Function<void (const ::Ice::AsyncResultPtr&)>& completed, const ::IceInternal::Function<void (const ::Ice::AsyncResultPtr&)>& sent = ::IceInternal::Function<void (const ::Ice::AsyncResultPtr&)>())
    {
        return begin_getMapMetricsFailures(view, map, 0, ::Ice::newCallback(completed, sent), 0);
    }
    ::Ice::AsyncResultPtr
    begin_getMapMetricsFailures(const ::std::string& view, const ::std::string& map, const ::Ice::Context& ctx, const ::IceInternal::Function<void (const ::IceMX::MetricsFailuresSeq&)>& response, const ::IceInternal::Function<void (const ::Ice::Exception&)>& exception = ::IceInternal::Function<void (const ::Ice::Exception&)>(), const ::IceInternal::Function<void (bool)>& sent = ::IceInternal::Function<void (bool)>())
    {
        return __begin_getMapMetricsFailures(view, map, &ctx, response, exception, sent);
    }
    ::Ice::AsyncResultPtr
    begin_getMapMetricsFailures(const ::std::string& view, const ::std::string& map, const ::Ice::Context& ctx, const ::IceInternal::Function<void (const ::Ice::AsyncResultPtr&)>& completed, const ::IceInternal::Function<void (const ::Ice::AsyncResultPtr&)>& sent = ::IceInternal::Function<void (const ::Ice::AsyncResultPtr&)>())
    {
        return begin_getMapMetricsFailures(view, map, &ctx, ::Ice::newCallback(completed, sent));
    }
    
private:

    ::Ice::AsyncResultPtr __begin_getMapMetricsFailures(const ::std::string& view, const ::std::string& map, const ::Ice::Context* ctx, const ::IceInternal::Function<void (const ::IceMX::MetricsFailuresSeq&)>& response, const ::IceInternal::Function<void (const ::Ice::Exception&)>& exception, const ::IceInternal::Function<void (bool)>& sent)
    {
        class Cpp11CB : public ::IceInternal::Cpp11FnCallbackNC
        {
        public:

            Cpp11CB(const ::std::function<void (const ::IceMX::MetricsFailuresSeq&)>& responseFunc, const ::std::function<void (const ::Ice::Exception&)>& exceptionFunc, const ::std::function<void (bool)>& sentFunc) :
                ::IceInternal::Cpp11FnCallbackNC(exceptionFunc, sentFunc),
                _response(responseFunc)
            {
                CallbackBase::checkCallback(true, responseFunc || exceptionFunc != nullptr);
            }

            virtual void __completed(const ::Ice::AsyncResultPtr& __result) const
            {
                ::IceMX::MetricsAdminPrx __proxy = ::IceMX::MetricsAdminPrx::uncheckedCast(__result->getProxy());
                ::IceMX::MetricsFailuresSeq __ret;
                try
                {
                    __ret = __proxy->end_getMapMetricsFailures(__result);
                }
                catch(::Ice::Exception& ex)
                {
                    Cpp11FnCallbackNC::__exception(__result, ex);
                    return;
                }
                if(_response != nullptr)
                {
                    _response(__ret);
                }
            }
        
        private:
            
            ::std::function<void (const ::IceMX::MetricsFailuresSeq&)> _response;
        };
        return begin_getMapMetricsFailures(view, map, ctx, new Cpp11CB(response, exception, sent));
    }
    
public:
#endif

    ::Ice::AsyncResultPtr begin_getMapMetricsFailures(const ::std::string& view, const ::std::string& map)
    {
        return begin_getMapMetricsFailures(view, map, 0, ::IceInternal::__dummyCallback, 0);
    }

    ::Ice::AsyncResultPtr begin_getMapMetricsFailures(const ::std::string& view, const ::std::string& map, const ::Ice::Context& __ctx)
    {
        return begin_getMapMetricsFailures(view, map, &__ctx, ::IceInternal::__dummyCallback, 0);
    }

    ::Ice::AsyncResultPtr begin_getMapMetricsFailures(const ::std::string& view, const ::std::string& map, const ::Ice::CallbackPtr& __del, const ::Ice::LocalObjectPtr& __cookie = 0)
    {
        return begin_getMapMetricsFailures(view, map, 0, __del, __cookie);
    }

    ::Ice::AsyncResultPtr begin_getMapMetricsFailures(const ::std::string& view, const ::std::string& map, const ::Ice::Context& __ctx, const ::Ice::CallbackPtr& __del, const ::Ice::LocalObjectPtr& __cookie = 0)
    {
        return begin_getMapMetricsFailures(view, map, &__ctx, __del, __cookie);
    }

    ::Ice::AsyncResultPtr begin_getMapMetricsFailures(const ::std::string& view, const ::std::string& map, const ::IceMX::Callback_MetricsAdmin_getMapMetricsFailuresPtr& __del, const ::Ice::LocalObjectPtr& __cookie = 0)
    {
        return begin_getMapMetricsFailures(view, map, 0, __del, __cookie);
    }

    ::Ice::AsyncResultPtr begin_getMapMetricsFailures(const ::std::string& view, const ::std::string& map, const ::Ice::Context& __ctx, const ::IceMX::Callback_MetricsAdmin_getMapMetricsFailuresPtr& __del, const ::Ice::LocalObjectPtr& __cookie = 0)
    {
        return begin_getMapMetricsFailures(view, map, &__ctx, __del, __cookie);
    }

    ICE_API ::IceMX::MetricsFailuresSeq end_getMapMetricsFailures(const ::Ice::AsyncResultPtr&);
    
private:

    ICE_API ::IceMX::MetricsFailuresSeq getMapMetricsFailures(const ::std::string&, const ::std::string&, const ::Ice::Context*);
    ICE_API ::Ice::AsyncResultPtr begin_getMapMetricsFailures(const ::std::string&, const ::std::string&, const ::Ice::Context*, const ::IceInternal::CallbackBasePtr&, const ::Ice::LocalObjectPtr& __cookie = 0);
    
public:

    ::IceMX::MetricsFailures getMetricsFailures(const ::std::string& view, const ::std::string& map, const ::std::string& id)
    {
        return getMetricsFailures(view, map, id, 0);
    }
    ::IceMX::MetricsFailures getMetricsFailures(const ::std::string& view, const ::std::string& map, const ::std::string& id, const ::Ice::Context& __ctx)
    {
        return getMetricsFailures(view, map, id, &__ctx);
    }
#ifdef ICE_CPP11
    ::Ice::AsyncResultPtr
    begin_getMetricsFailures(const ::std::string& view, const ::std::string& map, const ::std::string& id, const ::IceInternal::Function<void (const ::IceMX::MetricsFailures&)>& response, const ::IceInternal::Function<void (const ::Ice::Exception&)>& exception = ::IceInternal::Function<void (const ::Ice::Exception&)>(), const ::IceInternal::Function<void (bool)>& sent = ::IceInternal::Function<void (bool)>())
    {
        return __begin_getMetricsFailures(view, map, id, 0, response, exception, sent);
    }
    ::Ice::AsyncResultPtr
    begin_getMetricsFailures(const ::std::string& view, const ::std::string& map, const ::std::string& id, const ::IceInternal::Function<void (const ::Ice::AsyncResultPtr&)>& completed, const ::IceInternal::Function<void (const ::Ice::AsyncResultPtr&)>& sent = ::IceInternal::Function<void (const ::Ice::AsyncResultPtr&)>())
    {
        return begin_getMetricsFailures(view, map, id, 0, ::Ice::newCallback(completed, sent), 0);
    }
    ::Ice::AsyncResultPtr
    begin_getMetricsFailures(const ::std::string& view, const ::std::string& map, const ::std::string& id, const ::Ice::Context& ctx, const ::IceInternal::Function<void (const ::IceMX::MetricsFailures&)>& response, const ::IceInternal::Function<void (const ::Ice::Exception&)>& exception = ::IceInternal::Function<void (const ::Ice::Exception&)>(), const ::IceInternal::Function<void (bool)>& sent = ::IceInternal::Function<void (bool)>())
    {
        return __begin_getMetricsFailures(view, map, id, &ctx, response, exception, sent);
    }
    ::Ice::AsyncResultPtr
    begin_getMetricsFailures(const ::std::string& view, const ::std::string& map, const ::std::string& id, const ::Ice::Context& ctx, const ::IceInternal::Function<void (const ::Ice::AsyncResultPtr&)>& completed, const ::IceInternal::Function<void (const ::Ice::AsyncResultPtr&)>& sent = ::IceInternal::Function<void (const ::Ice::AsyncResultPtr&)>())
    {
        return begin_getMetricsFailures(view, map, id, &ctx, ::Ice::newCallback(completed, sent));
    }
    
private:

    ::Ice::AsyncResultPtr __begin_getMetricsFailures(const ::std::string& view, const ::std::string& map, const ::std::string& id, const ::Ice::Context* ctx, const ::IceInternal::Function<void (const ::IceMX::MetricsFailures&)>& response, const ::IceInternal::Function<void (const ::Ice::Exception&)>& exception, const ::IceInternal::Function<void (bool)>& sent)
    {
        class Cpp11CB : public ::IceInternal::Cpp11FnCallbackNC
        {
        public:

            Cpp11CB(const ::std::function<void (const ::IceMX::MetricsFailures&)>& responseFunc, const ::std::function<void (const ::Ice::Exception&)>& exceptionFunc, const ::std::function<void (bool)>& sentFunc) :
                ::IceInternal::Cpp11FnCallbackNC(exceptionFunc, sentFunc),
                _response(responseFunc)
            {
                CallbackBase::checkCallback(true, responseFunc || exceptionFunc != nullptr);
            }

            virtual void __completed(const ::Ice::AsyncResultPtr& __result) const
            {
                ::IceMX::MetricsAdminPrx __proxy = ::IceMX::MetricsAdminPrx::uncheckedCast(__result->getProxy());
                ::IceMX::MetricsFailures __ret;
                try
                {
                    __ret = __proxy->end_getMetricsFailures(__result);
                }
                catch(::Ice::Exception& ex)
                {
                    Cpp11FnCallbackNC::__exception(__result, ex);
                    return;
                }
                if(_response != nullptr)
                {
                    _response(__ret);
                }
            }
        
        private:
            
            ::std::function<void (const ::IceMX::MetricsFailures&)> _response;
        };
        return begin_getMetricsFailures(view, map, id, ctx, new Cpp11CB(response, exception, sent));
    }
    
public:
#endif

    ::Ice::AsyncResultPtr begin_getMetricsFailures(const ::std::string& view, const ::std::string& map, const ::std::string& id)
    {
        return begin_getMetricsFailures(view, map, id, 0, ::IceInternal::__dummyCallback, 0);
    }

    ::Ice::AsyncResultPtr begin_getMetricsFailures(const ::std::string& view, const ::std::string& map, const ::std::string& id, const ::Ice::Context& __ctx)
    {
        return begin_getMetricsFailures(view, map, id, &__ctx, ::IceInternal::__dummyCallback, 0);
    }

    ::Ice::AsyncResultPtr begin_getMetricsFailures(const ::std::string& view, const ::std::string& map, const ::std::string& id, const ::Ice::CallbackPtr& __del, const ::Ice::LocalObjectPtr& __cookie = 0)
    {
        return begin_getMetricsFailures(view, map, id, 0, __del, __cookie);
    }

    ::Ice::AsyncResultPtr begin_getMetricsFailures(const ::std::string& view, const ::std::string& map, const ::std::string& id, const ::Ice::Context& __ctx, const ::Ice::CallbackPtr& __del, const ::Ice::LocalObjectPtr& __cookie = 0)
    {
        return begin_getMetricsFailures(view, map, id, &__ctx, __del, __cookie);
    }

    ::Ice::AsyncResultPtr begin_getMetricsFailures(const ::std::string& view, const ::std::string& map, const ::std::string& id, const ::IceMX::Callback_MetricsAdmin_getMetricsFailuresPtr& __del, const ::Ice::LocalObjectPtr& __cookie = 0)
    {
        return begin_getMetricsFailures(view, map, id, 0, __del, __cookie);
    }

    ::Ice::AsyncResultPtr begin_getMetricsFailures(const ::std::string& view, const ::std::string& map, const ::std::string& id, const ::Ice::Context& __ctx, const ::IceMX::Callback_MetricsAdmin_getMetricsFailuresPtr& __del, const ::Ice::LocalObjectPtr& __cookie = 0)
    {
        return begin_getMetricsFailures(view, map, id, &__ctx, __del, __cookie);
    }

    ICE_API ::IceMX::MetricsFailures end_getMetricsFailures(const ::Ice::AsyncResultPtr&);
    
private:

    ICE_API ::IceMX::MetricsFailures getMetricsFailures(const ::std::string&, const ::std::string&, const ::std::string&, const ::Ice::Context*);
    ICE_API ::Ice::AsyncResultPtr begin_getMetricsFailures(const ::std::string&, const ::std::string&, const ::std::string&, const ::Ice::Context*, const ::IceInternal::CallbackBasePtr&, const ::Ice::LocalObjectPtr& __cookie = 0);
    
public:
    
    ::IceInternal::ProxyHandle<MetricsAdmin> ice_context(const ::Ice::Context& __context) const
    {
        return dynamic_cast<MetricsAdmin*>(::IceProxy::Ice::Object::ice_context(__context).get());
    }
    
    ::IceInternal::ProxyHandle<MetricsAdmin> ice_adapterId(const ::std::string& __id) const
    {
        return dynamic_cast<MetricsAdmin*>(::IceProxy::Ice::Object::ice_adapterId(__id).get());
    }
    
    ::IceInternal::ProxyHandle<MetricsAdmin> ice_endpoints(const ::Ice::EndpointSeq& __endpoints) const
    {
        return dynamic_cast<MetricsAdmin*>(::IceProxy::Ice::Object::ice_endpoints(__endpoints).get());
    }
    
    ::IceInternal::ProxyHandle<MetricsAdmin> ice_locatorCacheTimeout(int __timeout) const
    {
        return dynamic_cast<MetricsAdmin*>(::IceProxy::Ice::Object::ice_locatorCacheTimeout(__timeout).get());
    }
    
    ::IceInternal::ProxyHandle<MetricsAdmin> ice_connectionCached(bool __cached) const
    {
        return dynamic_cast<MetricsAdmin*>(::IceProxy::Ice::Object::ice_connectionCached(__cached).get());
    }
    
    ::IceInternal::ProxyHandle<MetricsAdmin> ice_endpointSelection(::Ice::EndpointSelectionType __est) const
    {
        return dynamic_cast<MetricsAdmin*>(::IceProxy::Ice::Object::ice_endpointSelection(__est).get());
    }
    
    ::IceInternal::ProxyHandle<MetricsAdmin> ice_secure(bool __secure) const
    {
        return dynamic_cast<MetricsAdmin*>(::IceProxy::Ice::Object::ice_secure(__secure).get());
    }
    
    ::IceInternal::ProxyHandle<MetricsAdmin> ice_preferSecure(bool __preferSecure) const
    {
        return dynamic_cast<MetricsAdmin*>(::IceProxy::Ice::Object::ice_preferSecure(__preferSecure).get());
    }
    
    ::IceInternal::ProxyHandle<MetricsAdmin> ice_router(const ::Ice::RouterPrx& __router) const
    {
        return dynamic_cast<MetricsAdmin*>(::IceProxy::Ice::Object::ice_router(__router).get());
    }
    
    ::IceInternal::ProxyHandle<MetricsAdmin> ice_locator(const ::Ice::LocatorPrx& __locator) const
    {
        return dynamic_cast<MetricsAdmin*>(::IceProxy::Ice::Object::ice_locator(__locator).get());
    }
    
    ::IceInternal::ProxyHandle<MetricsAdmin> ice_collocationOptimized(bool __co) const
    {
        return dynamic_cast<MetricsAdmin*>(::IceProxy::Ice::Object::ice_collocationOptimized(__co).get());
    }
    
    ::IceInternal::ProxyHandle<MetricsAdmin> ice_twoway() const
    {
        return dynamic_cast<MetricsAdmin*>(::IceProxy::Ice::Object::ice_twoway().get());
    }
    
    ::IceInternal::ProxyHandle<MetricsAdmin> ice_oneway() const
    {
        return dynamic_cast<MetricsAdmin*>(::IceProxy::Ice::Object::ice_oneway().get());
    }
    
    ::IceInternal::ProxyHandle<MetricsAdmin> ice_batchOneway() const
    {
        return dynamic_cast<MetricsAdmin*>(::IceProxy::Ice::Object::ice_batchOneway().get());
    }
    
    ::IceInternal::ProxyHandle<MetricsAdmin> ice_datagram() const
    {
        return dynamic_cast<MetricsAdmin*>(::IceProxy::Ice::Object::ice_datagram().get());
    }
    
    ::IceInternal::ProxyHandle<MetricsAdmin> ice_batchDatagram() const
    {
        return dynamic_cast<MetricsAdmin*>(::IceProxy::Ice::Object::ice_batchDatagram().get());
    }
    
    ::IceInternal::ProxyHandle<MetricsAdmin> ice_compress(bool __compress) const
    {
        return dynamic_cast<MetricsAdmin*>(::IceProxy::Ice::Object::ice_compress(__compress).get());
    }
    
    ::IceInternal::ProxyHandle<MetricsAdmin> ice_timeout(int __timeout) const
    {
        return dynamic_cast<MetricsAdmin*>(::IceProxy::Ice::Object::ice_timeout(__timeout).get());
    }
    
    ::IceInternal::ProxyHandle<MetricsAdmin> ice_connectionId(const ::std::string& __id) const
    {
        return dynamic_cast<MetricsAdmin*>(::IceProxy::Ice::Object::ice_connectionId(__id).get());
    }
    
    ::IceInternal::ProxyHandle<MetricsAdmin> ice_encodingVersion(const ::Ice::EncodingVersion& __v) const
    {
        return dynamic_cast<MetricsAdmin*>(::IceProxy::Ice::Object::ice_encodingVersion(__v).get());
    }
    
    ICE_API static const ::std::string& ice_staticId();

private: 

    ICE_API virtual ::IceInternal::Handle< ::IceDelegateM::Ice::Object> __createDelegateM();
    ICE_API virtual ::IceInternal::Handle< ::IceDelegateD::Ice::Object> __createDelegateD();
    ICE_API virtual ::IceProxy::Ice::Object* __newInstance() const;
};

class ThreadMetrics : virtual public ::IceProxy::IceMX::Metrics
{
public:
    
    ::IceInternal::ProxyHandle<ThreadMetrics> ice_context(const ::Ice::Context& __context) const
    {
        return dynamic_cast<ThreadMetrics*>(::IceProxy::Ice::Object::ice_context(__context).get());
    }
    
    ::IceInternal::ProxyHandle<ThreadMetrics> ice_adapterId(const ::std::string& __id) const
    {
        return dynamic_cast<ThreadMetrics*>(::IceProxy::Ice::Object::ice_adapterId(__id).get());
    }
    
    ::IceInternal::ProxyHandle<ThreadMetrics> ice_endpoints(const ::Ice::EndpointSeq& __endpoints) const
    {
        return dynamic_cast<ThreadMetrics*>(::IceProxy::Ice::Object::ice_endpoints(__endpoints).get());
    }
    
    ::IceInternal::ProxyHandle<ThreadMetrics> ice_locatorCacheTimeout(int __timeout) const
    {
        return dynamic_cast<ThreadMetrics*>(::IceProxy::Ice::Object::ice_locatorCacheTimeout(__timeout).get());
    }
    
    ::IceInternal::ProxyHandle<ThreadMetrics> ice_connectionCached(bool __cached) const
    {
        return dynamic_cast<ThreadMetrics*>(::IceProxy::Ice::Object::ice_connectionCached(__cached).get());
    }
    
    ::IceInternal::ProxyHandle<ThreadMetrics> ice_endpointSelection(::Ice::EndpointSelectionType __est) const
    {
        return dynamic_cast<ThreadMetrics*>(::IceProxy::Ice::Object::ice_endpointSelection(__est).get());
    }
    
    ::IceInternal::ProxyHandle<ThreadMetrics> ice_secure(bool __secure) const
    {
        return dynamic_cast<ThreadMetrics*>(::IceProxy::Ice::Object::ice_secure(__secure).get());
    }
    
    ::IceInternal::ProxyHandle<ThreadMetrics> ice_preferSecure(bool __preferSecure) const
    {
        return dynamic_cast<ThreadMetrics*>(::IceProxy::Ice::Object::ice_preferSecure(__preferSecure).get());
    }
    
    ::IceInternal::ProxyHandle<ThreadMetrics> ice_router(const ::Ice::RouterPrx& __router) const
    {
        return dynamic_cast<ThreadMetrics*>(::IceProxy::Ice::Object::ice_router(__router).get());
    }
    
    ::IceInternal::ProxyHandle<ThreadMetrics> ice_locator(const ::Ice::LocatorPrx& __locator) const
    {
        return dynamic_cast<ThreadMetrics*>(::IceProxy::Ice::Object::ice_locator(__locator).get());
    }
    
    ::IceInternal::ProxyHandle<ThreadMetrics> ice_collocationOptimized(bool __co) const
    {
        return dynamic_cast<ThreadMetrics*>(::IceProxy::Ice::Object::ice_collocationOptimized(__co).get());
    }
    
    ::IceInternal::ProxyHandle<ThreadMetrics> ice_twoway() const
    {
        return dynamic_cast<ThreadMetrics*>(::IceProxy::Ice::Object::ice_twoway().get());
    }
    
    ::IceInternal::ProxyHandle<ThreadMetrics> ice_oneway() const
    {
        return dynamic_cast<ThreadMetrics*>(::IceProxy::Ice::Object::ice_oneway().get());
    }
    
    ::IceInternal::ProxyHandle<ThreadMetrics> ice_batchOneway() const
    {
        return dynamic_cast<ThreadMetrics*>(::IceProxy::Ice::Object::ice_batchOneway().get());
    }
    
    ::IceInternal::ProxyHandle<ThreadMetrics> ice_datagram() const
    {
        return dynamic_cast<ThreadMetrics*>(::IceProxy::Ice::Object::ice_datagram().get());
    }
    
    ::IceInternal::ProxyHandle<ThreadMetrics> ice_batchDatagram() const
    {
        return dynamic_cast<ThreadMetrics*>(::IceProxy::Ice::Object::ice_batchDatagram().get());
    }
    
    ::IceInternal::ProxyHandle<ThreadMetrics> ice_compress(bool __compress) const
    {
        return dynamic_cast<ThreadMetrics*>(::IceProxy::Ice::Object::ice_compress(__compress).get());
    }
    
    ::IceInternal::ProxyHandle<ThreadMetrics> ice_timeout(int __timeout) const
    {
        return dynamic_cast<ThreadMetrics*>(::IceProxy::Ice::Object::ice_timeout(__timeout).get());
    }
    
    ::IceInternal::ProxyHandle<ThreadMetrics> ice_connectionId(const ::std::string& __id) const
    {
        return dynamic_cast<ThreadMetrics*>(::IceProxy::Ice::Object::ice_connectionId(__id).get());
    }
    
    ::IceInternal::ProxyHandle<ThreadMetrics> ice_encodingVersion(const ::Ice::EncodingVersion& __v) const
    {
        return dynamic_cast<ThreadMetrics*>(::IceProxy::Ice::Object::ice_encodingVersion(__v).get());
    }
    
    ICE_API static const ::std::string& ice_staticId();

private: 

    ICE_API virtual ::IceInternal::Handle< ::IceDelegateM::Ice::Object> __createDelegateM();
    ICE_API virtual ::IceInternal::Handle< ::IceDelegateD::Ice::Object> __createDelegateD();
    ICE_API virtual ::IceProxy::Ice::Object* __newInstance() const;
};

class DispatchMetrics : virtual public ::IceProxy::IceMX::Metrics
{
public:
    
    ::IceInternal::ProxyHandle<DispatchMetrics> ice_context(const ::Ice::Context& __context) const
    {
        return dynamic_cast<DispatchMetrics*>(::IceProxy::Ice::Object::ice_context(__context).get());
    }
    
    ::IceInternal::ProxyHandle<DispatchMetrics> ice_adapterId(const ::std::string& __id) const
    {
        return dynamic_cast<DispatchMetrics*>(::IceProxy::Ice::Object::ice_adapterId(__id).get());
    }
    
    ::IceInternal::ProxyHandle<DispatchMetrics> ice_endpoints(const ::Ice::EndpointSeq& __endpoints) const
    {
        return dynamic_cast<DispatchMetrics*>(::IceProxy::Ice::Object::ice_endpoints(__endpoints).get());
    }
    
    ::IceInternal::ProxyHandle<DispatchMetrics> ice_locatorCacheTimeout(int __timeout) const
    {
        return dynamic_cast<DispatchMetrics*>(::IceProxy::Ice::Object::ice_locatorCacheTimeout(__timeout).get());
    }
    
    ::IceInternal::ProxyHandle<DispatchMetrics> ice_connectionCached(bool __cached) const
    {
        return dynamic_cast<DispatchMetrics*>(::IceProxy::Ice::Object::ice_connectionCached(__cached).get());
    }
    
    ::IceInternal::ProxyHandle<DispatchMetrics> ice_endpointSelection(::Ice::EndpointSelectionType __est) const
    {
        return dynamic_cast<DispatchMetrics*>(::IceProxy::Ice::Object::ice_endpointSelection(__est).get());
    }
    
    ::IceInternal::ProxyHandle<DispatchMetrics> ice_secure(bool __secure) const
    {
        return dynamic_cast<DispatchMetrics*>(::IceProxy::Ice::Object::ice_secure(__secure).get());
    }
    
    ::IceInternal::ProxyHandle<DispatchMetrics> ice_preferSecure(bool __preferSecure) const
    {
        return dynamic_cast<DispatchMetrics*>(::IceProxy::Ice::Object::ice_preferSecure(__preferSecure).get());
    }
    
    ::IceInternal::ProxyHandle<DispatchMetrics> ice_router(const ::Ice::RouterPrx& __router) const
    {
        return dynamic_cast<DispatchMetrics*>(::IceProxy::Ice::Object::ice_router(__router).get());
    }
    
    ::IceInternal::ProxyHandle<DispatchMetrics> ice_locator(const ::Ice::LocatorPrx& __locator) const
    {
        return dynamic_cast<DispatchMetrics*>(::IceProxy::Ice::Object::ice_locator(__locator).get());
    }
    
    ::IceInternal::ProxyHandle<DispatchMetrics> ice_collocationOptimized(bool __co) const
    {
        return dynamic_cast<DispatchMetrics*>(::IceProxy::Ice::Object::ice_collocationOptimized(__co).get());
    }
    
    ::IceInternal::ProxyHandle<DispatchMetrics> ice_twoway() const
    {
        return dynamic_cast<DispatchMetrics*>(::IceProxy::Ice::Object::ice_twoway().get());
    }
    
    ::IceInternal::ProxyHandle<DispatchMetrics> ice_oneway() const
    {
        return dynamic_cast<DispatchMetrics*>(::IceProxy::Ice::Object::ice_oneway().get());
    }
    
    ::IceInternal::ProxyHandle<DispatchMetrics> ice_batchOneway() const
    {
        return dynamic_cast<DispatchMetrics*>(::IceProxy::Ice::Object::ice_batchOneway().get());
    }
    
    ::IceInternal::ProxyHandle<DispatchMetrics> ice_datagram() const
    {
        return dynamic_cast<DispatchMetrics*>(::IceProxy::Ice::Object::ice_datagram().get());
    }
    
    ::IceInternal::ProxyHandle<DispatchMetrics> ice_batchDatagram() const
    {
        return dynamic_cast<DispatchMetrics*>(::IceProxy::Ice::Object::ice_batchDatagram().get());
    }
    
    ::IceInternal::ProxyHandle<DispatchMetrics> ice_compress(bool __compress) const
    {
        return dynamic_cast<DispatchMetrics*>(::IceProxy::Ice::Object::ice_compress(__compress).get());
    }
    
    ::IceInternal::ProxyHandle<DispatchMetrics> ice_timeout(int __timeout) const
    {
        return dynamic_cast<DispatchMetrics*>(::IceProxy::Ice::Object::ice_timeout(__timeout).get());
    }
    
    ::IceInternal::ProxyHandle<DispatchMetrics> ice_connectionId(const ::std::string& __id) const
    {
        return dynamic_cast<DispatchMetrics*>(::IceProxy::Ice::Object::ice_connectionId(__id).get());
    }
    
    ::IceInternal::ProxyHandle<DispatchMetrics> ice_encodingVersion(const ::Ice::EncodingVersion& __v) const
    {
        return dynamic_cast<DispatchMetrics*>(::IceProxy::Ice::Object::ice_encodingVersion(__v).get());
    }
    
    ICE_API static const ::std::string& ice_staticId();

private: 

    ICE_API virtual ::IceInternal::Handle< ::IceDelegateM::Ice::Object> __createDelegateM();
    ICE_API virtual ::IceInternal::Handle< ::IceDelegateD::Ice::Object> __createDelegateD();
    ICE_API virtual ::IceProxy::Ice::Object* __newInstance() const;
};

class RemoteMetrics : virtual public ::IceProxy::IceMX::Metrics
{
public:
    
    ::IceInternal::ProxyHandle<RemoteMetrics> ice_context(const ::Ice::Context& __context) const
    {
        return dynamic_cast<RemoteMetrics*>(::IceProxy::Ice::Object::ice_context(__context).get());
    }
    
    ::IceInternal::ProxyHandle<RemoteMetrics> ice_adapterId(const ::std::string& __id) const
    {
        return dynamic_cast<RemoteMetrics*>(::IceProxy::Ice::Object::ice_adapterId(__id).get());
    }
    
    ::IceInternal::ProxyHandle<RemoteMetrics> ice_endpoints(const ::Ice::EndpointSeq& __endpoints) const
    {
        return dynamic_cast<RemoteMetrics*>(::IceProxy::Ice::Object::ice_endpoints(__endpoints).get());
    }
    
    ::IceInternal::ProxyHandle<RemoteMetrics> ice_locatorCacheTimeout(int __timeout) const
    {
        return dynamic_cast<RemoteMetrics*>(::IceProxy::Ice::Object::ice_locatorCacheTimeout(__timeout).get());
    }
    
    ::IceInternal::ProxyHandle<RemoteMetrics> ice_connectionCached(bool __cached) const
    {
        return dynamic_cast<RemoteMetrics*>(::IceProxy::Ice::Object::ice_connectionCached(__cached).get());
    }
    
    ::IceInternal::ProxyHandle<RemoteMetrics> ice_endpointSelection(::Ice::EndpointSelectionType __est) const
    {
        return dynamic_cast<RemoteMetrics*>(::IceProxy::Ice::Object::ice_endpointSelection(__est).get());
    }
    
    ::IceInternal::ProxyHandle<RemoteMetrics> ice_secure(bool __secure) const
    {
        return dynamic_cast<RemoteMetrics*>(::IceProxy::Ice::Object::ice_secure(__secure).get());
    }
    
    ::IceInternal::ProxyHandle<RemoteMetrics> ice_preferSecure(bool __preferSecure) const
    {
        return dynamic_cast<RemoteMetrics*>(::IceProxy::Ice::Object::ice_preferSecure(__preferSecure).get());
    }
    
    ::IceInternal::ProxyHandle<RemoteMetrics> ice_router(const ::Ice::RouterPrx& __router) const
    {
        return dynamic_cast<RemoteMetrics*>(::IceProxy::Ice::Object::ice_router(__router).get());
    }
    
    ::IceInternal::ProxyHandle<RemoteMetrics> ice_locator(const ::Ice::LocatorPrx& __locator) const
    {
        return dynamic_cast<RemoteMetrics*>(::IceProxy::Ice::Object::ice_locator(__locator).get());
    }
    
    ::IceInternal::ProxyHandle<RemoteMetrics> ice_collocationOptimized(bool __co) const
    {
        return dynamic_cast<RemoteMetrics*>(::IceProxy::Ice::Object::ice_collocationOptimized(__co).get());
    }
    
    ::IceInternal::ProxyHandle<RemoteMetrics> ice_twoway() const
    {
        return dynamic_cast<RemoteMetrics*>(::IceProxy::Ice::Object::ice_twoway().get());
    }
    
    ::IceInternal::ProxyHandle<RemoteMetrics> ice_oneway() const
    {
        return dynamic_cast<RemoteMetrics*>(::IceProxy::Ice::Object::ice_oneway().get());
    }
    
    ::IceInternal::ProxyHandle<RemoteMetrics> ice_batchOneway() const
    {
        return dynamic_cast<RemoteMetrics*>(::IceProxy::Ice::Object::ice_batchOneway().get());
    }
    
    ::IceInternal::ProxyHandle<RemoteMetrics> ice_datagram() const
    {
        return dynamic_cast<RemoteMetrics*>(::IceProxy::Ice::Object::ice_datagram().get());
    }
    
    ::IceInternal::ProxyHandle<RemoteMetrics> ice_batchDatagram() const
    {
        return dynamic_cast<RemoteMetrics*>(::IceProxy::Ice::Object::ice_batchDatagram().get());
    }
    
    ::IceInternal::ProxyHandle<RemoteMetrics> ice_compress(bool __compress) const
    {
        return dynamic_cast<RemoteMetrics*>(::IceProxy::Ice::Object::ice_compress(__compress).get());
    }
    
    ::IceInternal::ProxyHandle<RemoteMetrics> ice_timeout(int __timeout) const
    {
        return dynamic_cast<RemoteMetrics*>(::IceProxy::Ice::Object::ice_timeout(__timeout).get());
    }
    
    ::IceInternal::ProxyHandle<RemoteMetrics> ice_connectionId(const ::std::string& __id) const
    {
        return dynamic_cast<RemoteMetrics*>(::IceProxy::Ice::Object::ice_connectionId(__id).get());
    }
    
    ::IceInternal::ProxyHandle<RemoteMetrics> ice_encodingVersion(const ::Ice::EncodingVersion& __v) const
    {
        return dynamic_cast<RemoteMetrics*>(::IceProxy::Ice::Object::ice_encodingVersion(__v).get());
    }
    
    ICE_API static const ::std::string& ice_staticId();

private: 

    ICE_API virtual ::IceInternal::Handle< ::IceDelegateM::Ice::Object> __createDelegateM();
    ICE_API virtual ::IceInternal::Handle< ::IceDelegateD::Ice::Object> __createDelegateD();
    ICE_API virtual ::IceProxy::Ice::Object* __newInstance() const;
};

class InvocationMetrics : virtual public ::IceProxy::IceMX::Metrics
{
public:
    
    ::IceInternal::ProxyHandle<InvocationMetrics> ice_context(const ::Ice::Context& __context) const
    {
        return dynamic_cast<InvocationMetrics*>(::IceProxy::Ice::Object::ice_context(__context).get());
    }
    
    ::IceInternal::ProxyHandle<InvocationMetrics> ice_adapterId(const ::std::string& __id) const
    {
        return dynamic_cast<InvocationMetrics*>(::IceProxy::Ice::Object::ice_adapterId(__id).get());
    }
    
    ::IceInternal::ProxyHandle<InvocationMetrics> ice_endpoints(const ::Ice::EndpointSeq& __endpoints) const
    {
        return dynamic_cast<InvocationMetrics*>(::IceProxy::Ice::Object::ice_endpoints(__endpoints).get());
    }
    
    ::IceInternal::ProxyHandle<InvocationMetrics> ice_locatorCacheTimeout(int __timeout) const
    {
        return dynamic_cast<InvocationMetrics*>(::IceProxy::Ice::Object::ice_locatorCacheTimeout(__timeout).get());
    }
    
    ::IceInternal::ProxyHandle<InvocationMetrics> ice_connectionCached(bool __cached) const
    {
        return dynamic_cast<InvocationMetrics*>(::IceProxy::Ice::Object::ice_connectionCached(__cached).get());
    }
    
    ::IceInternal::ProxyHandle<InvocationMetrics> ice_endpointSelection(::Ice::EndpointSelectionType __est) const
    {
        return dynamic_cast<InvocationMetrics*>(::IceProxy::Ice::Object::ice_endpointSelection(__est).get());
    }
    
    ::IceInternal::ProxyHandle<InvocationMetrics> ice_secure(bool __secure) const
    {
        return dynamic_cast<InvocationMetrics*>(::IceProxy::Ice::Object::ice_secure(__secure).get());
    }
    
    ::IceInternal::ProxyHandle<InvocationMetrics> ice_preferSecure(bool __preferSecure) const
    {
        return dynamic_cast<InvocationMetrics*>(::IceProxy::Ice::Object::ice_preferSecure(__preferSecure).get());
    }
    
    ::IceInternal::ProxyHandle<InvocationMetrics> ice_router(const ::Ice::RouterPrx& __router) const
    {
        return dynamic_cast<InvocationMetrics*>(::IceProxy::Ice::Object::ice_router(__router).get());
    }
    
    ::IceInternal::ProxyHandle<InvocationMetrics> ice_locator(const ::Ice::LocatorPrx& __locator) const
    {
        return dynamic_cast<InvocationMetrics*>(::IceProxy::Ice::Object::ice_locator(__locator).get());
    }
    
    ::IceInternal::ProxyHandle<InvocationMetrics> ice_collocationOptimized(bool __co) const
    {
        return dynamic_cast<InvocationMetrics*>(::IceProxy::Ice::Object::ice_collocationOptimized(__co).get());
    }
    
    ::IceInternal::ProxyHandle<InvocationMetrics> ice_twoway() const
    {
        return dynamic_cast<InvocationMetrics*>(::IceProxy::Ice::Object::ice_twoway().get());
    }
    
    ::IceInternal::ProxyHandle<InvocationMetrics> ice_oneway() const
    {
        return dynamic_cast<InvocationMetrics*>(::IceProxy::Ice::Object::ice_oneway().get());
    }
    
    ::IceInternal::ProxyHandle<InvocationMetrics> ice_batchOneway() const
    {
        return dynamic_cast<InvocationMetrics*>(::IceProxy::Ice::Object::ice_batchOneway().get());
    }
    
    ::IceInternal::ProxyHandle<InvocationMetrics> ice_datagram() const
    {
        return dynamic_cast<InvocationMetrics*>(::IceProxy::Ice::Object::ice_datagram().get());
    }
    
    ::IceInternal::ProxyHandle<InvocationMetrics> ice_batchDatagram() const
    {
        return dynamic_cast<InvocationMetrics*>(::IceProxy::Ice::Object::ice_batchDatagram().get());
    }
    
    ::IceInternal::ProxyHandle<InvocationMetrics> ice_compress(bool __compress) const
    {
        return dynamic_cast<InvocationMetrics*>(::IceProxy::Ice::Object::ice_compress(__compress).get());
    }
    
    ::IceInternal::ProxyHandle<InvocationMetrics> ice_timeout(int __timeout) const
    {
        return dynamic_cast<InvocationMetrics*>(::IceProxy::Ice::Object::ice_timeout(__timeout).get());
    }
    
    ::IceInternal::ProxyHandle<InvocationMetrics> ice_connectionId(const ::std::string& __id) const
    {
        return dynamic_cast<InvocationMetrics*>(::IceProxy::Ice::Object::ice_connectionId(__id).get());
    }
    
    ::IceInternal::ProxyHandle<InvocationMetrics> ice_encodingVersion(const ::Ice::EncodingVersion& __v) const
    {
        return dynamic_cast<InvocationMetrics*>(::IceProxy::Ice::Object::ice_encodingVersion(__v).get());
    }
    
    ICE_API static const ::std::string& ice_staticId();

private: 

    ICE_API virtual ::IceInternal::Handle< ::IceDelegateM::Ice::Object> __createDelegateM();
    ICE_API virtual ::IceInternal::Handle< ::IceDelegateD::Ice::Object> __createDelegateD();
    ICE_API virtual ::IceProxy::Ice::Object* __newInstance() const;
};

class ConnectionMetrics : virtual public ::IceProxy::IceMX::Metrics
{
public:
    
    ::IceInternal::ProxyHandle<ConnectionMetrics> ice_context(const ::Ice::Context& __context) const
    {
        return dynamic_cast<ConnectionMetrics*>(::IceProxy::Ice::Object::ice_context(__context).get());
    }
    
    ::IceInternal::ProxyHandle<ConnectionMetrics> ice_adapterId(const ::std::string& __id) const
    {
        return dynamic_cast<ConnectionMetrics*>(::IceProxy::Ice::Object::ice_adapterId(__id).get());
    }
    
    ::IceInternal::ProxyHandle<ConnectionMetrics> ice_endpoints(const ::Ice::EndpointSeq& __endpoints) const
    {
        return dynamic_cast<ConnectionMetrics*>(::IceProxy::Ice::Object::ice_endpoints(__endpoints).get());
    }
    
    ::IceInternal::ProxyHandle<ConnectionMetrics> ice_locatorCacheTimeout(int __timeout) const
    {
        return dynamic_cast<ConnectionMetrics*>(::IceProxy::Ice::Object::ice_locatorCacheTimeout(__timeout).get());
    }
    
    ::IceInternal::ProxyHandle<ConnectionMetrics> ice_connectionCached(bool __cached) const
    {
        return dynamic_cast<ConnectionMetrics*>(::IceProxy::Ice::Object::ice_connectionCached(__cached).get());
    }
    
    ::IceInternal::ProxyHandle<ConnectionMetrics> ice_endpointSelection(::Ice::EndpointSelectionType __est) const
    {
        return dynamic_cast<ConnectionMetrics*>(::IceProxy::Ice::Object::ice_endpointSelection(__est).get());
    }
    
    ::IceInternal::ProxyHandle<ConnectionMetrics> ice_secure(bool __secure) const
    {
        return dynamic_cast<ConnectionMetrics*>(::IceProxy::Ice::Object::ice_secure(__secure).get());
    }
    
    ::IceInternal::ProxyHandle<ConnectionMetrics> ice_preferSecure(bool __preferSecure) const
    {
        return dynamic_cast<ConnectionMetrics*>(::IceProxy::Ice::Object::ice_preferSecure(__preferSecure).get());
    }
    
    ::IceInternal::ProxyHandle<ConnectionMetrics> ice_router(const ::Ice::RouterPrx& __router) const
    {
        return dynamic_cast<ConnectionMetrics*>(::IceProxy::Ice::Object::ice_router(__router).get());
    }
    
    ::IceInternal::ProxyHandle<ConnectionMetrics> ice_locator(const ::Ice::LocatorPrx& __locator) const
    {
        return dynamic_cast<ConnectionMetrics*>(::IceProxy::Ice::Object::ice_locator(__locator).get());
    }
    
    ::IceInternal::ProxyHandle<ConnectionMetrics> ice_collocationOptimized(bool __co) const
    {
        return dynamic_cast<ConnectionMetrics*>(::IceProxy::Ice::Object::ice_collocationOptimized(__co).get());
    }
    
    ::IceInternal::ProxyHandle<ConnectionMetrics> ice_twoway() const
    {
        return dynamic_cast<ConnectionMetrics*>(::IceProxy::Ice::Object::ice_twoway().get());
    }
    
    ::IceInternal::ProxyHandle<ConnectionMetrics> ice_oneway() const
    {
        return dynamic_cast<ConnectionMetrics*>(::IceProxy::Ice::Object::ice_oneway().get());
    }
    
    ::IceInternal::ProxyHandle<ConnectionMetrics> ice_batchOneway() const
    {
        return dynamic_cast<ConnectionMetrics*>(::IceProxy::Ice::Object::ice_batchOneway().get());
    }
    
    ::IceInternal::ProxyHandle<ConnectionMetrics> ice_datagram() const
    {
        return dynamic_cast<ConnectionMetrics*>(::IceProxy::Ice::Object::ice_datagram().get());
    }
    
    ::IceInternal::ProxyHandle<ConnectionMetrics> ice_batchDatagram() const
    {
        return dynamic_cast<ConnectionMetrics*>(::IceProxy::Ice::Object::ice_batchDatagram().get());
    }
    
    ::IceInternal::ProxyHandle<ConnectionMetrics> ice_compress(bool __compress) const
    {
        return dynamic_cast<ConnectionMetrics*>(::IceProxy::Ice::Object::ice_compress(__compress).get());
    }
    
    ::IceInternal::ProxyHandle<ConnectionMetrics> ice_timeout(int __timeout) const
    {
        return dynamic_cast<ConnectionMetrics*>(::IceProxy::Ice::Object::ice_timeout(__timeout).get());
    }
    
    ::IceInternal::ProxyHandle<ConnectionMetrics> ice_connectionId(const ::std::string& __id) const
    {
        return dynamic_cast<ConnectionMetrics*>(::IceProxy::Ice::Object::ice_connectionId(__id).get());
    }
    
    ::IceInternal::ProxyHandle<ConnectionMetrics> ice_encodingVersion(const ::Ice::EncodingVersion& __v) const
    {
        return dynamic_cast<ConnectionMetrics*>(::IceProxy::Ice::Object::ice_encodingVersion(__v).get());
    }
    
    ICE_API static const ::std::string& ice_staticId();

private: 

    ICE_API virtual ::IceInternal::Handle< ::IceDelegateM::Ice::Object> __createDelegateM();
    ICE_API virtual ::IceInternal::Handle< ::IceDelegateD::Ice::Object> __createDelegateD();
    ICE_API virtual ::IceProxy::Ice::Object* __newInstance() const;
};

}

}

namespace IceDelegate
{

namespace IceMX
{

class ICE_API Metrics : virtual public ::IceDelegate::Ice::Object
{
public:
};

class ICE_API MetricsAdmin : virtual public ::IceDelegate::Ice::Object
{
public:

    virtual ::Ice::StringSeq getMetricsViewNames(::Ice::StringSeq&, const ::Ice::Context*, ::IceInternal::InvocationObserver&) = 0;

    virtual void enableMetricsView(const ::std::string&, const ::Ice::Context*, ::IceInternal::InvocationObserver&) = 0;

    virtual void disableMetricsView(const ::std::string&, const ::Ice::Context*, ::IceInternal::InvocationObserver&) = 0;

    virtual ::IceMX::MetricsView getMetricsView(const ::std::string&, ::Ice::Long&, const ::Ice::Context*, ::IceInternal::InvocationObserver&) = 0;

    virtual ::IceMX::MetricsFailuresSeq getMapMetricsFailures(const ::std::string&, const ::std::string&, const ::Ice::Context*, ::IceInternal::InvocationObserver&) = 0;

    virtual ::IceMX::MetricsFailures getMetricsFailures(const ::std::string&, const ::std::string&, const ::std::string&, const ::Ice::Context*, ::IceInternal::InvocationObserver&) = 0;
};

class ICE_API ThreadMetrics : virtual public ::IceDelegate::IceMX::Metrics
{
public:
};

class ICE_API DispatchMetrics : virtual public ::IceDelegate::IceMX::Metrics
{
public:
};

class ICE_API RemoteMetrics : virtual public ::IceDelegate::IceMX::Metrics
{
public:
};

class ICE_API InvocationMetrics : virtual public ::IceDelegate::IceMX::Metrics
{
public:
};

class ICE_API ConnectionMetrics : virtual public ::IceDelegate::IceMX::Metrics
{
public:
};

}

}

namespace IceDelegateM
{

namespace IceMX
{

class ICE_API Metrics : virtual public ::IceDelegate::IceMX::Metrics,
                        virtual public ::IceDelegateM::Ice::Object
{
public:
};

class ICE_API MetricsAdmin : virtual public ::IceDelegate::IceMX::MetricsAdmin,
                             virtual public ::IceDelegateM::Ice::Object
{
public:

    virtual ::Ice::StringSeq getMetricsViewNames(::Ice::StringSeq&, const ::Ice::Context*, ::IceInternal::InvocationObserver&);

    virtual void enableMetricsView(const ::std::string&, const ::Ice::Context*, ::IceInternal::InvocationObserver&);

    virtual void disableMetricsView(const ::std::string&, const ::Ice::Context*, ::IceInternal::InvocationObserver&);

    virtual ::IceMX::MetricsView getMetricsView(const ::std::string&, ::Ice::Long&, const ::Ice::Context*, ::IceInternal::InvocationObserver&);

    virtual ::IceMX::MetricsFailuresSeq getMapMetricsFailures(const ::std::string&, const ::std::string&, const ::Ice::Context*, ::IceInternal::InvocationObserver&);

    virtual ::IceMX::MetricsFailures getMetricsFailures(const ::std::string&, const ::std::string&, const ::std::string&, const ::Ice::Context*, ::IceInternal::InvocationObserver&);
};

class ICE_API ThreadMetrics : virtual public ::IceDelegate::IceMX::ThreadMetrics,
                              virtual public ::IceDelegateM::IceMX::Metrics
{
public:
};

class ICE_API DispatchMetrics : virtual public ::IceDelegate::IceMX::DispatchMetrics,
                                virtual public ::IceDelegateM::IceMX::Metrics
{
public:
};

class ICE_API RemoteMetrics : virtual public ::IceDelegate::IceMX::RemoteMetrics,
                              virtual public ::IceDelegateM::IceMX::Metrics
{
public:
};

class ICE_API InvocationMetrics : virtual public ::IceDelegate::IceMX::InvocationMetrics,
                                  virtual public ::IceDelegateM::IceMX::Metrics
{
public:
};

class ICE_API ConnectionMetrics : virtual public ::IceDelegate::IceMX::ConnectionMetrics,
                                  virtual public ::IceDelegateM::IceMX::Metrics
{
public:
};

}

}

namespace IceDelegateD
{

namespace IceMX
{

class ICE_API Metrics : virtual public ::IceDelegate::IceMX::Metrics,
                        virtual public ::IceDelegateD::Ice::Object
{
public:
};

class ICE_API MetricsAdmin : virtual public ::IceDelegate::IceMX::MetricsAdmin,
                             virtual public ::IceDelegateD::Ice::Object
{
public:

    virtual ::Ice::StringSeq getMetricsViewNames(::Ice::StringSeq&, const ::Ice::Context*, ::IceInternal::InvocationObserver&);

    virtual void enableMetricsView(const ::std::string&, const ::Ice::Context*, ::IceInternal::InvocationObserver&);

    virtual void disableMetricsView(const ::std::string&, const ::Ice::Context*, ::IceInternal::InvocationObserver&);

    virtual ::IceMX::MetricsView getMetricsView(const ::std::string&, ::Ice::Long&, const ::Ice::Context*, ::IceInternal::InvocationObserver&);

    virtual ::IceMX::MetricsFailuresSeq getMapMetricsFailures(const ::std::string&, const ::std::string&, const ::Ice::Context*, ::IceInternal::InvocationObserver&);

    virtual ::IceMX::MetricsFailures getMetricsFailures(const ::std::string&, const ::std::string&, const ::std::string&, const ::Ice::Context*, ::IceInternal::InvocationObserver&);
};

class ICE_API ThreadMetrics : virtual public ::IceDelegate::IceMX::ThreadMetrics,
                              virtual public ::IceDelegateD::IceMX::Metrics
{
public:
};

class ICE_API DispatchMetrics : virtual public ::IceDelegate::IceMX::DispatchMetrics,
                                virtual public ::IceDelegateD::IceMX::Metrics
{
public:
};

class ICE_API RemoteMetrics : virtual public ::IceDelegate::IceMX::RemoteMetrics,
                              virtual public ::IceDelegateD::IceMX::Metrics
{
public:
};

class ICE_API InvocationMetrics : virtual public ::IceDelegate::IceMX::InvocationMetrics,
                                  virtual public ::IceDelegateD::IceMX::Metrics
{
public:
};

class ICE_API ConnectionMetrics : virtual public ::IceDelegate::IceMX::ConnectionMetrics,
                                  virtual public ::IceDelegateD::IceMX::Metrics
{
public:
};

}

}

namespace IceMX
{

class ICE_API Metrics : virtual public ::Ice::Object
{
public:

    typedef MetricsPrx ProxyType;
    typedef MetricsPtr PointerType;

    Metrics() :
        total(ICE_INT64(0)),
        current(0),
        totalLifetime(ICE_INT64(0)),
        failures(0)
    {
    }

    Metrics(const ::std::string& __ice_id, ::Ice::Long __ice_total, ::Ice::Int __ice_current, ::Ice::Long __ice_totalLifetime, ::Ice::Int __ice_failures) :
        id(__ice_id),
        total(__ice_total),
        current(__ice_current),
        totalLifetime(__ice_totalLifetime),
        failures(__ice_failures)
    {
    }

    virtual ::Ice::ObjectPtr ice_clone() const;

    virtual bool ice_isA(const ::std::string&, const ::Ice::Current& = ::Ice::Current()) const;
    virtual ::std::vector< ::std::string> ice_ids(const ::Ice::Current& = ::Ice::Current()) const;
    virtual const ::std::string& ice_id(const ::Ice::Current& = ::Ice::Current()) const;
    static const ::std::string& ice_staticId();


    static const ::Ice::ObjectFactoryPtr& ice_factory();

protected:
    virtual void __writeImpl(::IceInternal::BasicStream*) const;
    virtual void __readImpl(::IceInternal::BasicStream*);
    #ifdef __SUNPRO_CC
    using ::Ice::Object::__writeImpl;
    using ::Ice::Object::__readImpl;
    #endif

public:

    ::std::string id;

    ::Ice::Long total;

    ::Ice::Int current;

    ::Ice::Long totalLifetime;

    ::Ice::Int failures;

protected:

    virtual ~Metrics() {}

    friend class Metrics__staticInit;
};

class Metrics__staticInit
{
public:

    ::IceMX::Metrics _init;
};

static Metrics__staticInit _Metrics_init;

inline bool operator==(const Metrics& l, const Metrics& r)
{
    return static_cast<const ::Ice::Object&>(l) == static_cast<const ::Ice::Object&>(r);
}

inline bool operator<(const Metrics& l, const Metrics& r)
{
    return static_cast<const ::Ice::Object&>(l) < static_cast<const ::Ice::Object&>(r);
}

class ICE_API MetricsAdmin : virtual public ::Ice::Object
{
public:

    typedef MetricsAdminPrx ProxyType;
    typedef MetricsAdminPtr PointerType;

    virtual bool ice_isA(const ::std::string&, const ::Ice::Current& = ::Ice::Current()) const;
    virtual ::std::vector< ::std::string> ice_ids(const ::Ice::Current& = ::Ice::Current()) const;
    virtual const ::std::string& ice_id(const ::Ice::Current& = ::Ice::Current()) const;
    static const ::std::string& ice_staticId();

    virtual ::Ice::StringSeq getMetricsViewNames(::Ice::StringSeq&, const ::Ice::Current& = ::Ice::Current()) = 0;
    ::Ice::DispatchStatus ___getMetricsViewNames(::IceInternal::Incoming&, const ::Ice::Current&);

    virtual void enableMetricsView(const ::std::string&, const ::Ice::Current& = ::Ice::Current()) = 0;
    ::Ice::DispatchStatus ___enableMetricsView(::IceInternal::Incoming&, const ::Ice::Current&);

    virtual void disableMetricsView(const ::std::string&, const ::Ice::Current& = ::Ice::Current()) = 0;
    ::Ice::DispatchStatus ___disableMetricsView(::IceInternal::Incoming&, const ::Ice::Current&);

    virtual ::IceMX::MetricsView getMetricsView(const ::std::string&, ::Ice::Long&, const ::Ice::Current& = ::Ice::Current()) = 0;
    ::Ice::DispatchStatus ___getMetricsView(::IceInternal::Incoming&, const ::Ice::Current&);

    virtual ::IceMX::MetricsFailuresSeq getMapMetricsFailures(const ::std::string&, const ::std::string&, const ::Ice::Current& = ::Ice::Current()) = 0;
    ::Ice::DispatchStatus ___getMapMetricsFailures(::IceInternal::Incoming&, const ::Ice::Current&);

    virtual ::IceMX::MetricsFailures getMetricsFailures(const ::std::string&, const ::std::string&, const ::std::string&, const ::Ice::Current& = ::Ice::Current()) = 0;
    ::Ice::DispatchStatus ___getMetricsFailures(::IceInternal::Incoming&, const ::Ice::Current&);

    virtual ::Ice::DispatchStatus __dispatch(::IceInternal::Incoming&, const ::Ice::Current&);

protected:
    virtual void __writeImpl(::IceInternal::BasicStream*) const;
    virtual void __readImpl(::IceInternal::BasicStream*);
    #ifdef __SUNPRO_CC
    using ::Ice::Object::__writeImpl;
    using ::Ice::Object::__readImpl;
    #endif
};

inline bool operator==(const MetricsAdmin& l, const MetricsAdmin& r)
{
    return static_cast<const ::Ice::Object&>(l) == static_cast<const ::Ice::Object&>(r);
}

inline bool operator<(const MetricsAdmin& l, const MetricsAdmin& r)
{
    return static_cast<const ::Ice::Object&>(l) < static_cast<const ::Ice::Object&>(r);
}

class ICE_API ThreadMetrics : public ::IceMX::Metrics
{
public:

    typedef ThreadMetricsPrx ProxyType;
    typedef ThreadMetricsPtr PointerType;

    ThreadMetrics() :
        inUseForIO(0),
        inUseForUser(0),
        inUseForOther(0)
    {
    }

    ThreadMetrics(const ::std::string& __ice_id, ::Ice::Long __ice_total, ::Ice::Int __ice_current, ::Ice::Long __ice_totalLifetime, ::Ice::Int __ice_failures, ::Ice::Int __ice_inUseForIO, ::Ice::Int __ice_inUseForUser, ::Ice::Int __ice_inUseForOther) :
        ::IceMX::Metrics(__ice_id, __ice_total, __ice_current, __ice_totalLifetime, __ice_failures)
        ,
        inUseForIO(__ice_inUseForIO),
        inUseForUser(__ice_inUseForUser),
        inUseForOther(__ice_inUseForOther)
    {
    }

    virtual ::Ice::ObjectPtr ice_clone() const;

    virtual bool ice_isA(const ::std::string&, const ::Ice::Current& = ::Ice::Current()) const;
    virtual ::std::vector< ::std::string> ice_ids(const ::Ice::Current& = ::Ice::Current()) const;
    virtual const ::std::string& ice_id(const ::Ice::Current& = ::Ice::Current()) const;
    static const ::std::string& ice_staticId();


    static const ::Ice::ObjectFactoryPtr& ice_factory();

protected:
    virtual void __writeImpl(::IceInternal::BasicStream*) const;
    virtual void __readImpl(::IceInternal::BasicStream*);
    #ifdef __SUNPRO_CC
    using ::IceMX::Metrics::__writeImpl;
    using ::IceMX::Metrics::__readImpl;
    #endif

public:

    ::Ice::Int inUseForIO;

    ::Ice::Int inUseForUser;

    ::Ice::Int inUseForOther;

protected:

    virtual ~ThreadMetrics() {}
};

inline bool operator==(const ThreadMetrics& l, const ThreadMetrics& r)
{
    return static_cast<const ::Ice::Object&>(l) == static_cast<const ::Ice::Object&>(r);
}

inline bool operator<(const ThreadMetrics& l, const ThreadMetrics& r)
{
    return static_cast<const ::Ice::Object&>(l) < static_cast<const ::Ice::Object&>(r);
}

class ICE_API DispatchMetrics : public ::IceMX::Metrics
{
public:

    typedef DispatchMetricsPrx ProxyType;
    typedef DispatchMetricsPtr PointerType;

    DispatchMetrics() :
        userException(0),
        size(ICE_INT64(0)),
        replySize(ICE_INT64(0))
    {
    }

    DispatchMetrics(const ::std::string& __ice_id, ::Ice::Long __ice_total, ::Ice::Int __ice_current, ::Ice::Long __ice_totalLifetime, ::Ice::Int __ice_failures, ::Ice::Int __ice_userException, ::Ice::Long __ice_size, ::Ice::Long __ice_replySize) :
        ::IceMX::Metrics(__ice_id, __ice_total, __ice_current, __ice_totalLifetime, __ice_failures)
        ,
        userException(__ice_userException),
        size(__ice_size),
        replySize(__ice_replySize)
    {
    }

    virtual ::Ice::ObjectPtr ice_clone() const;

    virtual bool ice_isA(const ::std::string&, const ::Ice::Current& = ::Ice::Current()) const;
    virtual ::std::vector< ::std::string> ice_ids(const ::Ice::Current& = ::Ice::Current()) const;
    virtual const ::std::string& ice_id(const ::Ice::Current& = ::Ice::Current()) const;
    static const ::std::string& ice_staticId();


    static const ::Ice::ObjectFactoryPtr& ice_factory();

protected:
    virtual void __writeImpl(::IceInternal::BasicStream*) const;
    virtual void __readImpl(::IceInternal::BasicStream*);
    #ifdef __SUNPRO_CC
    using ::IceMX::Metrics::__writeImpl;
    using ::IceMX::Metrics::__readImpl;
    #endif

public:

    ::Ice::Int userException;

    ::Ice::Long size;

    ::Ice::Long replySize;

protected:

    virtual ~DispatchMetrics() {}
};

inline bool operator==(const DispatchMetrics& l, const DispatchMetrics& r)
{
    return static_cast<const ::Ice::Object&>(l) == static_cast<const ::Ice::Object&>(r);
}

inline bool operator<(const DispatchMetrics& l, const DispatchMetrics& r)
{
    return static_cast<const ::Ice::Object&>(l) < static_cast<const ::Ice::Object&>(r);
}

class ICE_API RemoteMetrics : public ::IceMX::Metrics
{
public:

    typedef RemoteMetricsPrx ProxyType;
    typedef RemoteMetricsPtr PointerType;

    RemoteMetrics() :
        size(ICE_INT64(0)),
        replySize(ICE_INT64(0))
    {
    }

    RemoteMetrics(const ::std::string& __ice_id, ::Ice::Long __ice_total, ::Ice::Int __ice_current, ::Ice::Long __ice_totalLifetime, ::Ice::Int __ice_failures, ::Ice::Long __ice_size, ::Ice::Long __ice_replySize) :
        ::IceMX::Metrics(__ice_id, __ice_total, __ice_current, __ice_totalLifetime, __ice_failures)
        ,
        size(__ice_size),
        replySize(__ice_replySize)
    {
    }

    virtual ::Ice::ObjectPtr ice_clone() const;

    virtual bool ice_isA(const ::std::string&, const ::Ice::Current& = ::Ice::Current()) const;
    virtual ::std::vector< ::std::string> ice_ids(const ::Ice::Current& = ::Ice::Current()) const;
    virtual const ::std::string& ice_id(const ::Ice::Current& = ::Ice::Current()) const;
    static const ::std::string& ice_staticId();


    static const ::Ice::ObjectFactoryPtr& ice_factory();

protected:
    virtual void __writeImpl(::IceInternal::BasicStream*) const;
    virtual void __readImpl(::IceInternal::BasicStream*);
    #ifdef __SUNPRO_CC
    using ::IceMX::Metrics::__writeImpl;
    using ::IceMX::Metrics::__readImpl;
    #endif

public:

    ::Ice::Long size;

    ::Ice::Long replySize;

protected:

    virtual ~RemoteMetrics() {}
};

inline bool operator==(const RemoteMetrics& l, const RemoteMetrics& r)
{
    return static_cast<const ::Ice::Object&>(l) == static_cast<const ::Ice::Object&>(r);
}

inline bool operator<(const RemoteMetrics& l, const RemoteMetrics& r)
{
    return static_cast<const ::Ice::Object&>(l) < static_cast<const ::Ice::Object&>(r);
}

class ICE_API InvocationMetrics : public ::IceMX::Metrics, public IceInternal::GCShared
{
public:

    typedef InvocationMetricsPrx ProxyType;
    typedef InvocationMetricsPtr PointerType;

    InvocationMetrics() :
        retry(0),
        userException(0)
    {
    }

    InvocationMetrics(const ::std::string& __ice_id, ::Ice::Long __ice_total, ::Ice::Int __ice_current, ::Ice::Long __ice_totalLifetime, ::Ice::Int __ice_failures, ::Ice::Int __ice_retry, ::Ice::Int __ice_userException, const ::IceMX::MetricsMap& __ice_remotes) :
        ::IceMX::Metrics(__ice_id, __ice_total, __ice_current, __ice_totalLifetime, __ice_failures)
        ,
        retry(__ice_retry),
        userException(__ice_userException),
        remotes(__ice_remotes)
    {
    }

    virtual ::Ice::ObjectPtr ice_clone() const;

    virtual bool ice_isA(const ::std::string&, const ::Ice::Current& = ::Ice::Current()) const;
    virtual ::std::vector< ::std::string> ice_ids(const ::Ice::Current& = ::Ice::Current()) const;
    virtual const ::std::string& ice_id(const ::Ice::Current& = ::Ice::Current()) const;
    static const ::std::string& ice_staticId();

    virtual void __addObject(::IceInternal::GCCountMap&);
    virtual bool __usesGC();
    virtual void __gcReachable(::IceInternal::GCCountMap&) const;
    virtual void __gcClear();

    static const ::Ice::ObjectFactoryPtr& ice_factory();

protected:
    virtual void __writeImpl(::IceInternal::BasicStream*) const;
    virtual void __readImpl(::IceInternal::BasicStream*);
    #ifdef __SUNPRO_CC
    using ::IceMX::Metrics::__writeImpl;
    using ::IceMX::Metrics::__readImpl;
    #endif

public:

    ::Ice::Int retry;

    ::Ice::Int userException;

    ::IceMX::MetricsMap remotes;

protected:

    virtual ~InvocationMetrics() {}
};

inline bool operator==(const InvocationMetrics& l, const InvocationMetrics& r)
{
    return static_cast<const ::Ice::Object&>(l) == static_cast<const ::Ice::Object&>(r);
}

inline bool operator<(const InvocationMetrics& l, const InvocationMetrics& r)
{
    return static_cast<const ::Ice::Object&>(l) < static_cast<const ::Ice::Object&>(r);
}

class ICE_API ConnectionMetrics : public ::IceMX::Metrics
{
public:

    typedef ConnectionMetricsPrx ProxyType;
    typedef ConnectionMetricsPtr PointerType;

    ConnectionMetrics() :
        receivedBytes(ICE_INT64(0)),
        sentBytes(ICE_INT64(0))
    {
    }

    ConnectionMetrics(const ::std::string& __ice_id, ::Ice::Long __ice_total, ::Ice::Int __ice_current, ::Ice::Long __ice_totalLifetime, ::Ice::Int __ice_failures, ::Ice::Long __ice_receivedBytes, ::Ice::Long __ice_sentBytes) :
        ::IceMX::Metrics(__ice_id, __ice_total, __ice_current, __ice_totalLifetime, __ice_failures)
        ,
        receivedBytes(__ice_receivedBytes),
        sentBytes(__ice_sentBytes)
    {
    }

    virtual ::Ice::ObjectPtr ice_clone() const;

    virtual bool ice_isA(const ::std::string&, const ::Ice::Current& = ::Ice::Current()) const;
    virtual ::std::vector< ::std::string> ice_ids(const ::Ice::Current& = ::Ice::Current()) const;
    virtual const ::std::string& ice_id(const ::Ice::Current& = ::Ice::Current()) const;
    static const ::std::string& ice_staticId();


    static const ::Ice::ObjectFactoryPtr& ice_factory();

protected:
    virtual void __writeImpl(::IceInternal::BasicStream*) const;
    virtual void __readImpl(::IceInternal::BasicStream*);
    #ifdef __SUNPRO_CC
    using ::IceMX::Metrics::__writeImpl;
    using ::IceMX::Metrics::__readImpl;
    #endif

public:

    ::Ice::Long receivedBytes;

    ::Ice::Long sentBytes;

protected:

    virtual ~ConnectionMetrics() {}
};

inline bool operator==(const ConnectionMetrics& l, const ConnectionMetrics& r)
{
    return static_cast<const ::Ice::Object&>(l) == static_cast<const ::Ice::Object&>(r);
}

inline bool operator<(const ConnectionMetrics& l, const ConnectionMetrics& r)
{
    return static_cast<const ::Ice::Object&>(l) < static_cast<const ::Ice::Object&>(r);
}

}

namespace IceMX
{

template<class T>
class CallbackNC_MetricsAdmin_getMetricsViewNames : public Callback_MetricsAdmin_getMetricsViewNames_Base, public ::IceInternal::TwowayCallbackNC<T>
{
public:

    typedef IceUtil::Handle<T> TPtr;

    typedef void (T::*Exception)(const ::Ice::Exception&);
    typedef void (T::*Sent)(bool);
    typedef void (T::*Response)(const ::Ice::StringSeq&, const ::Ice::StringSeq&);

    CallbackNC_MetricsAdmin_getMetricsViewNames(const TPtr& obj, Response cb, Exception excb, Sent sentcb)
        : ::IceInternal::TwowayCallbackNC<T>(obj, cb != 0, excb, sentcb), response(cb)
    {
    }

    virtual void __completed(const ::Ice::AsyncResultPtr& __result) const
    {
        ::IceMX::MetricsAdminPrx __proxy = ::IceMX::MetricsAdminPrx::uncheckedCast(__result->getProxy());
        ::Ice::StringSeq disabledViews;
        ::Ice::StringSeq __ret;
        try
        {
            __ret = __proxy->end_getMetricsViewNames(disabledViews, __result);
        }
        catch(::Ice::Exception& ex)
        {
            ::IceInternal::CallbackNC<T>::__exception(__result, ex);
            return;
        }
        if(response)
        {
            (::IceInternal::CallbackNC<T>::callback.get()->*response)(__ret, disabledViews);
        }
    }

    Response response;
};

template<class T> Callback_MetricsAdmin_getMetricsViewNamesPtr
newCallback_MetricsAdmin_getMetricsViewNames(const IceUtil::Handle<T>& instance, void (T::*cb)(const ::Ice::StringSeq&, const ::Ice::StringSeq&), void (T::*excb)(const ::Ice::Exception&), void (T::*sentcb)(bool) = 0)
{
    return new CallbackNC_MetricsAdmin_getMetricsViewNames<T>(instance, cb, excb, sentcb);
}

template<class T> Callback_MetricsAdmin_getMetricsViewNamesPtr
newCallback_MetricsAdmin_getMetricsViewNames(T* instance, void (T::*cb)(const ::Ice::StringSeq&, const ::Ice::StringSeq&), void (T::*excb)(const ::Ice::Exception&), void (T::*sentcb)(bool) = 0)
{
    return new CallbackNC_MetricsAdmin_getMetricsViewNames<T>(instance, cb, excb, sentcb);
}

template<class T, typename CT>
class Callback_MetricsAdmin_getMetricsViewNames : public Callback_MetricsAdmin_getMetricsViewNames_Base, public ::IceInternal::TwowayCallback<T, CT>
{
public:

    typedef IceUtil::Handle<T> TPtr;

    typedef void (T::*Exception)(const ::Ice::Exception& , const CT&);
    typedef void (T::*Sent)(bool , const CT&);
    typedef void (T::*Response)(const ::Ice::StringSeq&, const ::Ice::StringSeq&, const CT&);

    Callback_MetricsAdmin_getMetricsViewNames(const TPtr& obj, Response cb, Exception excb, Sent sentcb)
        : ::IceInternal::TwowayCallback<T, CT>(obj, cb != 0, excb, sentcb), response(cb)
    {
    }

    virtual void __completed(const ::Ice::AsyncResultPtr& __result) const
    {
        ::IceMX::MetricsAdminPrx __proxy = ::IceMX::MetricsAdminPrx::uncheckedCast(__result->getProxy());
        ::Ice::StringSeq disabledViews;
        ::Ice::StringSeq __ret;
        try
        {
            __ret = __proxy->end_getMetricsViewNames(disabledViews, __result);
        }
        catch(::Ice::Exception& ex)
        {
            ::IceInternal::Callback<T, CT>::__exception(__result, ex);
            return;
        }
        if(response)
        {
            (::IceInternal::Callback<T, CT>::callback.get()->*response)(__ret, disabledViews, CT::dynamicCast(__result->getCookie()));
        }
    }

    Response response;
};

template<class T, typename CT> Callback_MetricsAdmin_getMetricsViewNamesPtr
newCallback_MetricsAdmin_getMetricsViewNames(const IceUtil::Handle<T>& instance, void (T::*cb)(const ::Ice::StringSeq&, const ::Ice::StringSeq&, const CT&), void (T::*excb)(const ::Ice::Exception&, const CT&), void (T::*sentcb)(bool, const CT&) = 0)
{
    return new Callback_MetricsAdmin_getMetricsViewNames<T, CT>(instance, cb, excb, sentcb);
}

template<class T, typename CT> Callback_MetricsAdmin_getMetricsViewNamesPtr
newCallback_MetricsAdmin_getMetricsViewNames(T* instance, void (T::*cb)(const ::Ice::StringSeq&, const ::Ice::StringSeq&, const CT&), void (T::*excb)(const ::Ice::Exception&, const CT&), void (T::*sentcb)(bool, const CT&) = 0)
{
    return new Callback_MetricsAdmin_getMetricsViewNames<T, CT>(instance, cb, excb, sentcb);
}

template<class T>
class CallbackNC_MetricsAdmin_enableMetricsView : public Callback_MetricsAdmin_enableMetricsView_Base, public ::IceInternal::TwowayCallbackNC<T>
{
public:

    typedef IceUtil::Handle<T> TPtr;

    typedef void (T::*Exception)(const ::Ice::Exception&);
    typedef void (T::*Sent)(bool);
    typedef void (T::*Response)();

    CallbackNC_MetricsAdmin_enableMetricsView(const TPtr& obj, Response cb, Exception excb, Sent sentcb)
        : ::IceInternal::TwowayCallbackNC<T>(obj, cb != 0, excb, sentcb), response(cb)
    {
    }

    virtual void __completed(const ::Ice::AsyncResultPtr& __result) const
    {
        ::IceMX::MetricsAdminPrx __proxy = ::IceMX::MetricsAdminPrx::uncheckedCast(__result->getProxy());
        try
        {
            __proxy->end_enableMetricsView(__result);
        }
        catch(::Ice::Exception& ex)
        {
            ::IceInternal::CallbackNC<T>::__exception(__result, ex);
            return;
        }
        if(response)
        {
            (::IceInternal::CallbackNC<T>::callback.get()->*response)();
        }
    }

    Response response;
};

template<class T> Callback_MetricsAdmin_enableMetricsViewPtr
newCallback_MetricsAdmin_enableMetricsView(const IceUtil::Handle<T>& instance, void (T::*cb)(), void (T::*excb)(const ::Ice::Exception&), void (T::*sentcb)(bool) = 0)
{
    return new CallbackNC_MetricsAdmin_enableMetricsView<T>(instance, cb, excb, sentcb);
}

template<class T> Callback_MetricsAdmin_enableMetricsViewPtr
newCallback_MetricsAdmin_enableMetricsView(const IceUtil::Handle<T>& instance, void (T::*excb)(const ::Ice::Exception&), void (T::*sentcb)(bool) = 0)
{
    return new CallbackNC_MetricsAdmin_enableMetricsView<T>(instance, 0, excb, sentcb);
}

template<class T> Callback_MetricsAdmin_enableMetricsViewPtr
newCallback_MetricsAdmin_enableMetricsView(T* instance, void (T::*cb)(), void (T::*excb)(const ::Ice::Exception&), void (T::*sentcb)(bool) = 0)
{
    return new CallbackNC_MetricsAdmin_enableMetricsView<T>(instance, cb, excb, sentcb);
}

template<class T> Callback_MetricsAdmin_enableMetricsViewPtr
newCallback_MetricsAdmin_enableMetricsView(T* instance, void (T::*excb)(const ::Ice::Exception&), void (T::*sentcb)(bool) = 0)
{
    return new CallbackNC_MetricsAdmin_enableMetricsView<T>(instance, 0, excb, sentcb);
}

template<class T, typename CT>
class Callback_MetricsAdmin_enableMetricsView : public Callback_MetricsAdmin_enableMetricsView_Base, public ::IceInternal::TwowayCallback<T, CT>
{
public:

    typedef IceUtil::Handle<T> TPtr;

    typedef void (T::*Exception)(const ::Ice::Exception& , const CT&);
    typedef void (T::*Sent)(bool , const CT&);
    typedef void (T::*Response)(const CT&);

    Callback_MetricsAdmin_enableMetricsView(const TPtr& obj, Response cb, Exception excb, Sent sentcb)
        : ::IceInternal::TwowayCallback<T, CT>(obj, cb != 0, excb, sentcb), response(cb)
    {
    }

    virtual void __completed(const ::Ice::AsyncResultPtr& __result) const
    {
        ::IceMX::MetricsAdminPrx __proxy = ::IceMX::MetricsAdminPrx::uncheckedCast(__result->getProxy());
        try
        {
            __proxy->end_enableMetricsView(__result);
        }
        catch(::Ice::Exception& ex)
        {
            ::IceInternal::Callback<T, CT>::__exception(__result, ex);
            return;
        }
        if(response)
        {
            (::IceInternal::Callback<T, CT>::callback.get()->*response)(CT::dynamicCast(__result->getCookie()));
        }
    }

    Response response;
};

template<class T, typename CT> Callback_MetricsAdmin_enableMetricsViewPtr
newCallback_MetricsAdmin_enableMetricsView(const IceUtil::Handle<T>& instance, void (T::*cb)(const CT&), void (T::*excb)(const ::Ice::Exception&, const CT&), void (T::*sentcb)(bool, const CT&) = 0)
{
    return new Callback_MetricsAdmin_enableMetricsView<T, CT>(instance, cb, excb, sentcb);
}

template<class T, typename CT> Callback_MetricsAdmin_enableMetricsViewPtr
newCallback_MetricsAdmin_enableMetricsView(const IceUtil::Handle<T>& instance, void (T::*excb)(const ::Ice::Exception&, const CT&), void (T::*sentcb)(bool, const CT&) = 0)
{
    return new Callback_MetricsAdmin_enableMetricsView<T, CT>(instance, 0, excb, sentcb);
}

template<class T, typename CT> Callback_MetricsAdmin_enableMetricsViewPtr
newCallback_MetricsAdmin_enableMetricsView(T* instance, void (T::*cb)(const CT&), void (T::*excb)(const ::Ice::Exception&, const CT&), void (T::*sentcb)(bool, const CT&) = 0)
{
    return new Callback_MetricsAdmin_enableMetricsView<T, CT>(instance, cb, excb, sentcb);
}

template<class T, typename CT> Callback_MetricsAdmin_enableMetricsViewPtr
newCallback_MetricsAdmin_enableMetricsView(T* instance, void (T::*excb)(const ::Ice::Exception&, const CT&), void (T::*sentcb)(bool, const CT&) = 0)
{
    return new Callback_MetricsAdmin_enableMetricsView<T, CT>(instance, 0, excb, sentcb);
}

template<class T>
class CallbackNC_MetricsAdmin_disableMetricsView : public Callback_MetricsAdmin_disableMetricsView_Base, public ::IceInternal::TwowayCallbackNC<T>
{
public:

    typedef IceUtil::Handle<T> TPtr;

    typedef void (T::*Exception)(const ::Ice::Exception&);
    typedef void (T::*Sent)(bool);
    typedef void (T::*Response)();

    CallbackNC_MetricsAdmin_disableMetricsView(const TPtr& obj, Response cb, Exception excb, Sent sentcb)
        : ::IceInternal::TwowayCallbackNC<T>(obj, cb != 0, excb, sentcb), response(cb)
    {
    }

    virtual void __completed(const ::Ice::AsyncResultPtr& __result) const
    {
        ::IceMX::MetricsAdminPrx __proxy = ::IceMX::MetricsAdminPrx::uncheckedCast(__result->getProxy());
        try
        {
            __proxy->end_disableMetricsView(__result);
        }
        catch(::Ice::Exception& ex)
        {
            ::IceInternal::CallbackNC<T>::__exception(__result, ex);
            return;
        }
        if(response)
        {
            (::IceInternal::CallbackNC<T>::callback.get()->*response)();
        }
    }

    Response response;
};

template<class T> Callback_MetricsAdmin_disableMetricsViewPtr
newCallback_MetricsAdmin_disableMetricsView(const IceUtil::Handle<T>& instance, void (T::*cb)(), void (T::*excb)(const ::Ice::Exception&), void (T::*sentcb)(bool) = 0)
{
    return new CallbackNC_MetricsAdmin_disableMetricsView<T>(instance, cb, excb, sentcb);
}

template<class T> Callback_MetricsAdmin_disableMetricsViewPtr
newCallback_MetricsAdmin_disableMetricsView(const IceUtil::Handle<T>& instance, void (T::*excb)(const ::Ice::Exception&), void (T::*sentcb)(bool) = 0)
{
    return new CallbackNC_MetricsAdmin_disableMetricsView<T>(instance, 0, excb, sentcb);
}

template<class T> Callback_MetricsAdmin_disableMetricsViewPtr
newCallback_MetricsAdmin_disableMetricsView(T* instance, void (T::*cb)(), void (T::*excb)(const ::Ice::Exception&), void (T::*sentcb)(bool) = 0)
{
    return new CallbackNC_MetricsAdmin_disableMetricsView<T>(instance, cb, excb, sentcb);
}

template<class T> Callback_MetricsAdmin_disableMetricsViewPtr
newCallback_MetricsAdmin_disableMetricsView(T* instance, void (T::*excb)(const ::Ice::Exception&), void (T::*sentcb)(bool) = 0)
{
    return new CallbackNC_MetricsAdmin_disableMetricsView<T>(instance, 0, excb, sentcb);
}

template<class T, typename CT>
class Callback_MetricsAdmin_disableMetricsView : public Callback_MetricsAdmin_disableMetricsView_Base, public ::IceInternal::TwowayCallback<T, CT>
{
public:

    typedef IceUtil::Handle<T> TPtr;

    typedef void (T::*Exception)(const ::Ice::Exception& , const CT&);
    typedef void (T::*Sent)(bool , const CT&);
    typedef void (T::*Response)(const CT&);

    Callback_MetricsAdmin_disableMetricsView(const TPtr& obj, Response cb, Exception excb, Sent sentcb)
        : ::IceInternal::TwowayCallback<T, CT>(obj, cb != 0, excb, sentcb), response(cb)
    {
    }

    virtual void __completed(const ::Ice::AsyncResultPtr& __result) const
    {
        ::IceMX::MetricsAdminPrx __proxy = ::IceMX::MetricsAdminPrx::uncheckedCast(__result->getProxy());
        try
        {
            __proxy->end_disableMetricsView(__result);
        }
        catch(::Ice::Exception& ex)
        {
            ::IceInternal::Callback<T, CT>::__exception(__result, ex);
            return;
        }
        if(response)
        {
            (::IceInternal::Callback<T, CT>::callback.get()->*response)(CT::dynamicCast(__result->getCookie()));
        }
    }

    Response response;
};

template<class T, typename CT> Callback_MetricsAdmin_disableMetricsViewPtr
newCallback_MetricsAdmin_disableMetricsView(const IceUtil::Handle<T>& instance, void (T::*cb)(const CT&), void (T::*excb)(const ::Ice::Exception&, const CT&), void (T::*sentcb)(bool, const CT&) = 0)
{
    return new Callback_MetricsAdmin_disableMetricsView<T, CT>(instance, cb, excb, sentcb);
}

template<class T, typename CT> Callback_MetricsAdmin_disableMetricsViewPtr
newCallback_MetricsAdmin_disableMetricsView(const IceUtil::Handle<T>& instance, void (T::*excb)(const ::Ice::Exception&, const CT&), void (T::*sentcb)(bool, const CT&) = 0)
{
    return new Callback_MetricsAdmin_disableMetricsView<T, CT>(instance, 0, excb, sentcb);
}

template<class T, typename CT> Callback_MetricsAdmin_disableMetricsViewPtr
newCallback_MetricsAdmin_disableMetricsView(T* instance, void (T::*cb)(const CT&), void (T::*excb)(const ::Ice::Exception&, const CT&), void (T::*sentcb)(bool, const CT&) = 0)
{
    return new Callback_MetricsAdmin_disableMetricsView<T, CT>(instance, cb, excb, sentcb);
}

template<class T, typename CT> Callback_MetricsAdmin_disableMetricsViewPtr
newCallback_MetricsAdmin_disableMetricsView(T* instance, void (T::*excb)(const ::Ice::Exception&, const CT&), void (T::*sentcb)(bool, const CT&) = 0)
{
    return new Callback_MetricsAdmin_disableMetricsView<T, CT>(instance, 0, excb, sentcb);
}

template<class T>
class CallbackNC_MetricsAdmin_getMetricsView : public Callback_MetricsAdmin_getMetricsView_Base, public ::IceInternal::TwowayCallbackNC<T>
{
public:

    typedef IceUtil::Handle<T> TPtr;

    typedef void (T::*Exception)(const ::Ice::Exception&);
    typedef void (T::*Sent)(bool);
    typedef void (T::*Response)(const ::IceMX::MetricsView&, ::Ice::Long);

    CallbackNC_MetricsAdmin_getMetricsView(const TPtr& obj, Response cb, Exception excb, Sent sentcb)
        : ::IceInternal::TwowayCallbackNC<T>(obj, cb != 0, excb, sentcb), response(cb)
    {
    }

    virtual void __completed(const ::Ice::AsyncResultPtr& __result) const
    {
        ::IceMX::MetricsAdminPrx __proxy = ::IceMX::MetricsAdminPrx::uncheckedCast(__result->getProxy());
        ::Ice::Long timestamp;
        ::IceMX::MetricsView __ret;
        try
        {
            __ret = __proxy->end_getMetricsView(timestamp, __result);
        }
        catch(::Ice::Exception& ex)
        {
            ::IceInternal::CallbackNC<T>::__exception(__result, ex);
            return;
        }
        if(response)
        {
            (::IceInternal::CallbackNC<T>::callback.get()->*response)(__ret, timestamp);
        }
    }

    Response response;
};

template<class T> Callback_MetricsAdmin_getMetricsViewPtr
newCallback_MetricsAdmin_getMetricsView(const IceUtil::Handle<T>& instance, void (T::*cb)(const ::IceMX::MetricsView&, ::Ice::Long), void (T::*excb)(const ::Ice::Exception&), void (T::*sentcb)(bool) = 0)
{
    return new CallbackNC_MetricsAdmin_getMetricsView<T>(instance, cb, excb, sentcb);
}

template<class T> Callback_MetricsAdmin_getMetricsViewPtr
newCallback_MetricsAdmin_getMetricsView(T* instance, void (T::*cb)(const ::IceMX::MetricsView&, ::Ice::Long), void (T::*excb)(const ::Ice::Exception&), void (T::*sentcb)(bool) = 0)
{
    return new CallbackNC_MetricsAdmin_getMetricsView<T>(instance, cb, excb, sentcb);
}

template<class T, typename CT>
class Callback_MetricsAdmin_getMetricsView : public Callback_MetricsAdmin_getMetricsView_Base, public ::IceInternal::TwowayCallback<T, CT>
{
public:

    typedef IceUtil::Handle<T> TPtr;

    typedef void (T::*Exception)(const ::Ice::Exception& , const CT&);
    typedef void (T::*Sent)(bool , const CT&);
    typedef void (T::*Response)(const ::IceMX::MetricsView&, ::Ice::Long, const CT&);

    Callback_MetricsAdmin_getMetricsView(const TPtr& obj, Response cb, Exception excb, Sent sentcb)
        : ::IceInternal::TwowayCallback<T, CT>(obj, cb != 0, excb, sentcb), response(cb)
    {
    }

    virtual void __completed(const ::Ice::AsyncResultPtr& __result) const
    {
        ::IceMX::MetricsAdminPrx __proxy = ::IceMX::MetricsAdminPrx::uncheckedCast(__result->getProxy());
        ::Ice::Long timestamp;
        ::IceMX::MetricsView __ret;
        try
        {
            __ret = __proxy->end_getMetricsView(timestamp, __result);
        }
        catch(::Ice::Exception& ex)
        {
            ::IceInternal::Callback<T, CT>::__exception(__result, ex);
            return;
        }
        if(response)
        {
            (::IceInternal::Callback<T, CT>::callback.get()->*response)(__ret, timestamp, CT::dynamicCast(__result->getCookie()));
        }
    }

    Response response;
};

template<class T, typename CT> Callback_MetricsAdmin_getMetricsViewPtr
newCallback_MetricsAdmin_getMetricsView(const IceUtil::Handle<T>& instance, void (T::*cb)(const ::IceMX::MetricsView&, ::Ice::Long, const CT&), void (T::*excb)(const ::Ice::Exception&, const CT&), void (T::*sentcb)(bool, const CT&) = 0)
{
    return new Callback_MetricsAdmin_getMetricsView<T, CT>(instance, cb, excb, sentcb);
}

template<class T, typename CT> Callback_MetricsAdmin_getMetricsViewPtr
newCallback_MetricsAdmin_getMetricsView(T* instance, void (T::*cb)(const ::IceMX::MetricsView&, ::Ice::Long, const CT&), void (T::*excb)(const ::Ice::Exception&, const CT&), void (T::*sentcb)(bool, const CT&) = 0)
{
    return new Callback_MetricsAdmin_getMetricsView<T, CT>(instance, cb, excb, sentcb);
}

template<class T>
class CallbackNC_MetricsAdmin_getMapMetricsFailures : public Callback_MetricsAdmin_getMapMetricsFailures_Base, public ::IceInternal::TwowayCallbackNC<T>
{
public:

    typedef IceUtil::Handle<T> TPtr;

    typedef void (T::*Exception)(const ::Ice::Exception&);
    typedef void (T::*Sent)(bool);
    typedef void (T::*Response)(const ::IceMX::MetricsFailuresSeq&);

    CallbackNC_MetricsAdmin_getMapMetricsFailures(const TPtr& obj, Response cb, Exception excb, Sent sentcb)
        : ::IceInternal::TwowayCallbackNC<T>(obj, cb != 0, excb, sentcb), response(cb)
    {
    }

    virtual void __completed(const ::Ice::AsyncResultPtr& __result) const
    {
        ::IceMX::MetricsAdminPrx __proxy = ::IceMX::MetricsAdminPrx::uncheckedCast(__result->getProxy());
        ::IceMX::MetricsFailuresSeq __ret;
        try
        {
            __ret = __proxy->end_getMapMetricsFailures(__result);
        }
        catch(::Ice::Exception& ex)
        {
            ::IceInternal::CallbackNC<T>::__exception(__result, ex);
            return;
        }
        if(response)
        {
            (::IceInternal::CallbackNC<T>::callback.get()->*response)(__ret);
        }
    }

    Response response;
};

template<class T> Callback_MetricsAdmin_getMapMetricsFailuresPtr
newCallback_MetricsAdmin_getMapMetricsFailures(const IceUtil::Handle<T>& instance, void (T::*cb)(const ::IceMX::MetricsFailuresSeq&), void (T::*excb)(const ::Ice::Exception&), void (T::*sentcb)(bool) = 0)
{
    return new CallbackNC_MetricsAdmin_getMapMetricsFailures<T>(instance, cb, excb, sentcb);
}

template<class T> Callback_MetricsAdmin_getMapMetricsFailuresPtr
newCallback_MetricsAdmin_getMapMetricsFailures(T* instance, void (T::*cb)(const ::IceMX::MetricsFailuresSeq&), void (T::*excb)(const ::Ice::Exception&), void (T::*sentcb)(bool) = 0)
{
    return new CallbackNC_MetricsAdmin_getMapMetricsFailures<T>(instance, cb, excb, sentcb);
}

template<class T, typename CT>
class Callback_MetricsAdmin_getMapMetricsFailures : public Callback_MetricsAdmin_getMapMetricsFailures_Base, public ::IceInternal::TwowayCallback<T, CT>
{
public:

    typedef IceUtil::Handle<T> TPtr;

    typedef void (T::*Exception)(const ::Ice::Exception& , const CT&);
    typedef void (T::*Sent)(bool , const CT&);
    typedef void (T::*Response)(const ::IceMX::MetricsFailuresSeq&, const CT&);

    Callback_MetricsAdmin_getMapMetricsFailures(const TPtr& obj, Response cb, Exception excb, Sent sentcb)
        : ::IceInternal::TwowayCallback<T, CT>(obj, cb != 0, excb, sentcb), response(cb)
    {
    }

    virtual void __completed(const ::Ice::AsyncResultPtr& __result) const
    {
        ::IceMX::MetricsAdminPrx __proxy = ::IceMX::MetricsAdminPrx::uncheckedCast(__result->getProxy());
        ::IceMX::MetricsFailuresSeq __ret;
        try
        {
            __ret = __proxy->end_getMapMetricsFailures(__result);
        }
        catch(::Ice::Exception& ex)
        {
            ::IceInternal::Callback<T, CT>::__exception(__result, ex);
            return;
        }
        if(response)
        {
            (::IceInternal::Callback<T, CT>::callback.get()->*response)(__ret, CT::dynamicCast(__result->getCookie()));
        }
    }

    Response response;
};

template<class T, typename CT> Callback_MetricsAdmin_getMapMetricsFailuresPtr
newCallback_MetricsAdmin_getMapMetricsFailures(const IceUtil::Handle<T>& instance, void (T::*cb)(const ::IceMX::MetricsFailuresSeq&, const CT&), void (T::*excb)(const ::Ice::Exception&, const CT&), void (T::*sentcb)(bool, const CT&) = 0)
{
    return new Callback_MetricsAdmin_getMapMetricsFailures<T, CT>(instance, cb, excb, sentcb);
}

template<class T, typename CT> Callback_MetricsAdmin_getMapMetricsFailuresPtr
newCallback_MetricsAdmin_getMapMetricsFailures(T* instance, void (T::*cb)(const ::IceMX::MetricsFailuresSeq&, const CT&), void (T::*excb)(const ::Ice::Exception&, const CT&), void (T::*sentcb)(bool, const CT&) = 0)
{
    return new Callback_MetricsAdmin_getMapMetricsFailures<T, CT>(instance, cb, excb, sentcb);
}

template<class T>
class CallbackNC_MetricsAdmin_getMetricsFailures : public Callback_MetricsAdmin_getMetricsFailures_Base, public ::IceInternal::TwowayCallbackNC<T>
{
public:

    typedef IceUtil::Handle<T> TPtr;

    typedef void (T::*Exception)(const ::Ice::Exception&);
    typedef void (T::*Sent)(bool);
    typedef void (T::*Response)(const ::IceMX::MetricsFailures&);

    CallbackNC_MetricsAdmin_getMetricsFailures(const TPtr& obj, Response cb, Exception excb, Sent sentcb)
        : ::IceInternal::TwowayCallbackNC<T>(obj, cb != 0, excb, sentcb), response(cb)
    {
    }

    virtual void __completed(const ::Ice::AsyncResultPtr& __result) const
    {
        ::IceMX::MetricsAdminPrx __proxy = ::IceMX::MetricsAdminPrx::uncheckedCast(__result->getProxy());
        ::IceMX::MetricsFailures __ret;
        try
        {
            __ret = __proxy->end_getMetricsFailures(__result);
        }
        catch(::Ice::Exception& ex)
        {
            ::IceInternal::CallbackNC<T>::__exception(__result, ex);
            return;
        }
        if(response)
        {
            (::IceInternal::CallbackNC<T>::callback.get()->*response)(__ret);
        }
    }

    Response response;
};

template<class T> Callback_MetricsAdmin_getMetricsFailuresPtr
newCallback_MetricsAdmin_getMetricsFailures(const IceUtil::Handle<T>& instance, void (T::*cb)(const ::IceMX::MetricsFailures&), void (T::*excb)(const ::Ice::Exception&), void (T::*sentcb)(bool) = 0)
{
    return new CallbackNC_MetricsAdmin_getMetricsFailures<T>(instance, cb, excb, sentcb);
}

template<class T> Callback_MetricsAdmin_getMetricsFailuresPtr
newCallback_MetricsAdmin_getMetricsFailures(T* instance, void (T::*cb)(const ::IceMX::MetricsFailures&), void (T::*excb)(const ::Ice::Exception&), void (T::*sentcb)(bool) = 0)
{
    return new CallbackNC_MetricsAdmin_getMetricsFailures<T>(instance, cb, excb, sentcb);
}

template<class T, typename CT>
class Callback_MetricsAdmin_getMetricsFailures : public Callback_MetricsAdmin_getMetricsFailures_Base, public ::IceInternal::TwowayCallback<T, CT>
{
public:

    typedef IceUtil::Handle<T> TPtr;

    typedef void (T::*Exception)(const ::Ice::Exception& , const CT&);
    typedef void (T::*Sent)(bool , const CT&);
    typedef void (T::*Response)(const ::IceMX::MetricsFailures&, const CT&);

    Callback_MetricsAdmin_getMetricsFailures(const TPtr& obj, Response cb, Exception excb, Sent sentcb)
        : ::IceInternal::TwowayCallback<T, CT>(obj, cb != 0, excb, sentcb), response(cb)
    {
    }

    virtual void __completed(const ::Ice::AsyncResultPtr& __result) const
    {
        ::IceMX::MetricsAdminPrx __proxy = ::IceMX::MetricsAdminPrx::uncheckedCast(__result->getProxy());
        ::IceMX::MetricsFailures __ret;
        try
        {
            __ret = __proxy->end_getMetricsFailures(__result);
        }
        catch(::Ice::Exception& ex)
        {
            ::IceInternal::Callback<T, CT>::__exception(__result, ex);
            return;
        }
        if(response)
        {
            (::IceInternal::Callback<T, CT>::callback.get()->*response)(__ret, CT::dynamicCast(__result->getCookie()));
        }
    }

    Response response;
};

template<class T, typename CT> Callback_MetricsAdmin_getMetricsFailuresPtr
newCallback_MetricsAdmin_getMetricsFailures(const IceUtil::Handle<T>& instance, void (T::*cb)(const ::IceMX::MetricsFailures&, const CT&), void (T::*excb)(const ::Ice::Exception&, const CT&), void (T::*sentcb)(bool, const CT&) = 0)
{
    return new Callback_MetricsAdmin_getMetricsFailures<T, CT>(instance, cb, excb, sentcb);
}

template<class T, typename CT> Callback_MetricsAdmin_getMetricsFailuresPtr
newCallback_MetricsAdmin_getMetricsFailures(T* instance, void (T::*cb)(const ::IceMX::MetricsFailures&, const CT&), void (T::*excb)(const ::Ice::Exception&, const CT&), void (T::*sentcb)(bool, const CT&) = 0)
{
    return new Callback_MetricsAdmin_getMetricsFailures<T, CT>(instance, cb, excb, sentcb);
}

}

#endif
