233
233
class SmartServerHooks(Hooks):
234
234
"""Hooks for the smart server."""
236
def __init__(self, module_name, member_name):
237
237
"""Create the default hooks.
239
239
These are all empty initially, because by default nothing should get
243
self.create_hook(HookPoint('server_started',
242
Hooks.__init__(self, module_name, member_name)
243
self.add_hook('server_started',
244
244
"Called by the bzr server when it starts serving a directory. "
245
245
"server_started is called with (backing urls, public url), "
246
246
"where backing_url is a list of URLs giving the "
247
247
"server-specific directory locations, and public_url is the "
248
"public URL for the directory being served.", (0, 16), None))
249
self.create_hook(HookPoint('server_started_ex',
248
"public URL for the directory being served.", (0, 16))
249
self.add_hook('server_started_ex',
250
250
"Called by the bzr server when it starts serving a directory. "
251
251
"server_started is called with (backing_urls, server_obj).",
253
self.create_hook(HookPoint('server_stopped',
253
self.add_hook('server_stopped',
254
254
"Called by the bzr server when it stops serving a directory. "
255
255
"server_stopped is called with the same parameters as the "
256
"server_started hook: (backing_urls, public_url).", (0, 16), None))
256
"server_started hook: (backing_urls, public_url).", (0, 16))
258
SmartTCPServer.hooks = SmartServerHooks()
258
SmartTCPServer.hooks = SmartServerHooks("bzrlib.smart.server", "SmartTCPServer.hooks")
261
261
def _local_path_for_transport(transport):