# -*- coding: utf-8 -*-
#
# Copyright (c) ZeroC, Inc. All rights reserved.
#
#
# Ice version 3.7.8
#
# <auto-generated>
#
# Generated from file `PluginFacade.ice'
#
# Warning: do not edit this file.
#
# </auto-generated>
#

from sys import version_info as _version_info_
import Ice, IcePy
import Ice.BuiltinSequences_ice
import Ice.Current_ice
import IceGrid.Admin_ice

# Included module Ice
_M_Ice = Ice.openModule('Ice')

# Included module Glacier2
_M_Glacier2 = Ice.openModule('Glacier2')

# Included module IceGrid
_M_IceGrid = Ice.openModule('IceGrid')

# Start of module IceGrid
__name__ = 'IceGrid'

if 'ReplicaGroupFilter' not in _M_IceGrid.__dict__:
    _M_IceGrid.ReplicaGroupFilter = Ice.createTempClass()
    class ReplicaGroupFilter(object):
        """
        The ReplicaGroupFilter is used by IceGrid to filter adapters
        returned to the client when it resolves a filtered replica group.
        IceGrid provides the list of available adapters. The implementation
        of this method can use the provided context and connection to
        filter and return the filtered set of adapters.
        """
        def __init__(self):
            if Ice.getType(self) == _M_IceGrid.ReplicaGroupFilter:
                raise RuntimeError('IceGrid.ReplicaGroupFilter is an abstract class')

        def filter(self, replicaGroupId, adapterIds, con, ctx):
            """
            Filter the the given set of adapters.
            Arguments:
            replicaGroupId -- The replica group ID.
            adapterIds -- The adpater IDs to filter.
            con -- The connection from the Ice client which is resolving the replica group endpoints.
            ctx -- The context from the Ice client which is resolving the replica group endpoints.
            Returns: The filtered adapter IDs.
            """
            raise NotImplementedError("method 'filter' not implemented")

        def __str__(self):
            return IcePy.stringify(self, _M_IceGrid._t_ReplicaGroupFilter)

        __repr__ = __str__

    _M_IceGrid._t_ReplicaGroupFilter = IcePy.defineValue('::IceGrid::ReplicaGroupFilter', ReplicaGroupFilter, -1, (), False, True, None, ())
    ReplicaGroupFilter._ice_type = _M_IceGrid._t_ReplicaGroupFilter

    _M_IceGrid.ReplicaGroupFilter = ReplicaGroupFilter
    del ReplicaGroupFilter

if 'TypeFilter' not in _M_IceGrid.__dict__:
    _M_IceGrid.TypeFilter = Ice.createTempClass()
    class TypeFilter(object):
        """
        The TypeFilter is used by IceGrid to filter well-known proxies
        returned to the client when it searches a well-known object by
        type.
        IceGrid provides the list of available proxies. The implementation
        of this method can use the provided context and connection to
        filter and return the filtered set of proxies.
        """
        def __init__(self):
            if Ice.getType(self) == _M_IceGrid.TypeFilter:
                raise RuntimeError('IceGrid.TypeFilter is an abstract class')

        def filter(self, type, proxies, con, ctx):
            """
            Filter the the given set of proxies.
            Arguments:
            type -- The type.
            proxies -- The proxies to filter.
            con -- The connection from the Ice client which is looking up well-known objects by type.
            ctx -- The context from the Ice client which is looking up well-known objects by type.
            Returns: The filtered proxies.
            """
            raise NotImplementedError("method 'filter' not implemented")

        def __str__(self):
            return IcePy.stringify(self, _M_IceGrid._t_TypeFilter)

        __repr__ = __str__

    _M_IceGrid._t_TypeFilter = IcePy.defineValue('::IceGrid::TypeFilter', TypeFilter, -1, (), False, True, None, ())
    TypeFilter._ice_type = _M_IceGrid._t_TypeFilter

    _M_IceGrid.TypeFilter = TypeFilter
    del TypeFilter

