qpid_messaging 0.26.1 → 0.30.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 66a95ea1f1b0a4de8f56ca71ee5c9128054e22d1
4
- data.tar.gz: 5295d2b8e6aa4bb771f8740998313231b5b0623d
3
+ metadata.gz: 14a54951e817102eeb8c5fb8315071a7754506eb
4
+ data.tar.gz: 91b49da2eb9eec0574c6a85a1a549e4055797d80
5
5
  SHA512:
6
- metadata.gz: 04a517ad6b5d872bd542b9467c155b7e85350ddb2b1d3b5cbc6b050d3125a43fe0903b26de86173cf68a716287e1f96b5e61c5347553cff214f2269ec95e69e1
7
- data.tar.gz: 3ba31ebf0bf615c34d88f36a3a48dd36ef6a52617ffd2ed677d91fc0ad072c3e0731d5527b48187f88c2983d96ebb1256273aeb17520c35c1d67de4a5ee7c8a5
6
+ metadata.gz: b439f5054d7fa6096e39c4ad9df66af89598c879487dbf1224a0524f09525d9322e8ac41c71bc5fde3c232e7f65f32efa3713d6ef5785c72dac9ccbebb3c6798
7
+ data.tar.gz: 97115daa78898c87627122ce05730de7f1ee4efa52a37f10c6441b7b5dab4193fb990340f171ef0f84e89a3ee11869f19a8ebfa6562a366ae4cd42d7a40ce56d
data/examples/client.rb CHANGED
@@ -40,7 +40,7 @@ if __FILE__ == $0
40
40
  request.reply_to = response_queue
41
41
  sender.send request
42
42
  response = receiver.fetch
43
- puts "#{request.content} -> #{response.content}"
43
+ puts "#{request.content_object} -> #{response.content_object}"
44
44
  end
45
45
 
46
46
  connection.close
data/examples/drain.rb CHANGED
@@ -93,11 +93,11 @@ begin
93
93
  message = receiver.fetch(options[:timeout])
94
94
  print "Message(properties="
95
95
  render_map message.properties
96
- print ", content="
97
- if message.content_type == "amqp/map"
98
- print "'#{render_map message.content}')"
96
+ print ", content_object="
97
+ if message.content_object == "amqp/map"
98
+ print "'#{render_map message.content_object}')"
99
99
  else
100
- print "'#{message.content}'"
100
+ print "'#{message.content_object}'"
101
101
  end
102
102
  print ")\n"
103
103
  session.acknowledge message
@@ -41,7 +41,7 @@ if __FILE__ == $0
41
41
 
42
42
  # Now receive the message
43
43
  message = receiver.fetch Qpid::Messaging::Duration::SECOND
44
- puts "#{message.content}"
44
+ puts "#{message.content_object}"
45
45
  session.acknowledge
46
46
 
47
47
  connection.close
@@ -44,7 +44,7 @@ begin
44
44
  receiver = session.create_receiver address
45
45
 
46
46
  message = receiver.fetch
47
- content = message.content
47
+ content = message.content_object
48
48
 
49
49
  print "content-type:#{message.content_type}"
50
50
  print "{"
@@ -23,7 +23,7 @@ require 'qpid_messaging'
23
23
 
24
24
  broker = ARGV[0] || "amqp:tcp:127.0.0.1:5672"
25
25
  address = ARGV[1] || "message_queue; {create: always}"
26
- options = ARGV[2] || []
26
+ options = ARGV[2] || {}
27
27
 
28
28
  connection = Qpid::Messaging::Connection.new :url => broker, :options => options
29
29
  connection.open
@@ -34,18 +34,19 @@ begin
34
34
  message = Qpid::Messaging::Message.new
35
35
 
36
36
  content = {
37
- :id => 987654321,
37
+ "id" => 987654321,
38
38
  :name => "Widget",
39
39
  :percent => 0.99,
40
40
  :colors => ["red", "green", "blue"]
41
41
  }
42
42
 
43
- message.content = content
43
+ message.content_object = content
44
44
 
45
45
  sender.send message
46
46
 
47
47
  rescue Exception => error
48
48
  puts "Exception: #{error.message}"
49
+ puts error.backtrace
49
50
  end
50
51
 
51
52
  connection.close
data/examples/server.rb CHANGED
@@ -36,12 +36,12 @@ if __FILE__ == $0
36
36
 
37
37
  if !address.nil?
38
38
  sender = session.create_sender address
39
- response = Qpid::Messaging::Message.new :content => request.content.upcase
39
+ response = Qpid::Messaging::Message.new :content => request.content_object.upcase
40
40
  sender.send response
41
- puts "Processed request: #{request.content} -> #{response.content}"
41
+ puts "Processed request: #{request.content_object} -> #{response.content_object}"
42
42
  session.acknowledge
43
43
  else
44
- puts "Error: no reply address specified for request: #{request.content}"
44
+ puts "Error: no reply address specified for request: #{request.content_object}"
45
45
  session.reject request
46
46
  end
47
47
  end
data/examples/spout.rb CHANGED
@@ -109,9 +109,9 @@ options[:address] = ARGV[0] unless ARGV[0].nil?
109
109
 
110
110
  # process the connection options
111
111
  unless options[:connection_options].nil?
112
- fields = options[:connection_options].gsub(/^{(.*)}$/, '\1')
112
+ fields = options[:connection_options].gsub(/^\{(.*)\}$/, '\1')
113
113
  # remove any surrounding braces
114
- if /{.*}/ =~ fields
114
+ if /\{.*\}/ =~ fields
115
115
  fields = fields[1..-2]
116
116
  end
117
117
  # break up the options separated by commas
@@ -137,12 +137,12 @@ options[:properties].each_key {|key| message[key] = options[:properties][key]}
137
137
 
138
138
  (1..options[:count]).each do |count|
139
139
  if !options[:mapped].keys.empty?
140
- message.content = options[:mapped]
140
+ message.content_object = options[:mapped]
141
141
  elsif options[:content]
142
- message.content = options[:content]
142
+ message.content_object = options[:content]
143
143
  end
144
144
  message.durable = options[:durable]
145
- message.content = options[:content] unless options[:content].nil?
145
+ message.content_object = options[:content] unless options[:content].nil?
146
146
  message.properties["spout-id"] = "#{count}"
147
147
  message.reply_to = options[:replyto] unless options[:replyto].nil? || options[:replyto].empty?
148
148
  sender.send message
data/ext/cqpid/cqpid.cpp CHANGED
@@ -1803,22 +1803,25 @@ int SWIG_Ruby_arity( VALUE proc, int minimal )
1803
1803
  /* -------- TYPES TABLE (BEGIN) -------- */
1804
1804
 
1805
1805
  #define SWIGTYPE_p_char swig_types[0]
1806
- #define SWIGTYPE_p_qpid__messaging__Address swig_types[1]
1807
- #define SWIGTYPE_p_qpid__messaging__Connection swig_types[2]
1808
- #define SWIGTYPE_p_qpid__messaging__ConnectionImpl swig_types[3]
1809
- #define SWIGTYPE_p_qpid__messaging__Duration swig_types[4]
1810
- #define SWIGTYPE_p_qpid__messaging__EncodingException swig_types[5]
1811
- #define SWIGTYPE_p_qpid__messaging__FailoverUpdates swig_types[6]
1812
- #define SWIGTYPE_p_qpid__messaging__Message swig_types[7]
1813
- #define SWIGTYPE_p_qpid__messaging__Receiver swig_types[8]
1814
- #define SWIGTYPE_p_qpid__messaging__ReceiverImpl swig_types[9]
1815
- #define SWIGTYPE_p_qpid__messaging__Sender swig_types[10]
1816
- #define SWIGTYPE_p_qpid__messaging__SenderImpl swig_types[11]
1817
- #define SWIGTYPE_p_qpid__messaging__Session swig_types[12]
1818
- #define SWIGTYPE_p_qpid__messaging__SessionImpl swig_types[13]
1819
- #define SWIGTYPE_p_uint8_t swig_types[14]
1820
- static swig_type_info *swig_types[16];
1821
- static swig_module_info swig_module = {swig_types, 15, 0, 0, 0, 0};
1806
+ #define SWIGTYPE_p_p_char swig_types[1]
1807
+ #define SWIGTYPE_p_qpid__messaging__Address swig_types[2]
1808
+ #define SWIGTYPE_p_qpid__messaging__Connection swig_types[3]
1809
+ #define SWIGTYPE_p_qpid__messaging__ConnectionImpl swig_types[4]
1810
+ #define SWIGTYPE_p_qpid__messaging__Duration swig_types[5]
1811
+ #define SWIGTYPE_p_qpid__messaging__EncodingException swig_types[6]
1812
+ #define SWIGTYPE_p_qpid__messaging__FailoverUpdates swig_types[7]
1813
+ #define SWIGTYPE_p_qpid__messaging__Logger swig_types[8]
1814
+ #define SWIGTYPE_p_qpid__messaging__LoggerOutput swig_types[9]
1815
+ #define SWIGTYPE_p_qpid__messaging__Message swig_types[10]
1816
+ #define SWIGTYPE_p_qpid__messaging__Receiver swig_types[11]
1817
+ #define SWIGTYPE_p_qpid__messaging__ReceiverImpl swig_types[12]
1818
+ #define SWIGTYPE_p_qpid__messaging__Sender swig_types[13]
1819
+ #define SWIGTYPE_p_qpid__messaging__SenderImpl swig_types[14]
1820
+ #define SWIGTYPE_p_qpid__messaging__Session swig_types[15]
1821
+ #define SWIGTYPE_p_qpid__messaging__SessionImpl swig_types[16]
1822
+ #define SWIGTYPE_p_uint8_t swig_types[17]
1823
+ static swig_type_info *swig_types[19];
1824
+ static swig_module_info swig_module = {swig_types, 18, 0, 0, 0, 0};
1822
1825
  #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
