def service_class(cls):
    """
    A class decorator enabling the instances of the class to be used
    as a ``services``-provider in `JSONRpc Objects`_
    and `BSONRpc Objects`_.

    Use decorators ``request``, ``notification``, ``rpc_request`` and
    ``rpc_notification`` to expose methods for the RPC peer node.
    """
    cls._request_handlers = {}
    cls._notification_handlers = {}
    for name, method in cls.__dict__.items():
        if hasattr(method, '_request_handler'):
            cls._request_handlers[name] = method
        if hasattr(method, '_notification_handler'):
            cls._notification_handlers[name] = method
    return cls
