You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by gs...@apache.org on 2015/01/28 23:05:19 UTC

[2/3] qpid-proton git commit: Change from on_credit to on_sendable

Change from on_credit to on_sendable


Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/1b0e7db1
Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/1b0e7db1
Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/1b0e7db1

Branch: refs/heads/master
Commit: 1b0e7db15dad71cc78e9bcbe6c86ded9e1261267
Parents: 8c65417
Author: Gordon Sim <gs...@redhat.com>
Authored: Tue Jan 27 15:32:59 2015 +0000
Committer: Gordon Sim <gs...@redhat.com>
Committed: Wed Jan 28 21:53:47 2015 +0000

----------------------------------------------------------------------
 examples/engine/py/client_http.py               | 2 +-
 examples/engine/py/common.py                    | 0
 examples/engine/py/db_common.py                 | 0
 examples/engine/py/db_send.py                   | 2 +-
 examples/engine/py/helloworld.py                | 2 +-
 examples/engine/py/helloworld_direct.py         | 2 +-
 examples/engine/py/helloworld_direct_tornado.py | 2 +-
 examples/engine/py/helloworld_tornado.py        | 2 +-
 examples/engine/py/proton_server.py             | 0
 examples/engine/py/proton_tornado.py            | 0
 examples/engine/py/simple_send.py               | 2 +-
 examples/engine/py/tx_send.py                   | 2 +-
 proton-c/bindings/python/proton/handlers.py     | 6 +++---
 13 files changed, 11 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/1b0e7db1/examples/engine/py/client_http.py
----------------------------------------------------------------------
diff --git a/examples/engine/py/client_http.py b/examples/engine/py/client_http.py
index 5202f8d..6aa438d 100755
--- a/examples/engine/py/client_http.py
+++ b/examples/engine/py/client_http.py
@@ -45,7 +45,7 @@ class Client(MessagingHandler):
             self.reply_address = event.link.remote_source.address
             self.do_request()
 
-    def on_credit(self, event):
+    def on_sendable(self, event):
         self.do_request()
 
     def on_message(self, event):

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/1b0e7db1/examples/engine/py/common.py
----------------------------------------------------------------------
diff --git a/examples/engine/py/common.py b/examples/engine/py/common.py
old mode 100644
new mode 100755

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/1b0e7db1/examples/engine/py/db_common.py
----------------------------------------------------------------------
diff --git a/examples/engine/py/db_common.py b/examples/engine/py/db_common.py
old mode 100644
new mode 100755

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/1b0e7db1/examples/engine/py/db_send.py
----------------------------------------------------------------------
diff --git a/examples/engine/py/db_send.py b/examples/engine/py/db_send.py
index b298c11..d3b321a 100755
--- a/examples/engine/py/db_send.py
+++ b/examples/engine/py/db_send.py
@@ -60,7 +60,7 @@ class Send(MessagingHandler):
             self.load_count += 1
             self.db.load(self.records, event=ApplicationEvent("records_loaded", link=self.sender, subject=self.load_count))
 
-    def on_credit(self, event):
+    def on_sendable(self, event):
         self.send()
 
     def send(self):

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/1b0e7db1/examples/engine/py/helloworld.py
----------------------------------------------------------------------
diff --git a/examples/engine/py/helloworld.py b/examples/engine/py/helloworld.py
index 92d6083..71f2c32 100755
--- a/examples/engine/py/helloworld.py
+++ b/examples/engine/py/helloworld.py
@@ -33,7 +33,7 @@ class HelloWorld(MessagingHandler):
         event.container.create_receiver(conn, self.address)
         event.container.create_sender(conn, self.address)
 
-    def on_credit(self, event):
+    def on_sendable(self, event):
         event.sender.send_msg(Message(body=u"Hello World!"))
         event.sender.close()
 

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/1b0e7db1/examples/engine/py/helloworld_direct.py
----------------------------------------------------------------------
diff --git a/examples/engine/py/helloworld_direct.py b/examples/engine/py/helloworld_direct.py
index c961fe5..1d6e475 100755
--- a/examples/engine/py/helloworld_direct.py
+++ b/examples/engine/py/helloworld_direct.py
@@ -31,7 +31,7 @@ class HelloWorld(MessagingHandler):
         self.acceptor = event.container.listen(self.url)
         event.container.create_sender(self.url)
 