1823
1826
  #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
1824
1827
 
@@ -1863,6 +1866,7 @@ struct mystr
1863
1866
  #include <qpid/messaging/Message.h>
1864
1867
  #include <qpid/messaging/Duration.h>
1865
1868
  #include <qpid/messaging/FailoverUpdates.h>
1869
+ #include <qpid/messaging/Logger.h>
1866
1870
 
1867
1871
  //
1868
1872
  // Wrapper functions for map-decode and list-decode. This allows us to avoid
@@ -2143,6 +2147,13 @@ SWIGINTERN mystr qpid_messaging_Message_getContentPtr(qpid::messaging::Message *
2143
2147
  return s;
2144
2148
  }
2145
2149
 
2150
+ SWIGINTERNINLINE VALUE
2151
+ SWIG_From_int (int value)
2152
+ {
2153
+ return SWIG_From_long (value);
2154
+ }
2155
+
2156
+
2146
2157
 
2147
2158
 
2148
2159
 
@@ -22518,6 +22529,870 @@ free_qpid_messaging_FailoverUpdates(qpid::messaging::FailoverUpdates *arg1) {
22518
22529
  delete arg1;
22519
22530
  }
22520
22531
 
22532
+ static swig_class SwigClassLoggerOutput;
22533
+
22534
+ SWIGINTERN void
22535
+ free_qpid_messaging_LoggerOutput(qpid::messaging::LoggerOutput *arg1) {
22536
+ delete arg1;
22537
+ }
22538
+
22539
+ SWIGINTERN VALUE
22540
+ _wrap_LoggerOutput_log(int argc, VALUE *argv, VALUE self) {
22541
+ qpid::messaging::LoggerOutput *arg1 = (qpid::messaging::LoggerOutput *) 0 ;
22542
+ qpid::messaging::Level arg2 ;
22543
+ bool arg3 ;
22544
+ char *arg4 = (char *) 0 ;
22545
+ int arg5 ;
22546
+ char *arg6 = (char *) 0 ;
22547
+ std::string *arg7 = 0 ;
22548
+ void *argp1 = 0 ;
22549
+ int res1 = 0 ;
22550
+ int val2 ;
22551
+ int ecode2 = 0 ;
22552
+ bool val3 ;
22553
+ int ecode3 = 0 ;
22554
+ int res4 ;
22555
+ char *buf4 = 0 ;
22556
+ int alloc4 = 0 ;
22557
+ int val5 ;
22558
+ int ecode5 = 0 ;
22559
+ int res6 ;
22560
+ char *buf6 = 0 ;
22561
+ int alloc6 = 0 ;
22562
+ int res7 = SWIG_OLDOBJ ;
22563
+
22564
+ if ((argc < 6) || (argc > 6)) {
22565
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 6)",argc); SWIG_fail;
22566
+ }
22567
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_qpid__messaging__LoggerOutput, 0 | 0 );
22568
+ if (!SWIG_IsOK(res1)) {
22569
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "qpid::messaging::LoggerOutput *","log", 1, self ));
22570
+ }
22571
+ arg1 = reinterpret_cast< qpid::messaging::LoggerOutput * >(argp1);
22572
+ ecode2 = SWIG_AsVal_int(argv[0], &val2);
22573
+ if (!SWIG_IsOK(ecode2)) {
22574
+ SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "qpid::messaging::Level","log", 2, argv[0] ));
22575
+ }
22576
+ arg2 = static_cast< qpid::messaging::Level >(val2);
22577
+ ecode3 = SWIG_AsVal_bool(argv[1], &val3);
22578
+ if (!SWIG_IsOK(ecode3)) {
22579
+ SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "bool","log", 3, argv[1] ));
22580
+ }
22581
+ arg3 = static_cast< bool >(val3);
22582
+ res4 = SWIG_AsCharPtrAndSize(argv[2], &buf4, NULL, &alloc4);
22583
+ if (!SWIG_IsOK(res4)) {
22584
+ SWIG_exception_fail(SWIG_ArgError(res4), Ruby_Format_TypeError( "", "char const *","log", 4, argv[2] ));
22585
+ }
22586
+ arg4 = reinterpret_cast< char * >(buf4);
22587
+ ecode5 = SWIG_AsVal_int(argv[3], &val5);
22588
+ if (!SWIG_IsOK(ecode5)) {
22589
+ SWIG_exception_fail(SWIG_ArgError(ecode5), Ruby_Format_TypeError( "", "int","log", 5, argv[3] ));
22590
+ }
22591
+ arg5 = static_cast< int >(val5);
22592
+ res6 = SWIG_AsCharPtrAndSize(argv[4], &buf6, NULL, &alloc6);
22593
+ if (!SWIG_IsOK(res6)) {
22594
+ SWIG_exception_fail(SWIG_ArgError(res6), Ruby_Format_TypeError( "", "char const *","log", 6, argv[4] ));
22595
+ }
22596
+ arg6 = reinterpret_cast< char * >(buf6);
22597
+ {
22598
+ std::string *ptr = (std::string *)0;
22599
+ res7 = SWIG_AsPtr_std_string(argv[5], &ptr);
22600
+ if (!SWIG_IsOK(res7)) {
22601
+ SWIG_exception_fail(SWIG_ArgError(res7), Ruby_Format_TypeError( "", "std::string const &","log", 7, argv[5] ));
22602
+ }
22603
+ if (!ptr) {
22604
+ SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","log", 7, argv[5]));
22605
+ }
22606
+ arg7 = ptr;
22607
+ }
22608
+ {
22609
+ static VALUE eMessagingError = rb_define_class("MessagingError",
22610
+ rb_eStandardError);
22611
+
22612
+ try {
22613
+ (arg1)->log(arg2,arg3,(char const *)arg4,arg5,(char const *)arg6,(std::string const &)*arg7);
22614
+ }
22615
+ catch(qpid::messaging::ConnectionError& error) {
22616
+ static VALUE merror = rb_define_class("ConnectionError", eMessagingError);
22617
+ rb_raise(merror, "%s", error.what());
22618
+ }
22619
+ catch(qpid::messaging::TransportFailure& error) {
22620
+ static VALUE merror = rb_define_class("TransportFailure", eMessagingError);
22621
+ rb_raise(merror, "%s", error.what());
22622
+ }
22623
+ catch(qpid::messaging::TransactionAborted& error) {
22624
+ static VALUE merror = rb_define_class("TransactionAborted", eMessagingError);
22625
+ rb_raise(merror, "%s", error.what());
22626
+ }
22627
+ catch(qpid::messaging::TransactionError& error) {
22628
+ static VALUE merror = rb_define_class("TransactionError", eMessagingError);
22629
+ rb_raise(merror, "%s", error.what());
22630
+ }
22631
+ catch(qpid::messaging::UnauthorizedAccess& error) {
22632
+ static VALUE merror = rb_define_class("UnauthorizedAccess", eMessagingError);
22633
+ rb_raise(merror, "%s", error.what());
22634
+ }
22635
+ catch(qpid::messaging::SessionError& error) {
22636
+ static VALUE merror = rb_define_class("SessionError", eMessagingError);
22637
+ rb_raise(merror, "%s", error.what());
22638
+ }
22639
+ catch(qpid::messaging::TargetCapacityExceeded& error) {
22640
+ static VALUE merror = rb_define_class("TargetCapacityExceeded", eMessagingError);
22641
+ rb_raise(merror, "%s", error.what());
22642
+ }
22643
+ catch(qpid::messaging::SendError& error) {
22644
+ static VALUE merror = rb_define_class("SendError", eMessagingError);
22645
+ rb_raise(merror, "%s", error.what());
22646
+ }
22647
+ catch(qpid::messaging::SenderError& error) {
22648
+ static VALUE merror = rb_define_class("SenderError", eMessagingError);
22649
+ rb_raise(merror, "%s", error.what());
22650
+ }
22651
+ catch(qpid::messaging::NoMessageAvailable& error) {
22652
+ static VALUE merror = rb_define_class("NoMessageAvailable", eMessagingError);
22653
+ rb_raise(merror, "%s", error.what());
22654
+ }
22655
+ catch(qpid::messaging::FetchError& error) {
22656
+ static VALUE merror = rb_define_class("FetchError", eMessagingError);
22657
+ rb_raise(merror, "%s", error.what());
22658
+ }
22659
+ catch(qpid::messaging::ReceiverError& error) {
22660
+ static VALUE merror = rb_define_class("ReceiverError", eMessagingError);
22661
+ rb_raise(merror, "%s", error.what());
22662
+ }
22663
+ catch(qpid::messaging::InvalidOptionString& error) {
22664
+ static VALUE merror = rb_define_class("InvalidOptionString", eMessagingError);
22665
+ rb_raise(merror, "%s", error.what());
22666
+ }
22667
+ catch(qpid::messaging::KeyError& error) {
22668
+ static VALUE merror = rb_define_class("KeyError", eMessagingError);
22669
+ rb_raise(merror, "%s", error.what());
22670
+ }
22671
+ catch(qpid::messaging::AssertionFailed& error) {
22672
+ static VALUE merror = rb_define_class("AssertionFailed", eMessagingError);
22673
+ rb_raise(merror, "%s", error.what());
22674
+ }
22675
+ catch(qpid::messaging::NotFound& error) {
22676
+ static VALUE merror = rb_define_class("NotFound", eMessagingError);
22677
+ rb_raise(merror, "%s", error.what());
22678
+ }
22679
+ catch(qpid::messaging::ResolutionError& error) {
22680
+ static VALUE merror = rb_define_class("ResolutionError", eMessagingError);
22681
+ rb_raise(merror, "%s", error.what());
22682
+ }
22683
+ catch(qpid::messaging::MalformedAddress& error) {
22684
+ static VALUE merror = rb_define_class("MalformedAddress", eMessagingError);
22685
+ rb_raise(merror, "%s", error.what());
22686
+ }
22687
+ catch(qpid::messaging::AddressError& error) {
22688
+ static VALUE merror = rb_define_class("AddressError", eMessagingError);
22689
+ rb_raise(merror, "%s", error.what());
22690
+ }
22691
+ catch(qpid::messaging::LinkError& error) {
22692
+ static VALUE merror = rb_define_class("LinkError", eMessagingError);
22693
+ rb_raise(merror, "%s", error.what());
22694
+ }
22695
+ catch(qpid::messaging::MessagingException& error) {
22696
+ rb_raise(eMessagingError, "%s", error.what());
22697
+ }
22698
+ }
22699
+ if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
22700
+ if (alloc6 == SWIG_NEWOBJ) delete[] buf6;
22701
+ if (SWIG_IsNewObj(res7)) delete arg7;
22702
+ return Qnil;
22703
+ fail:
22704
+ if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
22705
+ if (alloc6 == SWIG_NEWOBJ) delete[] buf6;
22706
+ if (SWIG_IsNewObj(res7)) delete arg7;
22707
+ return Qnil;
22708
+ }
22709
+
22710
+
22711
+ static swig_class SwigClassLogger;
22712
+
22713
+ SWIGINTERN VALUE
22714
+ _wrap_Logger_configure__SWIG_0(int argc, VALUE *argv, VALUE self) {
22715
+ int arg1 ;
22716
+ char **arg2 ;
22717
+ std::string *arg3 = 0 ;
22718
+ int val1 ;
22719
+ int ecode1 = 0 ;
22720
+ void *argp2 = 0 ;
22721
+ int res2 = 0 ;
22722
+ int res3 = SWIG_OLDOBJ ;
22723
+
22724
+ if ((argc < 3) || (argc > 3)) {
22725
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
22726
+ }
22727
+ ecode1 = SWIG_AsVal_int(argv[0], &val1);
22728
+ if (!SWIG_IsOK(ecode1)) {
22729
+ SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "int","qpid::messaging::Logger::configure", 1, argv[0] ));
22730
+ }
22731
+ arg1 = static_cast< int >(val1);
22732
+ res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_p_char, 0 | 0 );
22733
+ if (!SWIG_IsOK(res2)) {
22734
+ SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char const *[]","qpid::messaging::Logger::configure", 2, argv[1] ));
22735
+ }
22736
+ arg2 = reinterpret_cast< char ** >(argp2);
22737
+ {
22738
+ std::string *ptr = (std::string *)0;
22739
+ res3 = SWIG_AsPtr_std_string(argv[2], &ptr);
22740
+ if (!SWIG_IsOK(res3)) {
22741
+ SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "std::string const &","qpid::messaging::Logger::configure", 3, argv[2] ));
22742
+ }
22743
+ if (!ptr) {
22744
+ SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","qpid::messaging::Logger::configure", 3, argv[2]));
22745
+ }
22746
+ arg3 = ptr;
22747
+ }
22748
+ {
22749
+ static VALUE eMessagingError = rb_define_class("MessagingError",
22750
+ rb_eStandardError);
22751
+
22752
+ try {
22753
+ qpid::messaging::Logger::configure(arg1,(char const *(*))arg2,(std::string const &)*arg3);
22754
+ }
22755
+ catch(qpid::messaging::ConnectionError& error) {
22756
+ static VALUE merror = rb_define_class("ConnectionError", eMessagingError);
22757
+ rb_raise(merror, "%s", error.what());
22758
+ }
22759
+ catch(qpid::messaging::TransportFailure& error) {
22760
+ static VALUE merror = rb_define_class("TransportFailure", eMessagingError);
22761
+ rb_raise(merror, "%s", error.what());
22762
+ }
22763
+ catch(qpid::messaging::TransactionAborted& error) {
22764
+ static VALUE merror = rb_define_class("TransactionAborted", eMessagingError);
22765
+ rb_raise(merror, "%s", error.what());
22766
+ }
22767
+ catch(qpid::messaging::TransactionError& error) {
22768
+ static VALUE merror = rb_define_class("TransactionError", eMessagingError);
22769
+ rb_raise(merror, "%s", error.what());
22770
+ }
22771
+ catch(qpid::messaging::UnauthorizedAccess& error) {
22772
+ static VALUE merror = rb_define_class("UnauthorizedAccess", eMessagingError);
22773
+ rb_raise(merror, "%s", error.what());
22774
+ }
22775
+ catch(qpid::messaging::SessionError& error) {
22776
+ static VALUE merror = rb_define_class("SessionError", eMessagingError);
22777
+ rb_raise(merror, "%s", error.what());
22778
+ }
22779
+ catch(qpid::messaging::TargetCapacityExceeded& error) {
22780
+ static VALUE merror = rb_define_class("TargetCapacityExceeded", eMessagingError);
22781
+ rb_raise(merror, "%s", error.what());
22782
+ }
22783
+ catch(qpid::messaging::SendError& error) {
22784
+ static VALUE merror = rb_define_class("SendError", eMessagingError);
22785
+ rb_raise(merror, "%s", error.what());
22786
+ }
22787
+ catch(qpid::messaging::SenderError& error) {
22788
+ static VALUE merror = rb_define_class("SenderError", eMessagingError);
22789
+ rb_raise(merror, "%s", error.what());
22790
+ }
22791
+ catch(qpid::messaging::NoMessageAvailable& error) {
22792
+ static VALUE merror = rb_define_class("NoMessageAvailable", eMessagingError);
22793
+ rb_raise(merror, "%s", error.what());
22794
+ }
22795
+ catch(qpid::messaging::FetchError& error) {
22796
+ static VALUE merror = rb_define_class("FetchError", eMessagingError);
22797
+ rb_raise(merror, "%s", error.what());
22798
+ }
22799
+ catch(qpid::messaging::ReceiverError& error) {
22800
+ static VALUE merror = rb_define_class("ReceiverError", eMessagingError);
22801
+ rb_raise(merror, "%s", error.what());
22802
+ }
22803
+ catch(qpid::messaging::InvalidOptionString& error) {
22804
+ static VALUE merror = rb_define_class("InvalidOptionString", eMessagingError);
22805
+ rb_raise(merror, "%s", error.what());
22806
+ }
22807
+ catch(qpid::messaging::KeyError& error) {
22808
+ static VALUE merror = rb_define_class("KeyError", eMessagingError);
22809
+ rb_raise(merror, "%s", error.what());
22810
+ }
22811
+ catch(qpid::messaging::AssertionFailed& error) {
22812
+ static VALUE merror = rb_define_class("AssertionFailed", eMessagingError);
22813
+ rb_raise(merror, "%s", error.what());
22814
+ }
22815
+ catch(qpid::messaging::NotFound& error) {
22816
+ static VALUE merror = rb_define_class("NotFound", eMessagingError);
22817
+ rb_raise(merror, "%s", error.what());
22818
+ }
22819
+ catch(qpid::messaging::ResolutionError& error) {
22820
+ static VALUE merror = rb_define_class("ResolutionError", eMessagingError);
22821
+ rb_raise(merror, "%s", error.what());
22822
+ }
22823
+ catch(qpid::messaging::MalformedAddress& error) {
22824
+ static VALUE merror = rb_define_class("MalformedAddress", eMessagingError);
22825
+ rb_raise(merror, "%s", error.what());
22826
+ }
22827
+ catch(qpid::messaging::AddressError& error) {
22828
+ static VALUE merror = rb_define_class("AddressError", eMessagingError);
22829
+ rb_raise(merror, "%s", error.what());
22830
+ }
22831
+ catch(qpid::messaging::LinkError& error) {
22832
+ static VALUE merror = rb_define_class("LinkError", eMessagingError);
22833
+ rb_raise(merror, "%s", error.what());
22834
+ }
22835
+ catch(qpid::messaging::MessagingException& error) {
22836
+ rb_raise(eMessagingError, "%s", error.what());
22837
+ }
22838
+ }
22839
+ if (SWIG_IsNewObj(res3)) delete arg3;
22840
+ return Qnil;
22841
+ fail:
22842
+ if (SWIG_IsNewObj(res3)) delete arg3;
22843
+ return Qnil;
22844
+ }
22845
+
22846
+
22847
+ SWIGINTERN VALUE
22848
+ _wrap_Logger_configure__SWIG_1(int argc, VALUE *argv, VALUE self) {
22849
+ int arg1 ;
22850
+ char **arg2 ;
22851
+ int val1 ;
22852
+ int ecode1 = 0 ;
22853
+ void *argp2 = 0 ;
22854
+ int res2 = 0 ;
22855
+
22856
+ if ((argc < 2) || (argc > 2)) {
22857
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
22858
+ }
22859
+ ecode1 = SWIG_AsVal_int(argv[0], &val1);
22860
+ if (!SWIG_IsOK(ecode1)) {
22861
+ SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "int","qpid::messaging::Logger::configure", 1, argv[0] ));
22862
+ }
22863
+ arg1 = static_cast< int >(val1);
22864
+ res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_p_char, 0 | 0 );
22865
+ if (!SWIG_IsOK(res2)) {
22866
+ SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char const *[]","qpid::messaging::Logger::configure", 2, argv[1] ));
22867
+ }
22868
+ arg2 = reinterpret_cast< char ** >(argp2);
22869
+ {
22870
+ static VALUE eMessagingError = rb_define_class("MessagingError",
22871
+ rb_eStandardError);
22872
+
22873
+ try {
22874
+ qpid::messaging::Logger::configure(arg1,(char const *(*))arg2);
22875
+ }
22876
+ catch(qpid::messaging::ConnectionError& error) {
22877
+ static VALUE merror = rb_define_class("ConnectionError", eMessagingError);
22878
+ rb_raise(merror, "%s", error.what());
22879
+ }
22880
+ catch(qpid::messaging::TransportFailure& error) {
22881
+ static VALUE merror = rb_define_class("TransportFailure", eMessagingError);
22882
+ rb_raise(merror, "%s", error.what());
22883
+ }
22884
+ catch(qpid::messaging::TransactionAborted& error) {
22885
+ static VALUE merror = rb_define_class("TransactionAborted", eMessagingError);
22886
+ rb_raise(merror, "%s", error.what());
22887
+ }
22888
+ catch(qpid::messaging::TransactionError& error) {
22889
+ static VALUE merror = rb_define_class("TransactionError", eMessagingError);
22890
+ rb_raise(merror, "%s", error.what());
22891
+ }
22892
+ catch(qpid::messaging::UnauthorizedAccess& error) {
22893
+ static VALUE merror = rb_define_class("UnauthorizedAccess", eMessagingError);
22894
+ rb_raise(merror, "%s", error.what());
22895
+ }
22896
+ catch(qpid::messaging::SessionError& error) {
22897
+ static VALUE merror = rb_define_class("SessionError", eMessagingError);
22898
+ rb_raise(merror, "%s", error.what());
22899
+ }
22900
+ catch(qpid::messaging::TargetCapacityExceeded& error) {
22901
+ static VALUE merror = rb_define_class("TargetCapacityExceeded", eMessagingError);
22902
+ rb_raise(merror, "%s", error.what());
22903
+ }
22904
+ catch(qpid::messaging::SendError& error) {
22905
+ static VALUE merror = rb_define_class("SendError", eMessagingError);
22906
+ rb_raise(merror, "%s", error.what());
22907
+ }
22908
+ catch(qpid::messaging::SenderError& error) {
22909
+ static VALUE merror = rb_define_class("SenderError", eMessagingError);
22910
+ rb_raise(merror, "%s", error.what());
22911
+ }
22912
+ catch(qpid::messaging::NoMessageAvailable& error) {
22913
+ static VALUE merror = rb_define_class("NoMessageAvailable", eMessagingError);
22914
+ rb_raise(merror, "%s", error.what());
22915
+ }
22916
+ catch(qpid::messaging::FetchError& error) {
22917
+ static VALUE merror = rb_define_class("FetchError", eMessagingError);
22918
+ rb_raise(merror, "%s", error.what());
22919
+ }
22920
+ catch(qpid::messaging::ReceiverError& error) {
22921
+ static VALUE merror = rb_define_class("ReceiverError", eMessagingError);
22922
+ rb_raise(merror, "%s", error.what());
22923
+ }
22924
+ catch(qpid::messaging::InvalidOptionString& error) {
22925
+ static VALUE merror = rb_define_class("InvalidOptionString", eMessagingError);
22926
+ rb_raise(merror, "%s", error.what());
22927
+ }
22928
+ catch(qpid::messaging::KeyError& error) {
22929
+ static VALUE merror = rb_define_class("KeyError", eMessagingError);
22930
+ rb_raise(merror, "%s", error.what());
22931
+ }
22932
+ catch(qpid::messaging::AssertionFailed& error) {
22933
+ static VALUE merror = rb_define_class("AssertionFailed", eMessagingError);
22934
+ rb_raise(merror, "%s", error.what());
22935
+ }
22936
+ catch(qpid::messaging::NotFound& error) {
22937
+ static VALUE merror = rb_define_class("NotFound", eMessagingError);
22938
+ rb_raise(merror, "%s", error.what());
22939
+ }
22940
+ catch(qpid::messaging::ResolutionError& error) {
22941
+ static VALUE merror = rb_define_class("ResolutionError", eMessagingError);
22942
+ rb_raise(merror, "%s", error.what());
22943
+ }
22944
+ catch(qpid::messaging::MalformedAddress& error) {
22945
+ static VALUE merror = rb_define_class("MalformedAddress", eMessagingError);
22946
+ rb_raise(merror, "%s", error.what());
22947
+ }
22948
+ catch(qpid::messaging::AddressError& error) {
22949
+ static VALUE merror = rb_define_class("AddressError", eMessagingError);
22950
+ rb_raise(merror, "%s", error.what());
22951
+ }
22952
+ catch(qpid::messaging::LinkError& error) {
22953
+ static VALUE merror = rb_define_class("LinkError", eMessagingError);
22954
+ rb_raise(merror, "%s", error.what());
22955
+ }
22956
+ catch(qpid::messaging::MessagingException& error) {
22957
+ rb_raise(eMessagingError, "%s", error.what());
22958
+ }
22959
+ }
22960
+ return Qnil;
22961
+ fail:
22962
+ return Qnil;
22963
+ }
22964
+
22965
+
22966
+ SWIGINTERN VALUE _wrap_Logger_configure(int nargs, VALUE *args, VALUE self) {
22967
+ int argc;
22968
+ VALUE argv[3];
22969
+ int ii;
22970
+
22971
+ argc = nargs;
22972
+ if (argc > 3) SWIG_fail;
22973
+ for (ii = 0; (ii < argc); ++ii) {
22974
+ argv[ii] = args[ii];
22975
+ }
22976
+ if (argc == 2) {
22977
+ int _v;
22978
+ {
22979
+ int res = SWIG_AsVal_int(argv[0], NULL);
22980
+ _v = SWIG_CheckState(res);
22981
+ }
22982
+ if (_v) {
22983
+ void *vptr = 0;
22984
+ int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_p_char, 0);
22985
+ _v = SWIG_CheckState(res);
22986
+ if (_v) {
22987
+ return _wrap_Logger_configure__SWIG_1(nargs, args, self);
22988
+ }
22989
+ }
22990
+ }
22991
+ if (argc == 3) {
22992
+ int _v;
22993
+ {
22994
+ int res = SWIG_AsVal_int(argv[0], NULL);
22995
+ _v = SWIG_CheckState(res);
22996
+ }
22997
+ if (_v) {
22998
+ void *vptr = 0;
22999
+ int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_p_char, 0);
23000
+ _v = SWIG_CheckState(res);
23001
+ if (_v) {
23002
+ int res = SWIG_AsPtr_std_string(argv[2], (std::string**)(0));
23003
+ _v = SWIG_CheckState(res);
23004
+ if (_v) {
23005
+ return _wrap_Logger_configure__SWIG_0(nargs, args, self);
23006
+ }
23007
+ }
23008
+ }
23009
+ }
23010
+
23011
+ fail:
23012
+ Ruby_Format_OverloadedError( argc, 3, "Logger.configure",
23013
+ " void Logger.configure(int argc, char const *argv[], std::string const &prefix)\n"
23014
+ " void Logger.configure(int argc, char const *argv[])\n");
23015
+
23016
+ return Qnil;
23017
+ }
23018
+
23019
+
23020
+ SWIGINTERN VALUE
23021
+ _wrap_Logger_usage(int argc, VALUE *argv, VALUE self) {
23022
+ std::string result;
23023
+ VALUE vresult = Qnil;
23024
+
23025
+ if ((argc < 0) || (argc > 0)) {
23026
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
23027
+ }
23028
+ {
23029
+ static VALUE eMessagingError = rb_define_class("MessagingError",
23030
+ rb_eStandardError);
23031
+
23032
+ try {
23033
+ result = qpid::messaging::Logger::usage();
23034
+ }
23035
+ catch(qpid::messaging::ConnectionError& error) {
23036
+ static VALUE merror = rb_define_class("ConnectionError", eMessagingError);
23037
+ rb_raise(merror, "%s", error.what());
23038
+ }
23039
+ catch(qpid::messaging::TransportFailure& error) {
23040
+ static VALUE merror = rb_define_class("TransportFailure", eMessagingError);
23041
+ rb_raise(merror, "%s", error.what());
23042
+ }
23043
+ catch(qpid::messaging::TransactionAborted& error) {
23044
+ static VALUE merror = rb_define_class("TransactionAborted", eMessagingError);
23045
+ rb_raise(merror, "%s", error.what());
23046
+ }
23047
+ catch(qpid::messaging::TransactionError& error) {
23048
+ static VALUE merror = rb_define_class("TransactionError", eMessagingError);
23049
+ rb_raise(merror, "%s", error.what());
23050
+ }
23051
+ catch(qpid::messaging::UnauthorizedAccess& error) {
23052
+ static VALUE merror = rb_define_class("UnauthorizedAccess", eMessagingError);
23053
+ rb_raise(merror, "%s", error.what());
23054
+ }
23055
+ catch(qpid::messaging::SessionError& error) {
23056
+ static VALUE merror = rb_define_class("SessionError", eMessagingError);
23057
+ rb_raise(merror, "%s", error.what());
23058
+ }
23059
+ catch(qpid::messaging::TargetCapacityExceeded& error) {
23060
+ static VALUE merror = rb_define_class("TargetCapacityExceeded", eMessagingError);
23061
+ rb_raise(merror, "%s", error.what());
23062
+ }
23063
+ catch(qpid::messaging::SendError& error) {
23064
+ static VALUE merror = rb_define_class("SendError", eMessagingError);
23065
+ rb_raise(merror, "%s", error.what());
23066
+ }
23067
+ catch(qpid::messaging::SenderError& error) {
23068
+ static VALUE merror = rb_define_class("SenderError", eMessagingError);
23069
+ rb_raise(merror, "%s", error.what());
23070
+ }
23071
+ catch(qpid::messaging::NoMessageAvailable& error) {
23072
+ static VALUE merror = rb_define_class("NoMessageAvailable", eMessagingError);
23073
+ rb_raise(merror, "%s", error.what());
23074
+ }
23075
+ catch(qpid::messaging::FetchError& error) {
23076
+ static VALUE merror = rb_define_class("FetchError", eMessagingError);
23077
+ rb_raise(merror, "%s", error.what());
23078
+ }
23079
+ catch(qpid::messaging::ReceiverError& error) {
23080
+ static VALUE merror = rb_define_class("ReceiverError", eMessagingError);
23081
+ rb_raise(merror, "%s", error.what());
23082
+ }
23083
+ catch(qpid::messaging::InvalidOptionString& error) {
23084
+ static VALUE merror = rb_define_class("InvalidOptionString", eMessagingError);
23085
+ rb_raise(merror, "%s", error.what());
23086
+ }
23087
+ catch(qpid::messaging::KeyError& error) {
23088
+ static VALUE merror = rb_define_class("KeyError", eMessagingError);
23089
+ rb_raise(merror, "%s", error.what());
23090
+ }
23091
+ catch(qpid::messaging::AssertionFailed& error) {
23092
+ static VALUE merror = rb_define_class("AssertionFailed", eMessagingError);
23093
+ rb_raise(merror, "%s", error.what());
23094
+ }
23095
+ catch(qpid::messaging::NotFound& error) {
23096
+ static VALUE merror = rb_define_class("NotFound", eMessagingError);
23097
+ rb_raise(merror, "%s", error.what());
23098
+ }
23099
+ catch(qpid::messaging::ResolutionError& error) {
23100
+ static VALUE merror = rb_define_class("ResolutionError", eMessagingError);
23101
+ rb_raise(merror, "%s", error.what());
23102
+ }
23103
+ catch(qpid::messaging::MalformedAddress& error) {
23104
+ static VALUE merror = rb_define_class("MalformedAddress", eMessagingError);
23105
+ rb_raise(merror, "%s", error.what());
23106
+ }
23107
+ catch(qpid::messaging::AddressError& error) {
23108
+ static VALUE merror = rb_define_class("AddressError", eMessagingError);
23109
+ rb_raise(merror, "%s", error.what());
23110
+ }
23111
+ catch(qpid::messaging::LinkError& error) {
23112
+ static VALUE merror = rb_define_class("LinkError", eMessagingError);
23113
+ rb_raise(merror, "%s", error.what());
23114
+ }
23115
+ catch(qpid::messaging::MessagingException& error) {
23116
+ rb_raise(eMessagingError, "%s", error.what());
23117
+ }
23118
+ }
23119
+ vresult = SWIG_From_std_string(static_cast< std::string >(result));
23120
+ return vresult;
23121
+ fail:
23122
+ return Qnil;
23123
+ }
23124
+
23125
+
23126
+ SWIGINTERN VALUE
23127
+ _wrap_Logger_setOutput(int argc, VALUE *argv, VALUE self) {
23128
+ qpid::messaging::LoggerOutput *arg1 = 0 ;
23129
+ void *argp1 = 0 ;
23130
+ int res1 = 0 ;
23131
+
23132
+ if ((argc < 1) || (argc > 1)) {
23133
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
23134
+ }
23135
+ res1 = SWIG_ConvertPtr(argv[0], &argp1, SWIGTYPE_p_qpid__messaging__LoggerOutput, 0 );
23136
+ if (!SWIG_IsOK(res1)) {
23137
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "qpid::messaging::LoggerOutput &","qpid::messaging::Logger::setOutput", 1, argv[0] ));
23138
+ }
23139
+ if (!argp1) {
23140
+ SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "qpid::messaging::LoggerOutput &","qpid::messaging::Logger::setOutput", 1, argv[0]));
23141
+ }
23142
+ arg1 = reinterpret_cast< qpid::messaging::LoggerOutput * >(argp1);
23143
+ {
23144
+ static VALUE eMessagingError = rb_define_class("MessagingError",
23145
+ rb_eStandardError);
23146
+
23147
+ try {
23148
+ qpid::messaging::Logger::setOutput(*arg1);
23149
+ }
23150
+ catch(qpid::messaging::ConnectionError& error) {
23151
+ static VALUE merror = rb_define_class("ConnectionError", eMessagingError);
23152
+ rb_raise(merror, "%s", error.what());
23153
+ }
23154
+ catch(qpid::messaging::TransportFailure& error) {
23155
+ static VALUE merror = rb_define_class("TransportFailure", eMessagingError);
23156
+ rb_raise(merror, "%s", error.what());
23157
+ }
23158
+ catch(qpid::messaging::TransactionAborted& error) {
23159
+ static VALUE merror = rb_define_class("TransactionAborted", eMessagingError);
23160
+ rb_raise(merror, "%s", error.what());
23161
+ }
23162
+ catch(qpid::messaging::TransactionError& error) {
23163
+ static VALUE merror = rb_define_class("TransactionError", eMessagingError);
23164
+ rb_raise(merror, "%s", error.what());
23165
+ }
23166
+ catch(qpid::messaging::UnauthorizedAccess& error) {
23167
+ static VALUE merror = rb_define_class("UnauthorizedAccess", eMessagingError);
23168
+ rb_raise(merror, "%s", error.what());
23169
+ }
23170
+ catch(qpid::messaging::SessionError& error) {
23171
+ static VALUE merror = rb_define_class("SessionError", eMessagingError);
23172
+ rb_raise(merror, "%s", error.what());
23173
+ }
23174
+ catch(qpid::messaging::TargetCapacityExceeded& error) {
23175
+ static VALUE merror = rb_define_class("TargetCapacityExceeded", eMessagingError);
23176
+ rb_raise(merror, "%s", error.what());
23177
+ }
23178
+ catch(qpid::messaging::SendError& error) {
23179
+ static VALUE merror = rb_define_class("SendError", eMessagingError);
23180
+ rb_raise(merror, "%s", error.what());
23181
+ }
23182
+ catch(qpid::messaging::SenderError& error) {
23183
+ static VALUE merror = rb_define_class("SenderError", eMessagingError);
23184
+ rb_raise(merror, "%s", error.what());
23185
+ }
23186
+ catch(qpid::messaging::NoMessageAvailable& error) {
23187
+ static VALUE merror = rb_define_class("NoMessageAvailable", eMessagingError);
23188
+ rb_raise(merror, "%s", error.what());
23189
+ }
23190
+ catch(qpid::messaging::FetchError& error) {
23191
+ static VALUE merror = rb_define_class("FetchError", eMessagingError);
23192
+ rb_raise(merror, "%s", error.what());
23193
+ }
23194
+ catch(qpid::messaging::ReceiverError& error) {
23195
+ static VALUE merror = rb_define_class("ReceiverError", eMessagingError);
23196
+ rb_raise(merror, "%s", error.what());
23197
+ }
23198
+ catch(qpid::messaging::InvalidOptionString& error) {
23199
+ static VALUE merror = rb_define_class("InvalidOptionString", eMessagingError);
23200
+ rb_raise(merror, "%s", error.what());
23201
+ }
23202
+ catch(qpid::messaging::KeyError& error) {
23203
+ static VALUE merror = rb_define_class("KeyError", eMessagingError);
23204
+ rb_raise(merror, "%s", error.what());
23205
+ }
23206
+ catch(qpid::messaging::AssertionFailed& error) {
23207
+ static VALUE merror = rb_define_class("AssertionFailed", eMessagingError);
23208
+ rb_raise(merror, "%s", error.what());
23209
+ }
23210
+ catch(qpid::messaging::NotFound& error) {
23211
+ static VALUE merror = rb_define_class("NotFound", eMessagingError);
23212
+ rb_raise(merror, "%s", error.what());
23213
+ }
23214
+ catch(qpid::messaging::ResolutionError& error) {
23215
+ static VALUE merror = rb_define_class("ResolutionError", eMessagingError);
23216
+ rb_raise(merror, "%s", error.what());
23217
+ }
23218
+ catch(qpid::messaging::MalformedAddress& error) {
23219
+ static VALUE merror = rb_define_class("MalformedAddress", eMessagingError);
23220
+ rb_raise(merror, "%s", error.what());
23221
+ }
23222
+ catch(qpid::messaging::AddressError& error) {
23223
+ static VALUE merror = rb_define_class("AddressError", eMessagingError);
23224
+ rb_raise(merror, "%s", error.what());
23225
+ }
23226
+ catch(qpid::messaging::LinkError& error) {
23227
+ static VALUE merror = rb_define_class("LinkError", eMessagingError);
23228
+ rb_raise(merror, "%s", error.what());
23229
+ }
23230
+ catch(qpid::messaging::MessagingException& error) {
23231
+ rb_raise(eMessagingError, "%s", error.what());
23232
+ }
23233
+ }
23234
+ return Qnil;
23235
+ fail:
23236
+ return Qnil;
23237
+ }
23238
+
23239
+
23240
+ SWIGINTERN VALUE
23241
+ _wrap_Logger_log(int argc, VALUE *argv, VALUE self) {
23242
+ qpid::messaging::Level arg1 ;
23243
+ char *arg2 = (char *) 0 ;
23244
+ int arg3 ;
23245
+ char *arg4 = (char *) 0 ;
23246
+ std::string *arg5 = 0 ;
23247
+ int val1 ;
23248
+ int ecode1 = 0 ;
23249
+ int res2 ;
23250
+ char *buf2 = 0 ;
23251
+ int alloc2 = 0 ;
23252
+ int val3 ;
23253
+ int ecode3 = 0 ;
23254
+ int res4 ;
23255
+ char *buf4 = 0 ;
23256
+ int alloc4 = 0 ;
23257
+ int res5 = SWIG_OLDOBJ ;
23258
+
23259
+ if ((argc < 5) || (argc > 5)) {
23260
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 5)",argc); SWIG_fail;
23261
+ }
23262
+ ecode1 = SWIG_AsVal_int(argv[0], &val1);
23263
+ if (!SWIG_IsOK(ecode1)) {
23264
+ SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "qpid::messaging::Level","qpid::messaging::Logger::log", 1, argv[0] ));
23265
+ }
23266
+ arg1 = static_cast< qpid::messaging::Level >(val1);
23267
+ res2 = SWIG_AsCharPtrAndSize(argv[1], &buf2, NULL, &alloc2);
23268
+ if (!SWIG_IsOK(res2)) {
23269
+ SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char const *","qpid::messaging::Logger::log", 2, argv[1] ));
23270
+ }
23271
+ arg2 = reinterpret_cast< char * >(buf2);
23272
+ ecode3 = SWIG_AsVal_int(argv[2], &val3);
23273
+ if (!SWIG_IsOK(ecode3)) {
23274
+ SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "int","qpid::messaging::Logger::log", 3, argv[2] ));
23275
+ }
23276
+ arg3 = static_cast< int >(val3);
23277
+ res4 = SWIG_AsCharPtrAndSize(argv[3], &buf4, NULL, &alloc4);
23278
+ if (!SWIG_IsOK(res4)) {
23279
+ SWIG_exception_fail(SWIG_ArgError(res4), Ruby_Format_TypeError( "", "char const *","qpid::messaging::Logger::log", 4, argv[3] ));
23280
+ }
23281
+ arg4 = reinterpret_cast< char * >(buf4);
23282
+ {
23283
+ std::string *ptr = (std::string *)0;
23284
+ res5 = SWIG_AsPtr_std_string(argv[4], &ptr);
23285
+ if (!SWIG_IsOK(res5)) {
23286
+ SWIG_exception_fail(SWIG_ArgError(res5), Ruby_Format_TypeError( "", "std::string const &","qpid::messaging::Logger::log", 5, argv[4] ));
23287
+ }
23288
+ if (!ptr) {
23289
+ SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","qpid::messaging::Logger::log", 5, argv[4]));
23290
+ }
23291
+ arg5 = ptr;
23292
+ }
23293
+ {
23294
+ static VALUE eMessagingError = rb_define_class("MessagingError",
23295
+ rb_eStandardError);
23296
+
23297
+ try {
23298
+ qpid::messaging::Logger::log(arg1,(char const *)arg2,arg3,(char const *)arg4,(std::string const &)*arg5);
23299
+ }
23300
+ catch(qpid::messaging::ConnectionError& error) {
23301
+ static VALUE merror = rb_define_class("ConnectionError", eMessagingError);
23302
+ rb_raise(merror, "%s", error.what());
23303
+ }
23304
+ catch(qpid::messaging::TransportFailure& error) {
23305
+ static VALUE merror = rb_define_class("TransportFailure", eMessagingError);
23306
+ rb_raise(merror, "%s", error.what());
23307
+ }
23308
+ catch(qpid::messaging::TransactionAborted& error) {
23309
+ static VALUE merror = rb_define_class("TransactionAborted", eMessagingError);
23310
+ rb_raise(merror, "%s", error.what());
23311
+ }
23312
+ catch(qpid::messaging::TransactionError& error) {
23313
+ static VALUE merror = rb_define_class("TransactionError", eMessagingError);
23314
+ rb_raise(merror, "%s", error.what());
23315
+ }
23316
+ catch(qpid::messaging::UnauthorizedAccess& error) {
23317
+ static VALUE merror = rb_define_class("UnauthorizedAccess", eMessagingError);
23318
+ rb_raise(merror, "%s", error.what());
23319
+ }
23320
+ catch(qpid::messaging::SessionError& error) {
23321
+ static VALUE merror = rb_define_class("SessionError", eMessagingError);
23322
+ rb_raise(merror, "%s", error.what());
23323
+ }
23324
+ catch(qpid::messaging::TargetCapacityExceeded& error) {
23325
+ static VALUE merror = rb_define_class("TargetCapacityExceeded", eMessagingError);
23326
+ rb_raise(merror, "%s", error.what());
23327
+ }
23328
+ catch(qpid::messaging::SendError& error) {
23329
+ static VALUE merror = rb_define_class("SendError", eMessagingError);
23330
+ rb_raise(merror, "%s", error.what());
23331
+ }
23332
+ catch(qpid::messaging::SenderError& error) {
23333
+ static VALUE merror = rb_define_class("SenderError", eMessagingError);
23334
+ rb_raise(merror, "%s", error.what());
23335
+ }
23336
+ catch(qpid::messaging::NoMessageAvailable& error) {
23337
+ static VALUE merror = rb_define_class("NoMessageAvailable", eMessagingError);
23338
+ rb_raise(merror, "%s", error.what());
23339
+ }
23340
+ catch(qpid::messaging::FetchError& error) {
23341
+ static VALUE merror = rb_define_class("FetchError", eMessagingError);
23342
+ rb_raise(merror, "%s", error.what());
23343
+ }
23344
+ catch(qpid::messaging::ReceiverError& error) {
23345
+ static VALUE merror = rb_define_class("ReceiverError", eMessagingError);
23346
+ rb_raise(merror, "%s", error.what());
23347
+ }
23348
+ catch(qpid::messaging::InvalidOptionString& error) {
23349
+ static VALUE merror = rb_define_class("InvalidOptionString", eMessagingError);
23350
+ rb_raise(merror, "%s", error.what());
23351
+ }
23352
+ catch(qpid::messaging::KeyError& error) {
23353
+ static VALUE merror = rb_define_class("KeyError", eMessagingError);
23354
+ rb_raise(merror, "%s", error.what());
23355
+ }
23356
+ catch(qpid::messaging::AssertionFailed& error) {
23357
+ static VALUE merror = rb_define_class("AssertionFailed", eMessagingError);
23358
+ rb_raise(merror, "%s", error.what());
23359
+ }
23360
+ catch(qpid::messaging::NotFound& error) {
23361
+ static VALUE merror = rb_define_class("NotFound", eMessagingError);
23362
+ rb_raise(merror, "%s", error.what());
23363
+ }
23364
+ catch(qpid::messaging::ResolutionError& error) {
23365
+ static VALUE merror = rb_define_class("ResolutionError", eMessagingError);
23366
+ rb_raise(merror, "%s", error.what());
23367
+ }
23368
+ catch(qpid::messaging::MalformedAddress& error) {
23369
+ static VALUE merror = rb_define_class("MalformedAddress", eMessagingError);
23370
+ rb_raise(merror, "%s", error.what());
23371
+ }
23372
+ catch(qpid::messaging::AddressError& error) {
23373
+ static VALUE merror = rb_define_class("AddressError", eMessagingError);
23374
+ rb_raise(merror, "%s", error.what());
23375
+ }
23376
+ catch(qpid::messaging::LinkError& error) {
23377
+ static VALUE merror = rb_define_class("LinkError", eMessagingError);
23378
+ rb_raise(merror, "%s", error.what());
23379
+ }
23380
+ catch(qpid::messaging::MessagingException& error) {
23381
+ rb_raise(eMessagingError, "%s", error.what());
23382
+ }
23383
+ }
23384
+ if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
23385
+ if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
23386
+ if (SWIG_IsNewObj(res5)) delete arg5;
23387
+ return Qnil;
23388
+ fail:
23389
+ if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
23390
+ if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
23391
+ if (SWIG_IsNewObj(res5)) delete arg5;
23392
+ return Qnil;
23393
+ }
23394
+
23395
+
22521
23396
  SWIGINTERN VALUE
