Event that will be fired after single connection instances was created. :param connection_lock: For sync client thread-lock should be provided, for async asyncio.Lock
| 249 | |
| 250 | |
| 251 | class AfterSingleConnectionInstantiationEvent: |
| 252 | """ |
| 253 | Event that will be fired after single connection instances was created. |
| 254 | |
| 255 | :param connection_lock: For sync client thread-lock should be provided, |
| 256 | for async asyncio.Lock |
| 257 | """ |
| 258 | |
| 259 | def __init__( |
| 260 | self, |
| 261 | connection, |
| 262 | client_type: ClientType, |
| 263 | connection_lock: Union[threading.RLock, asyncio.Lock], |
| 264 | ): |
| 265 | self._connection = connection |
| 266 | self._client_type = client_type |
| 267 | self._connection_lock = connection_lock |
| 268 | |
| 269 | @property |
| 270 | def connection(self): |
| 271 | return self._connection |
| 272 | |
| 273 | @property |
| 274 | def client_type(self) -> ClientType: |
| 275 | return self._client_type |
| 276 | |
| 277 | @property |
| 278 | def connection_lock(self) -> Union[threading.RLock, asyncio.Lock]: |
| 279 | return self._connection_lock |
| 280 | |
| 281 | |
| 282 | class AfterPubSubConnectionInstantiationEvent: |
no outgoing calls
no test coverage detected