qpid_proton 0.0.1 → 0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -21,8 +21,20 @@ module Qpid
21
21
 
22
22
  module Proton
23
23
 
24
- NAME = "qpid_proton"
25
- VERSION = "0.0.1"
24
+ # A +Subscription+ is an opaque object for working with a +Messenger+'s
25
+ # subscriptions.
26
+ #
27
+ class Subscription
28
+
29
+ def initialize(impl) # :nodoc:
30
+ @impl = impl
31
+ end
32
+
33
+ def impl # :nodoc:
34
+ @impl
35
+ end
36
+
37
+ end
26
38
 
27
39
  end
28
40
 
@@ -0,0 +1,46 @@
1
+ #
2
+ # Licensed to the Apache Software Foundation (ASF) under one
3
+ # or more contributor license agreements. See the NOTICE file
4
+ # distributed with this work for additional information
5
+ # regarding copyright ownership. The ASF licenses this file
6
+ # to you under the Apache License, Version 2.0 (the
7
+ # "License"); you may not use this file except in compliance
8
+ # with the License. You may obtain a copy of the License at
9
+ #
10
+ # http://www.apache.org/licenses/LICENSE-2.0
11
+ #
12
+ # Unless required by applicable law or agreed to in writing,
13
+ # software distributed under the License is distributed on an
14
+ # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15
+ # KIND, either express or implied. See the License for the
16
+ # specific language governing permissions and limitations
17
+ # under the License.
18
+ #
19
+
20
+ module Qpid
21
+
22
+ module Proton
23
+
24
+ # A +Tracker+ is used to track the disposition of a +Message+.
25
+ #
26
+ class Tracker
27
+
28
+ CUMULATIVE = Cproton::PN_CUMULATIVE
29
+
30
+ def initialize(impl) # :nodoc:
31
+ @impl = impl
32
+ end
33
+
34
+ def impl # :nodoc:
35
+ @impl
36
+ end
37
+
38
+ def self.valid_flag?(flag) # :nodoc:
39
+ [0, CUMULATIVE].include?(flag)
40
+ end
41
+
42
+ end
43
+
44
+ end
45
+
46
+ end
@@ -0,0 +1,72 @@
1
+ #
2
+ # Licensed to the Apache Software Foundation (ASF) under one
3
+ # or more contributor license agreements. See the NOTICE file
4
+ # distributed with this work for additional information
5
+ # regarding copyright ownership. The ASF licenses this file
6
+ # to you under the Apache License, Version 2.0 (the
7
+ # "License"); you may not use this file except in compliance
8
+ # with the License. You may obtain a copy of the License at
9
+ #
10
+ # http://www.apache.org/licenses/LICENSE-2.0
11
+ #
12
+ # Unless required by applicable law or agreed to in writing,
13
+ # software distributed under the License is distributed on an
14
+ # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15
+ # KIND, either express or implied. See the License for the
16
+ # specific language governing permissions and limitations
17
+ # under the License.
18
+ #
19
+
20
+ module Qpid
21
+
22
+ module Proton
23
+
24
+ # TrackerStatus contains symbols that represent the status value for a
25
+ # Tracker.
26
+ #
27
+ class TrackerStatus
28
+
29
+ def initialize value, name # :nodoc:
30
+ @value = value
31
+ @name = name
32
+ end
33
+
34
+ def value # :nodoc:
35
+ @value
36
+ end
37
+
38
+ def to_s # :nodoc:
39
+ @name.to_s
40
+ end
41
+
42
+ def self.by_name(name) # :nodoc:
43
+ @by_name[name.to_sym] unless name.nil?
44
+ end
45
+
46
+ def self.by_value(value) # :nodoc:
47
+ @by_value[value] unless value.nil?
48
+ end
49
+
50
+ private
51
+
52
+ def self.add_item(key, value) # :nodoc:
53
+ @by_name ||= {}
54
+ @by_name[key] = TrackerStatus.new value, key
55
+ @by_value ||= {}
56
+ @by_value[value] = @by_name[key]
57
+ end
58
+
59
+ def self.const_missing(key) # :nodoc:
60
+ @by_name[key]
61
+ end
62
+
63
+ self.add_item :UNKNOWN, Cproton::PN_STATUS_UNKNOWN
64
+ self.add_item :PENDING, Cproton::PN_STATUS_PENDING
65
+ self.add_item :ACCEPTED, Cproton::PN_STATUS_ACCEPTED
66
+ self.add_item :REJECTED, Cproton::PN_STATUS_REJECTED
67
+
68
+ end
69
+
70
+ end
71
+
72
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: qpid_proton
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: '0.3'
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-08-14 00:00:00.000000000 Z
12
+ date: 2013-02-01 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: ! 'Proton is a high performance, lightweight messaging library. It can
15
15
  be used in
@@ -21,19 +21,29 @@ description: ! 'Proton is a high performance, lightweight messaging library. It
21
21
  standard.
22
22
 
23
23
  '
24
- email: dpierce@redhat.com
24
+ email:
25
+ - proton@qpid.apache.org
25
26
  executables: []
26
27
  extensions:
27
28
  - ext/cproton/extconf.rb
28
29
  extra_rdoc_files: []
29
30
  files:
31
+ - LICENSE
32
+ - TODO
33
+ - ChangeLog
30
34
  - ext/cproton/extconf.rb
31
35
  - ext/cproton/cproton.c
32
36
  - lib/qpid_proton.rb
33
- - lib/qpid_proton/version.rb
37
+ - lib/qpid_proton/subscription.rb
38
+ - lib/qpid_proton/messenger.rb
39
+ - lib/qpid_proton/tracker.rb
40
+ - lib/qpid_proton/exception_handling.rb
41
+ - lib/qpid_proton/message_format.rb
42
+ - lib/qpid_proton/message.rb
43
+ - lib/qpid_proton/exceptions.rb
44
+ - lib/qpid_proton/tracker_status.rb
34
45
  homepage: http://qpid.apache.org/proton
35
- licenses:
36
- - ASL
46
+ licenses: []
37
47
  post_install_message:
38
48
  rdoc_options: []
39
49
  require_paths:
@@ -50,9 +60,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
50
60
  - - ! '>='
51
61
  - !ruby/object:Gem::Version
52
62
  version: '0'
53
- requirements:
54
- - none
55
- rubyforge_project: qpid_proton
63
+ requirements: []
64
+ rubyforge_project:
56
65
  rubygems_version: 1.8.24
57
66
  signing_key:
58
67
  specification_version: 3