22522
23397
  _wrap_decodeMap(int argc, VALUE *argv, VALUE self) {
22523
23398
  qpid::messaging::Message *arg1 = 0 ;
@@ -22760,12 +23635,15 @@ fail:
22760
23635
  /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
22761
23636
 
22762
23637
  static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0};
23638
+ static swig_type_info _swigt__p_p_char = {"_p_p_char", "char **", 0, 0, (void*)0, 0};
22763
23639
  static swig_type_info _swigt__p_qpid__messaging__Address = {"_p_qpid__messaging__Address", "qpid::messaging::Address *", 0, 0, (void*)0, 0};
22764
23640
  static swig_type_info _swigt__p_qpid__messaging__Connection = {"_p_qpid__messaging__Connection", "qpid::messaging::Connection *", 0, 0, (void*)0, 0};
22765
23641
  static swig_type_info _swigt__p_qpid__messaging__ConnectionImpl = {"_p_qpid__messaging__ConnectionImpl", "qpid::messaging::ConnectionImpl *", 0, 0, (void*)0, 0};
22766
23642
  static swig_type_info _swigt__p_qpid__messaging__Duration = {"_p_qpid__messaging__Duration", "qpid::messaging::Duration *", 0, 0, (void*)0, 0};
22767
23643
  static swig_type_info _swigt__p_qpid__messaging__EncodingException = {"_p_qpid__messaging__EncodingException", "qpid::messaging::EncodingException *", 0, 0, (void*)0, 0};