-    def on_credit(self, event):
+    def on_sendable(self, event):
         event.sender.send_msg(Message(body=u"Hello World!"))
         event.sender.close()
 

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/1b0e7db1/examples/engine/py/helloworld_direct_tornado.py
----------------------------------------------------------------------
diff --git a/examples/engine/py/helloworld_direct_tornado.py b/examples/engine/py/helloworld_direct_tornado.py
index 8873357..c3bcd80 100755
--- a/examples/engine/py/helloworld_direct_tornado.py
+++ b/examples/engine/py/helloworld_direct_tornado.py
@@ -34,7 +34,7 @@ class HelloWorld(MessagingHandler):
         conn = event.container.connect(self.server)
         event.container.create_sender(conn, self.address)
 
-    def on_credit(self, event):
+    def on_sendable(self, event):
         event.sender.send_msg(Message(body=u"Hello World!"))
         event.sender.close()
 

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/1b0e7db1/examples/engine/py/helloworld_tornado.py
----------------------------------------------------------------------
diff --git a/examples/engine/py/helloworld_tornado.py b/examples/engine/py/helloworld_tornado.py
index f7d4c26..d0523e8 100755
--- a/examples/engine/py/helloworld_tornado.py
+++ b/examples/engine/py/helloworld_tornado.py
@@ -34,7 +34,7 @@ class HelloWorld(MessagingHandler):
         event.container.create_receiver(conn, self.address)
         event.container.create_sender(conn, self.address)
 
-    def on_credit(self, event):
+    def on_sendable(self, event):
         event.sender.send_msg(Message(body=u"Hello World!"))
         event.sender.close()
 

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/1b0e7db1/examples/engine/py/proton_server.py
----------------------------------------------------------------------
diff --git a/examples/engine/py/proton_server.py b/examples/engine/py/proton_server.py
old mode 100644
new mode 100755

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/1b0e7db1/examples/engine/py/proton_tornado.py
----------------------------------------------------------------------
diff --git a/examples/engine/py/proton_tornado.py b/examples/engine/py/proton_tornado.py
old mode 100644
new mode 100755

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/1b0e7db1/examples/engine/py/simple_send.py
----------------------------------------------------------------------
diff --git a/examples/engine/py/simple_send.py b/examples/engine/py/simple_send.py
index 7f92163..9ce9c58 100755
--- a/examples/engine/py/simple_send.py
+++ b/examples/engine/py/simple_send.py
@@ -34,7 +34,7 @@ class Send(MessagingHandler):
     def on_start(self, event):
         event.container.create_sender(self.url)
 
-    def on_credit(self, event):
+    def on_sendable(self, event):
         while event.sender.credit and self.sent < self.total:
             msg = Message(body={'sequence':(self.sent+1)})
             event.sender.send_msg(msg)

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/1b0e7db1/examples/engine/py/tx_send.py
----------------------------------------------------------------------
diff --git a/examples/engine/py/tx_send.py b/examples/engine/py/tx_send.py
index d234da3..46242ee 100755
--- a/examples/engine/py/tx_send.py
+++ b/examples/engine/py/tx_send.py
@@ -44,7 +44,7 @@ class TxSend(MessagingHandler, TransactionHandler):
         self.transaction = event.transaction
         self.send()
 
-    def on_credit(self, event):
+    def on_sendable(self, event):
         self.send()
 
     def send(self):

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/1b0e7db1/proton-c/bindings/python/proton/handlers.py
----------------------------------------------------------------------
diff --git a/proton-c/bindings/python/proton/handlers.py b/proton-c/bindings/python/proton/handlers.py
index 188f194..18e1969 100644
--- a/proton-c/bindings/python/proton/handlers.py
+++ b/proton-c/bindings/python/proton/handlers.py
@@ -86,7 +86,7 @@ class OutgoingMessageHandler(Handler):
 
     def on_link_flow(self, event):
         if event.link.is_sender and event.link.credit:
-            self.on_credit(event)
+            self.on_sendable(event)
 
     def on_delivery(self, event):
         dlv = event.delivery
@@ -104,9 +104,9 @@ class OutgoingMessageHandler(Handler):
             if self.auto_settle:
                 dlv.settle()
 
-    def on_credit(self, event):
+    def on_sendable(self, event):
         if self.delegate:
-            dispatch(self.delegate, 'on_credit', event)
+            dispatch(self.delegate, 'on_sendable', event)
 
     def on_accepted(self, event):
         if self.delegate:


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org