1"""Abstract base class for kernel clients"""
2
3#-----------------------------------------------------------------------------
4#  Copyright (c) The Jupyter Development Team
5#
6#  Distributed under the terms of the BSD License.  The full license is in
7#  the file COPYING, distributed as part of this software.
8#-----------------------------------------------------------------------------
9
10#-----------------------------------------------------------------------------
11# Imports
12#-----------------------------------------------------------------------------
13
14import abc
15
16
17#-----------------------------------------------------------------------------
18# Main kernel client class
19#-----------------------------------------------------------------------------
20
21class KernelClientABC(object, metaclass=abc.ABCMeta):
22    """KernelManager ABC.
23
24    The docstrings for this class can be found in the base implementation:
25
26    `jupyter_client.client.KernelClient`
27    """
28
29    @abc.abstractproperty
30    def kernel(self):
31        pass
32
33    @abc.abstractproperty
34    def shell_channel_class(self):
35        pass
36
37    @abc.abstractproperty
38    def iopub_channel_class(self):
39        pass
40
41    @abc.abstractproperty
42    def hb_channel_class(self):
43        pass
44
45    @abc.abstractproperty
46    def stdin_channel_class(self):
47        pass
48
49    @abc.abstractproperty
50    def control_channel_class(self):
51        pass
52
53    #--------------------------------------------------------------------------
54    # Channel management methods
55    #--------------------------------------------------------------------------
56
57    @abc.abstractmethod
58    def start_channels(self, shell=True, iopub=True, stdin=True, hb=True, control=True):
59        pass
60
61    @abc.abstractmethod
62    def stop_channels(self):
63        pass
64
65    @abc.abstractproperty
66    def channels_running(self):
67        pass
68
69    @abc.abstractproperty
70    def shell_channel(self):
71        pass
72
73    @abc.abstractproperty
74    def iopub_channel(self):
75        pass
76
77    @abc.abstractproperty
78    def stdin_channel(self):
79        pass
80
81    @abc.abstractproperty
82    def hb_channel(self):
83        pass
84
85    @abc.abstractproperty
86    def control_channel(self):
87        pass
88