22768
23644
  static swig_type_info _swigt__p_qpid__messaging__FailoverUpdates = {"_p_qpid__messaging__FailoverUpdates", "qpid::messaging::FailoverUpdates *", 0, 0, (void*)0, 0};
23645
+ static swig_type_info _swigt__p_qpid__messaging__Logger = {"_p_qpid__messaging__Logger", "qpid::messaging::Logger *", 0, 0, (void*)0, 0};
23646
+ static swig_type_info _swigt__p_qpid__messaging__LoggerOutput = {"_p_qpid__messaging__LoggerOutput", "qpid::messaging::LoggerOutput *", 0, 0, (void*)0, 0};
22769
23647
  static swig_type_info _swigt__p_qpid__messaging__Message = {"_p_qpid__messaging__Message", "qpid::messaging::Message *", 0, 0, (void*)0, 0};
22770
23648
  static swig_type_info _swigt__p_qpid__messaging__Receiver = {"_p_qpid__messaging__Receiver", "qpid::messaging::Receiver *", 0, 0, (void*)0, 0};
22771
23649
  static swig_type_info _swigt__p_qpid__messaging__ReceiverImpl = {"_p_qpid__messaging__ReceiverImpl", "qpid::messaging::ReceiverImpl *", 0, 0, (void*)0, 0};
