Exemple #1
0
 def __init__(self, executor = None, document = None, children = None, configs = None, stage = None, bindObject = None):
     """Create a new Endpoint
     """
     self._executor = CallableObject.create(executor) if executor else None
     self._document = document
     self._bindObject = bindObject
     # The execution stage
     self._stage = stage or self.__initstage__()
     # The children and configs
     self._children = children or {}
     self._configs = configs or {}
Exemple #2
0
 def __init__(self, method, weight = None):
     """Create a new Handler
     """
     self.callableObject = CallableObject.create(method)
     self.weight = weight
Exemple #3
0
 def executor(self, method):
     """Set the executor of this endpoint
     """
     if not method:
         raise ValueError('Invalid method')
     self._executor = CallableObject.create(method)