Creates and adds the handles needed for serving static files.

        :param handlers:
191729
def _add_static_handlers(self, handlers):
        
        for url, path in self.static_dirs:
            handlers.append((url.rstrip("/") + "/(.*)", StaticFileHandler, {"path": path}))
718789
private void executeHandlers(List<Event> filteredEvents) {
        for (EventHandler current : eventHandlers) {
            for (Event event : filteredEvents) {
                current.handleEvent(event);
            }
        }
    }
556827
def add_handles(self, model, forward_handle, backward_handle):
        
        handles_list = []
        for child in model.children():
            if 'nn.modules.container' in str(type(child)):
                handles_list.extend(self.add_handles(child, forward_handle, backward_handle))
            else:
                handles_list.append(child.register_forward_hook(forward_handle))
                handles_list.append(child.register_backward_hook(backward_handle))
        return handles_list
1062160
def register_handlers(self, handler_classes):
        
        for handler_class in handler_classes:
            self.handlers.append(handler_class(client=self.client))
            logging.info('Successfully registered {handler_class}'.format(
                handler_class=getattr(handler_class, '__name__', str(handler_class)))
            )
1319678
private function addHandlers(array $handlers)
    {
        // We need to reverse the array because Monolog "pushes" handlers to top of the stack
        foreach (array_reverse($handlers) as $handler) {
            $this->logger->pushHandler($handler);
        }
    }
454606
def add_handler(self, handler):
        """"""
        if not callable(handler):
            raise TypeError("'%s' is not callable." % handler)

        self.append(handler)
78288
def putSubHandler(self, prefix, handler):
        '''
        '''
        self.subHandlers[prefix] = handler
        handler._parent = self
        return self
735274
def add_static_path(self, prefix: str, path: str) -> None:
        
        pattern = prefix
        if not pattern.startswith('/'):
            pattern = '/' + pattern
        if not pattern.endswith('/(.*)'):
            pattern = pattern + '/(.*)'
        self.add_handlers(
            r'.*',  # add static path for all virtual host
            [(pattern, StaticFileHandler, dict(path=path))]
        )
830475
public void setExceptionHandlers(Map<Class<? extends Exception>, InternalExceptionHandler> handlers) {
        requireNonNull(handlers);
        this.exceptionHandlers = handlers;
    }
509565
public void addHandler(CacheMissHandler handler) {
		if(handler != null) {
			logger.debug("adding handler of class '{}'", handler.getClass());
			handlers.add(handler);
		}
	}
5779
@Override
    public T addHandlers(ArchiveEventHandler... handlers) {
        for (ArchiveEventHandler handler : handlers) {
            this.getArchive().addHandlers(handler);
        }
        return covarientReturn();
    }
321441
def addHandler(name, basepath=None, baseurl=None, allowDownscale=False):
    """"""
    if basepath is None:
        basepath = '.'
    _handlers.append(_handler_classes[name](basepath, baseurl, allowDownscale))
170922
function Handlers(server) {
  var self = this;
  this.server = server;

  //Store the most recently parsed swagger data for when only the handlers get re-attached.
  this.server.on('parsed', function(err, api, parser, basePath) {
    self.api = api;
    self.parser = parser;
    self.basePath = basePath;
    self.setupHandlers();
  });
}
964821
function mountHandlers() {
  var self = this;

  for (var id in this.handlers) {
    this.handlers[id].forEach(function(handler) {
      self.namespace.on(id, handler);
    });
  }
}
189282
def keyhandles_fixup(args):
    
    new_handles = {}
    for val in args.key_handles:
        n = pyhsm.util.key_handle_to_int(val)
        new_handles[n] = val

    args.key_handles = new_handles
1218777
private void addHandler(Handler handler, ClassLoader loader)
  {
    // handlers ordered by level
    ArrayList<Handler> handlers = new ArrayList<Handler>();

    handlers.add(handler);

    for (ClassLoader ptr = loader; ptr != null; ptr = ptr.getParent()) {
      Handler []localHandlers = _localHandlers.getLevel(ptr);

      if (localHandlers != null) {
        for (int i = 0; i < localHandlers.length; i++) {
          int p = handlers.indexOf(localHandlers[i]);

          if (p < 0) {
            handlers.add(localHandlers[i]);
          }
          else {
            Handler oldHandler = handlers.get(p);

            if (localHandlers[i].getLevel().intValue()
                < oldHandler.getLevel().intValue()) {
              handlers.set(p, localHandlers[i]);
            }
          }
        }
      }
    }

    Handler []newHandlers = new Handler[handlers.size()];
    handlers.toArray(newHandlers);
    
    if (loader == _systemClassLoader)
      loader = null;

    _localHandlers.set(newHandlers, loader);
  }
1132416
def get_handler(self, *args, **options):
        '''
        
        '''
        handler = super().get_handler(*args, **options)
        use_static_handler = options['use_static_handler']
        insecure_serving = options['insecure_serving']
        if use_static_handler and (settings.DEBUG or insecure_serving):
            return CRAStaticFilesHandler(handler)
        return handler