Skip to content

Commit 0bd2612

Browse files
committed
interfaces: Add un/subscribeData()
1 parent c37da28 commit 0bd2612

3 files changed

Lines changed: 20 additions & 4 deletions

File tree

src/amqp.coffee

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -190,12 +190,18 @@ class MessageBroker extends Client
190190

191191
else
192192
return callback new Error 'Unsupported binding type: '+binding.type
193-
removeBinding: (binding, callback) ->
194-
# FIXME: implement
193+
194+
removeBinding: (binding, callback) -> # FIXME: implement
195195
return callback null
196-
listBindings: (from, callback) ->
196+
listBindings: (from, callback) -> # FIXME: implement
197197
return callback null, []
198-
198+
199+
# Data subscriptions
200+
subscribeData: (binding, datahandler, callback) -> # TODO: implement
201+
return callback null
202+
unsubscribeData: (binding, datahandler, callback) -> # TODO: implement
203+
return callback null
204+
199205
# Participant registration
200206
subscribeParticipantChange: (handler) ->
201207
deserialize = (message) =>

src/interfaces.coffee

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,12 @@ class MessageBroker extends MessagingSystem
6666
listBindings: (callback) ->
6767
throw new Error 'Not Implemented'
6868

69+
# Subscribing to data on a binding
70+
subscribeData: (binding, datahandler, callback) ->
71+
throw new Error 'Not Implemented'
72+
unsubscribeData: (binding, datahandler, callback) ->
73+
throw new Error 'Not Implemented'
74+
6975
# Participant registration
7076
subscribeParticipantChange: (handler) ->
7177
throw new Error 'Not Implemented'

src/routing.coffee

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,10 @@ class Binder
6868
debug 'Binder.listBindings'
6969
return callback null, []
7070

71+
subscribeData: (binding, datahandler, callback) ->
72+
throw new Error 'Not Implemented'
73+
unsubscribeData: (binding, datahandler, callback) ->
74+
throw new Error 'Not Implemented'
7175

7276
exports.Binder = Binder
7377
exports.binderMixin = (transport) ->

0 commit comments

Comments
 (0)