Package eoxserver :: Package core :: Module interfaces :: Class Interface
[hide private]
[frames] | no frames]

Class Interface

source code


This is the base class for all interface declarations. Derive from it or one of its subclasses to create your own interface declaration. The :class:`Interface` class has only class variables (the method declarations) and class methods.
Nested Classes [hide private]
  __metaclass__
Instance Methods [hide private]

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __init__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Methods [hide private]
 
implement(InterfaceCls, ImplementationCls)
This method takes an implementing class as input, validates it, and returns the implementation.
source code
 
_getName(InterfaceCls, ImplementationCls) source code
 
_getBases(InterfaceCls, ImplementationCls) source code
 
_getClassDict(InterfaceCls, ImplementationCls, bases) source code
 
_validateImplementation(InterfaceCls, bases) source code
 
_getMethods(InterfaceCls) source code
 
_getBaseMethod(InterfaceCls, method_name, bases) source code
 
_getRuntimeValidationLevel(InterfaceCls, ImplementationCls) source code
Class Variables [hide private]
  __iconf__ = {}
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

implement(InterfaceCls, ImplementationCls)
Class Method

source code 
This method takes an implementing class as input, validates it, and returns the implementation. In the validation step, :meth:`Method.validateImplementation` is called for each method declared in the interface. :exc:`~.InternalError` is raised if a method is not found or if the method signature does not match the declaration. If validation has passed, the implementation is getting prepared. The implementation inherits from the implementing class. The ``__ifclass__`` magic attribute is added to the class dictionary. If runtime validation has been enabled, the methods of the implementing class defined in the interface are replaced by descriptors (instances of :class:`WarningDescriptor` or :class:`FailingDescriptor`). Finally, the implementation class is generated and returned.