@@ -63,21 +63,33 @@ class RSession:
6363 R Session (server side) class to a DataSHIELD server.
6464 """
6565
66+ def is_started (self ) -> bool :
67+ """
68+ Get whether the session has been started. This call must not wait for the session to
69+ be started, immediate response is expected.
70+
71+ :return: Whether the session has been started
72+ """
73+ raise NotImplementedError ("RSession function not available" )
74+
6675 def is_ready (self ) -> bool :
6776 """
6877 Get whether the session is ready for receiving requests. This call must not
6978 wait for the session to be ready, immediate response is expected.
7079
7180 :return: Whether the session is ready
81+ :throws: DSError if the session was not started or session information is not available
7282 """
7383 raise NotImplementedError ("RSession function not available" )
7484
7585 def is_pending (self ) -> bool :
7686 """
77- Get whether the session is pending, i.e., it is in the process of being started but is not ready yet. This call must not
78- wait for the session to be pending, immediate response is expected.
87+ Get whether the session is pending, i.e., it is in the process of being started but is
88+ not ready yet. This call must not wait for the session to be pending, immediate response
89+ is expected.
7990
8091 :return: Whether the session is pending
92+ :throws: DSError if the session was not started or session information is not available
8193 """
8294 raise NotImplementedError ("RSession function not available" )
8395
@@ -87,14 +99,26 @@ def is_failed(self) -> bool:
8799 wait for the session to have failed, immediate response is expected.
88100
89101 :return: Whether the session has failed
102+ :throws: DSError if the session was not started or session information is not available
103+ """
104+ raise NotImplementedError ("RSession function not available" )
105+
106+ def is_terminated (self ) -> bool :
107+ """
108+ Get whether the session is terminated. This call must not wait for the session to be
109+ terminated, immediate response is expected.
110+
111+ :return: Whether the session is terminated
112+ :throws: DSError if the session was not started or session information is not available
90113 """
91114 raise NotImplementedError ("RSession function not available" )
92115
93- def get_state_message (self ) -> str :
116+ def get_last_message (self ) -> str :
94117 """
95118 Get a message describing the current state of the session, which can be used for debugging or logging purposes.
96119
97120 :return: The session state message
121+ :throws: DSError if the session was not started or session information is not available
98122 """
99123 raise NotImplementedError ("RSession function not available" )
100124
0 commit comments