1# Copyright (C) 2008-2020 by the Free Software Foundation, Inc.
2#
3# This file is part of GNU Mailman.
4#
5# GNU Mailman is free software: you can redistribute it and/or modify it under
6# the terms of the GNU General Public License as published by the Free
7# Software Foundation, either version 3 of the License, or (at your option)
8# any later version.
9#
10# GNU Mailman is distributed in the hope that it will be useful, but WITHOUT
11# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
13# more details.
14#
15# You should have received a copy of the GNU General Public License along with
16# GNU Mailman.  If not, see <https://www.gnu.org/licenses/>.
17
18"""Interface describing a pipeline handler."""
19
20from public import public
21from zope.interface import Attribute, Interface
22
23
24@public
25class IHandler(Interface):
26    """A basic pipeline handler."""
27
28    name = Attribute('Handler name; must be unique.')
29
30    description = Attribute('A brief description of the handler.')
31
32    def process(mlist, msg, msgdata):
33        """Run the handler.
34
35        :param mlist: The mailing list object.
36        :param msg: The message object.
37        :param msgdata: The message metadata.
38        """
39