if 'RegistryPluginFacade' not in _M_IceGrid.__dict__:
    _M_IceGrid.RegistryPluginFacade = Ice.createTempClass()
    class RegistryPluginFacade(object):
        """
        The RegistryPluginFacade is implemented by IceGrid and can be used
        by plugins and filter implementations to retrieve information from
        IceGrid about the well-known objects or adapters. It's also used to
        register/unregister replica group and type filters.
        """
        def __init__(self):
            if Ice.getType(self) == _M_IceGrid.RegistryPluginFacade:
                raise RuntimeError('IceGrid.RegistryPluginFacade is an abstract class')

        def getApplicationInfo(self, name):
            """
            Get an application descriptor.
            Arguments:
            name -- The application name.
            Returns: The application descriptor.
            Throws:
            ApplicationNotExistException -- Raised if the application doesn't exist.
            """
            raise NotImplementedError("method 'getApplicationInfo' not implemented")

        def getServerInfo(self, id):
            """
            Get the server information for the server with the given id.
            Arguments:
            id -- The server id.
            Returns: The server information.
            Throws:
            ServerNotExistException -- Raised if the server doesn't exist.
            """
            raise NotImplementedError("method 'getServerInfo' not implemented")

        def getAdapterServer(self, adapterId):
            """
            Get the ID of the server to which the given adapter belongs.
            Arguments:
            adapterId -- The adapter ID.
            Returns: The server ID or the empty string if the given identifier is not associated to an object adapter defined with an application descriptor.
            Throws:
            AdapterNotExistException -- Raised if the adapter doesn't exist.
            """
            raise NotImplementedError("method 'getAdapterServer' not implemented")

        def getAdapterApplication(self, adapterId):
            """
            Get the name of the application to which the given adapter belongs.
            Arguments:
            adapterId -- The adapter ID.
            Returns: The application name or the empty string if the given identifier is not associated to a replica group or object adapter defined with an application descriptor.
            Throws:
            AdapterNotExistException -- Raised if the adapter doesn't exist.
            """
            raise NotImplementedError("method 'getAdapterApplication' not implemented")

        def getAdapterNode(self, adapterId):
            """
            Get the name of the node to which the given adapter belongs.
            Arguments:
            adapterId -- The adapter ID.
            Returns: The node name or the empty string if the given identifier is not associated to an object adapter defined with an application descriptor.
            Throws:
            AdapterNotExistException -- Raised if the adapter doesn't exist.
            """
            raise NotImplementedError("method 'getAdapterNode' not implemented")

        def getAdapterInfo(self, id):
            """
            Get the adapter information for the replica group or adapter
            with the given id.
            Arguments:
            id -- The adapter id.
            Returns: A sequence of adapter information structures. If the given id refers to an adapter, this sequence will contain only one element. If the given id refers to a replica group, the sequence will contain the adapter information of each member of the replica group.
            Throws:
            AdapterNotExistException -- Raised if the adapter or replica group doesn't exist.
            """
            raise NotImplementedError("method 'getAdapterInfo' not implemented")

        def getObjectInfo(self, id):
            """
            Get the object info for the object with the given identity.
            Arguments:
            id -- The identity of the object.
            Returns: The object info.
            Throws:
            ObjectNotRegisteredException -- Raised if the object isn't registered with the registry.
            """
            raise NotImplementedError("method 'getObjectInfo' not implemented")

        def getNodeInfo(self, name):
            """
            Get the node information for the node with the given name.
            Arguments:
            name -- The node name.
            Returns: The node information.
            Throws:
            NodeNotExistException -- Raised if the node doesn't exist.
            NodeUnreachableException -- Raised if the node could not be reached.
            """
            raise NotImplementedError("method 'getNodeInfo' not implemented")

        def getNodeLoad(self, name):
            """
            Get the load averages of the node.
            Arguments:
            name -- The node name.
            Returns: The node load information.
            Throws:
            NodeNotExistException -- Raised if the node doesn't exist.
            NodeUnreachableException -- Raised if the node could not be reached.
            """
            raise NotImplementedError("method 'getNodeLoad' not implemented")

        def getPropertyForAdapter(self, adapterId, name):
            """
            Get the property value for the given property and adapter. The
            property is looked up in the server or service descriptor where
            the adapter is defined.
            Arguments:
            adapterId -- The adapter ID
            name -- The name of the property.
            Returns: The property value.
            Throws:
            AdapterNotExistException -- Raised if the adapter doesn't exist.
            """
            raise NotImplementedError("method 'getPropertyForAdapter' not implemented")

        def addReplicaGroupFilter(self, id, filter):
            """
            Add a replica group filter.
            Arguments:
            id -- The identifier of the filter. This identifier must match the value of the "filter" attribute specified in the replica group descriptor. To filter dynamically registered replica groups, you should use the empty filter id.
            filter -- The filter implementation.
            """
            raise NotImplementedError("method 'addReplicaGroupFilter' not implemented")

        def removeReplicaGroupFilter(self, id, filter):
            """
            Remove a replica group filter.
            Arguments:
            id -- The identifier of the filter.
            filter -- The filter implementation.
            Returns: True of the filter was removed, false otherwise.
            """
            raise NotImplementedError("method 'removeReplicaGroupFilter' not implemented")

        def addTypeFilter(self, type, filter):
            """
            Add a type filter.
            Arguments:
            type -- The type to register this filter with.
            filter -- The filter implementation.
            """
            raise NotImplementedError("method 'addTypeFilter' not implemented")

        def removeTypeFilter(self, type, filter):
            """
            Remove a type filter.
            Arguments:
            type -- The type to register this filter with.
            filter -- The filter implementation.
            Returns: True of the filter was removed, false otherwise.
            """
            raise NotImplementedError("method 'removeTypeFilter' not implemented")

        def __str__(self):
            return IcePy.stringify(self, _M_IceGrid._t_RegistryPluginFacade)

        __repr__ = __str__

    _M_IceGrid._t_RegistryPluginFacade = IcePy.defineValue('::IceGrid::RegistryPluginFacade', RegistryPluginFacade, -1, (), False, True, None, ())
    RegistryPluginFacade._ice_type = _M_IceGrid._t_RegistryPluginFacade

    _M_IceGrid.RegistryPluginFacade = RegistryPluginFacade
    del RegistryPluginFacade

# End of module IceGrid
