From ec7610e15234e68651e8b4c489a59995c8299f63 Mon Sep 17 00:00:00 2001 From: Jan Rinze Peterzon <peterzon@astron.nl> Date: Mon, 26 Oct 2015 16:30:33 +0000 Subject: [PATCH] Task #8571: Added extra docstring for class RPC(). --- LCS/Messaging/python/messaging/RPC.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/LCS/Messaging/python/messaging/RPC.py b/LCS/Messaging/python/messaging/RPC.py index ff458a4ed58..fcc7868aac4 100644 --- a/LCS/Messaging/python/messaging/RPC.py +++ b/LCS/Messaging/python/messaging/RPC.py @@ -24,8 +24,19 @@ from lofar.messaging.messagebus import ToBus, FromBus from lofar.messaging.messages import ServiceMessage, ReplyMessage import uuid - class RPC(): + """ + This class provides an easy way to invoke a Remote Rrocedure Call to a + Services on the message bus. + + Note that most methods require that the RPC object is used *inside* a + context. When entering the context, the connection with the broker is + opened, and a session and a sender are created. For each rpc invocation + a new unique reply context is created as to avoid cross talk. + When exiting the context the connection to the broker is closed. + As a side-effect the sender and session are destroyed. + + """ def __init__(self, bus, service, timeout=None, ForwardExceptions=None, Verbose=None): """ Initialize an Remote procedure call using: -- GitLab