@@ -22777,12 +23655,15 @@ static swig_type_info _swigt__p_uint8_t = {"_p_uint8_t", "uint8_t *", 0, 0, (voi
22777
23655
 
22778
23656
  static swig_type_info *swig_type_initial[] = {
22779
23657
  &_swigt__p_char,
23658
+ &_swigt__p_p_char,
22780
23659
  &_swigt__p_qpid__messaging__Address,
22781
23660
  &_swigt__p_qpid__messaging__Connection,
22782
23661
  &_swigt__p_qpid__messaging__ConnectionImpl,
22783
23662
  &_swigt__p_qpid__messaging__Duration,
22784
23663
  &_swigt__p_qpid__messaging__EncodingException,
22785
23664
  &_swigt__p_qpid__messaging__FailoverUpdates,
23665
+ &_swigt__p_qpid__messaging__Logger,
23666
+ &_swigt__p_qpid__messaging__LoggerOutput,
22786
23667
  &_swigt__p_qpid__messaging__Message,
22787
23668
  &_swigt__p_qpid__messaging__Receiver,
22788
23669
  &_swigt__p_qpid__messaging__ReceiverImpl,
@@ -22794,12 +23675,15 @@ static swig_type_info *swig_type_initial[] = {
22794
23675
  };
22795
23676
 
22796
23677
  static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}};
23678
+ static swig_cast_info _swigc__p_p_char[] = { {&_swigt__p_p_char, 0, 0, 0},{0, 0, 0, 0}};
22797
23679
  static swig_cast_info _swigc__p_qpid__messaging__Address[] = { {&_swigt__p_qpid__messaging__Address, 0, 0, 0},{0, 0, 0, 0}};
22798
23680
  static swig_cast_info _swigc__p_qpid__messaging__Connection[] = { {&_swigt__p_qpid__messaging__Connection, 0, 0, 0},{0, 0, 0, 0}};
22799
23681
  static swig_cast_info _swigc__p_qpid__messaging__ConnectionImpl[] = { {&_swigt__p_qpid__messaging__ConnectionImpl, 0, 0, 0},{0, 0, 0, 0}};
22800
23682
  static swig_cast_info _swigc__p_qpid__messaging__Duration[] = { {&_swigt__p_qpid__messaging__Duration, 0, 0, 0},{0, 0, 0, 0}};
22801
23683
  static swig_cast_info _swigc__p_qpid__messaging__EncodingException[] = { {&_swigt__p_qpid__messaging__EncodingException, 0, 0, 0},{0, 0, 0, 0}};
22802
23684
  static swig_cast_info _swigc__p_qpid__messaging__FailoverUpdates[] = { {&_swigt__p_qpid__messaging__FailoverUpdates, 0, 0, 0},{0, 0, 0, 0}};
23685
+ static swig_cast_info _swigc__p_qpid__messaging__Logger[] = { {&_swigt__p_qpid__messaging__Logger, 0, 0, 0},{0, 0, 0, 0}};
23686
+ static swig_cast_info _swigc__p_qpid__messaging__LoggerOutput[] = { {&_swigt__p_qpid__messaging__LoggerOutput, 0, 0, 0},{0, 0, 0, 0}};
22803
23687
  static swig_cast_info _swigc__p_qpid__messaging__Message[] = { {&_swigt__p_qpid__messaging__Message, 0, 0, 0},{0, 0, 0, 0}};
22804
23688
  static swig_cast_info _swigc__p_qpid__messaging__Receiver[] = { {&_swigt__p_qpid__messaging__Receiver, 0, 0, 0},{0, 0, 0, 0}};
22805
23689
  static swig_cast_info _swigc__p_qpid__messaging__ReceiverImpl[] = { {&_swigt__p_qpid__messaging__ReceiverImpl, 0, 0, 0},{0, 0, 0, 0}};
@@ -22811,12 +23695,15 @@ static swig_cast_info _swigc__p_uint8_t[] = { {&_swigt__p_uint8_t, 0, 0, 0},{0,
22811
23695
 
22812
23696
  static swig_cast_info *swig_cast_initial[] = {
22813
23697
  _swigc__p_char,
23698
+ _swigc__p_p_char,
22814
23699
  _swigc__p_qpid__messaging__Address,
22815
23700
  _swigc__p_qpid__messaging__Connection,
22816
23701
  _swigc__p_qpid__messaging__ConnectionImpl,
22817
23702
  _swigc__p_qpid__messaging__Duration,
22818
23703
  _swigc__p_qpid__messaging__EncodingException,
22819
23704
  _swigc__p_qpid__messaging__FailoverUpdates,
23705
+ _swigc__p_qpid__messaging__Logger,
23706
+ _swigc__p_qpid__messaging__LoggerOutput,
22820
23707
  _swigc__p_qpid__messaging__Message,
22821
23708
  _swigc__p_qpid__messaging__Receiver,
22822
23709
  _swigc__p_qpid__messaging__ReceiverImpl,
@@ -23253,6 +24140,31 @@ SWIGEXPORT void Init_cqpid(void) {
23253
24140
  SwigClassFailoverUpdates.mark = 0;
23254
24141
  SwigClassFailoverUpdates.destroy = (void (*)(void *)) free_qpid_messaging_FailoverUpdates;
23255
24142
  SwigClassFailoverUpdates.trackObjects = 0;
24143
+ rb_define_const(mCqpid, "Trace", SWIG_From_int(static_cast< int >(qpid::messaging::trace)));
24144
+ rb_define_const(mCqpid, "Debug", SWIG_From_int(static_cast< int >(qpid::messaging::debug)));
24145
+ rb_define_const(mCqpid, "Info", SWIG_From_int(static_cast< int >(qpid::messaging::info)));
24146
+ rb_define_const(mCqpid, "Notice", SWIG_From_int(static_cast< int >(qpid::messaging::notice)));
24147
+ rb_define_const(mCqpid, "Warning", SWIG_From_int(static_cast< int >(qpid::messaging::warning)));
24148
+ rb_define_const(mCqpid, "Error", SWIG_From_int(static_cast< int >(qpid::messaging::error)));
24149
+ rb_define_const(mCqpid, "Critical", SWIG_From_int(static_cast< int >(qpid::messaging::critical)));
24150
+
24151
+ SwigClassLoggerOutput.klass = rb_define_class_under(mCqpid, "LoggerOutput", rb_cObject);
24152
+ SWIG_TypeClientData(SWIGTYPE_p_qpid__messaging__LoggerOutput, (void *) &SwigClassLoggerOutput);
24153
+ rb_undef_alloc_func(SwigClassLoggerOutput.klass);
24154
+ rb_define_method(SwigClassLoggerOutput.klass, "log", VALUEFUNC(_wrap_LoggerOutput_log), -1);
24155
+ SwigClassLoggerOutput.mark = 0;
24156
+ SwigClassLoggerOutput.destroy = (void (*)(void *)) free_qpid_messaging_LoggerOutput;
24157
+ SwigClassLoggerOutput.trackObjects = 0;
24158
+
24159
+ SwigClassLogger.klass = rb_define_class_under(mCqpid, "Logger", rb_cObject);
24160
+ SWIG_TypeClientData(SWIGTYPE_p_qpid__messaging__Logger, (void *) &SwigClassLogger);
24161
+ rb_undef_alloc_func(SwigClassLogger.klass);
24162
+ rb_define_singleton_method(SwigClassLogger.klass, "configure", VALUEFUNC(_wrap_Logger_configure), -1);
24163
+ rb_define_singleton_method(SwigClassLogger.klass, "usage", VALUEFUNC(_wrap_Logger_usage), -1);
24164
+ rb_define_singleton_method(SwigClassLogger.klass, "setOutput", VALUEFUNC(_wrap_Logger_setOutput), -1);
24165
+ rb_define_singleton_method(SwigClassLogger.klass, "log", VALUEFUNC(_wrap_Logger_log), -1);
24166
+ SwigClassLogger.mark = 0;
24167
+ SwigClassLogger.trackObjects = 0;
23256
24168
  rb_define_module_function(mCqpid, "decodeMap", VALUEFUNC(_wrap_decodeMap), -1);
23257
24169
  rb_define_module_function(mCqpid, "decodeList", VALUEFUNC(_wrap_decodeList), -1);
23258
24170
  }
@@ -39,9 +39,8 @@ module Qpid
39
39
  def initialize(args = {})
40
40
  @message_impl = (args[:impl] if args[:impl]) || nil
41
41
  @message_impl = Cqpid::Message.new if @message_impl.nil?
42
- @content = nil
43
42
  args = {} if args.nil?
44
- self.content = args[:content] if args[:content]
43
+ self.content_object = args[:content] if args[:content]
45
44
  end
46
45
 
47
46
  def message_impl # :nodoc:
@@ -345,6 +344,29 @@ module Qpid
345
344
  # Returns the content's size in bytes.
346
345
  def content_size; @message_impl.getContentSize; end
347
346
 
347
+ # Sets the message content.
348
+ #
349
+ # ==== Options
350
+ #
351
+ # * +content+ - the content
352
+ #
353
+ # ==== Examples
354
+ #
355
+ # # set a simple content for a message
356
+ # msg.content_object = "This is a simple message."
357
+ # # sets content that is automatically encoded
358
+ # msg.content_object = {:foo => :bar}
359
+ #
360
+ def content_object=(content)
361
+ @message_impl.setContentObject(Qpid::Messaging.stringify(content))
362
+ end
363
+
364
+ # Returns the content of the +Message+.
365
+ #
366
+ def content_object
367
+ @message_impl.getContentObject()
368
+ end
369
+
348
370
  end
349
371
 
350
372
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: qpid_messaging
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.26.1
4
+ version: 0.30.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Apache Qpid Project
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-02-21 00:00:00.000000000 Z
11
+ date: 2014-10-07 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Qpid is an enterprise messaging framework.
14
14
  email: dev@qpid.apache.org