class Cqpid::Connection
Public Class Methods
new(*args)
click to toggle source
SWIGINTERN VALUE _wrap_new_Connection(int nargs, VALUE *args, VALUE self) { int argc; VALUE argv[2]; int ii; argc = nargs; if (argc > 2) SWIG_fail; for (ii = 0; (ii < argc); ++ii) { argv[ii] = args[ii]; } if (argc == 0) { return _wrap_new_Connection__SWIG_2(nargs, args, self); } if (argc == 1) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_qpid__messaging__Connection, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_new_Connection__SWIG_1(nargs, args, self); } } if (argc == 1) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_qpid__messaging__ConnectionImpl, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_new_Connection__SWIG_0(nargs, args, self); } } if (argc == 1) { int _v; int res = SWIG_AsPtr_std_string(argv[0], (std::string**)(0)); _v = SWIG_CheckState(res); if (_v) { return _wrap_new_Connection__SWIG_4(nargs, args, self); } } if (argc == 2) { int _v; int res = SWIG_AsPtr_std_string(argv[0], (std::string**)(0)); _v = SWIG_CheckState(res); if (_v) { int res = SWIG_AsPtr_std_string(argv[1], (std::string**)(0)); _v = SWIG_CheckState(res); if (_v) { return _wrap_new_Connection__SWIG_5(nargs, args, self); } } } if (argc == 2) { int _v; int res = SWIG_AsPtr_std_string(argv[0], (std::string**)(0)); _v = SWIG_CheckState(res); if (_v) { { _v = (TYPE(argv[1]) == T_HASH) ? 1 : 0; } if (_v) { return _wrap_new_Connection__SWIG_3(nargs, args, self); } } } fail: Ruby_Format_OverloadedError( argc, 2, "Connection.new", " Connection.new(qpid::messaging::ConnectionImpl *impl)\n" " Connection.new(qpid::messaging::Connection const &)\n" " Connection.new()\n" " Connection.new(std::string const &url, qpid::types::Variant::Map const &options)\n" " Connection.new(std::string const &url)\n" " Connection.new(std::string const &url, std::string const &options)\n"); return Qnil; }
Public Instance Methods
close(*args)
click to toggle source
SWIGINTERN VALUE _wrap_Connection_close(int argc, VALUE *argv, VALUE self) { qpid::messaging::Connection *arg1 = (qpid::messaging::Connection *) 0 ; void *argp1 = 0 ; int res1 = 0 ; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_qpid__messaging__Connection, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "qpid::messaging::Connection *","close", 1, self )); } arg1 = reinterpret_cast< qpid::messaging::Connection * >(argp1); { static VALUE eMessagingError = rb_define_class("MessagingError", rb_eStandardError); try { (arg1)->close(); } catch(qpid::messaging::ConnectionError& error) { static VALUE merror = rb_define_class("ConnectionError", eMessagingError); rb_raise(merror, "%s", error.what()); } catch(qpid::messaging::TransportFailure& error) { static VALUE merror = rb_define_class("TransportFailure", eMessagingError); rb_raise(merror, "%s", error.what()); } catch(qpid::messaging::TransactionAborted& error) { static VALUE merror = rb_define_class("TransactionAborted", eMessagingError); rb_raise(merror, "%s", error.what()); } catch(qpid::messaging::TransactionUnknown& error) { static VALUE merror = rb_define_class("TransactionUnknown", eMessagingError); rb_raise(merror, "%s", error.what()); } catch(qpid::messaging::TransactionError& error) { static VALUE merror = rb_define_class("TransactionError", eMessagingError); rb_raise(merror, "%s", error.what()); } catch(qpid::messaging::UnauthorizedAccess& error) { static VALUE merror = rb_define_class("UnauthorizedAccess", eMessagingError); rb_raise(merror, "%s", error.what()); } catch(qpid::messaging::SessionError& error) { static VALUE merror = rb_define_class("SessionError", eMessagingError); rb_raise(merror, "%s", error.what()); } catch(qpid::messaging::TargetCapacityExceeded& error) { static VALUE merror = rb_define_class("TargetCapacityExceeded", eMessagingError); rb_raise(merror, "%s", error.what()); } catch(qpid::messaging::SendError& error) { static VALUE merror = rb_define_class("SendError", eMessagingError); rb_raise(merror, "%s", error.what()); } catch(qpid::messaging::SenderError& error) { static VALUE merror = rb_define_class("SenderError", eMessagingError); rb_raise(merror, "%s", error.what()); } catch(qpid::messaging::NoMessageAvailable& error) { static VALUE merror = rb_define_class("NoMessageAvailable", eMessagingError); rb_raise(merror, "%s", error.what()); } catch(qpid::messaging::FetchError& error) { static VALUE merror = rb_define_class("FetchError", eMessagingError); rb_raise(merror, "%s", error.what()); } catch(qpid::messaging::ReceiverError& error) { static VALUE merror = rb_define_class("ReceiverError", eMessagingError); rb_raise(merror, "%s", error.what()); } catch(qpid::messaging::InvalidOptionString& error) { static VALUE merror = rb_define_class("InvalidOptionString", eMessagingError); rb_raise(merror, "%s", error.what()); } catch(qpid::messaging::KeyError& error) { static VALUE merror = rb_define_class("KeyError", eMessagingError); rb_raise(merror, "%s", error.what()); } catch(qpid::messaging::AssertionFailed& error) { static VALUE merror = rb_define_class("AssertionFailed", eMessagingError); rb_raise(merror, "%s", error.what()); } catch(qpid::messaging::NotFound& error) { static VALUE merror = rb_define_class("NotFound", eMessagingError); rb_raise(merror, "%s", error.what()); } catch(qpid::messaging::ResolutionError& error) { static VALUE merror = rb_define_class("ResolutionError", eMessagingError); rb_raise(merror, "%s", error.what()); } catch(qpid::messaging::MalformedAddress& error) { static VALUE merror = rb_define_class("MalformedAddress", eMessagingError); rb_raise(merror, "%s", error.what()); } catch(qpid::messaging::AddressError& error) { static VALUE merror = rb_define_class("AddressError", eMessagingError); rb_raise(merror, "%s", error.what()); } catch(qpid::messaging::LinkError& error) { static VALUE merror = rb_define_class("LinkError", eMessagingError); rb_raise(merror, "%s", error.what()); } catch(qpid::messaging::MessagingException& error) { rb_raise(eMessagingError, "%s", error.what()); } } return Qnil; fail: return Qnil; }
createSession(*args)
click to toggle source
SWIGINTERN VALUE _wrap_Connection_createSession(int nargs, VALUE *args, VALUE self) { int argc; VALUE argv[3]; int ii; argc = nargs + 1; argv[0] = self; if (argc > 3) SWIG_fail; for (ii = 1; (ii < argc); ++ii) { argv[ii] = args[ii-1]; } if (argc == 1) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_qpid__messaging__Connection, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Connection_createSession__SWIG_1(nargs, args, self); } } if (argc == 2) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_qpid__messaging__Connection, 0); _v = SWIG_CheckState(res); if (_v) { int res = SWIG_AsPtr_std_string(argv[1], (std::string**)(0)); _v = SWIG_CheckState(res); if (_v) { return _wrap_Connection_createSession__SWIG_0(nargs, args, self); } } } fail: Ruby_Format_OverloadedError( argc, 3, "Connection.createSession", " qpid::messaging::Session Connection.createSession(std::string const &name)\n" " qpid::messaging::Session Connection.createSession()\n"); return Qnil; }
createTransactionalSession(*args)
click to toggle source
SWIGINTERN VALUE _wrap_Connection_createTransactionalSession(int nargs, VALUE *args, VALUE self) { int argc; VALUE argv[3]; int ii; argc = nargs + 1; argv[0] = self; if (argc > 3) SWIG_fail; for (ii = 1; (ii < argc); ++ii) { argv[ii] = args[ii-1]; } if (argc == 1) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_qpid__messaging__Connection, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Connection_createTransactionalSession__SWIG_1(nargs, args, self); } } if (argc == 2) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_qpid__messaging__Connection, 0); _v = SWIG_CheckState(res); if (_v) { int res = SWIG_AsPtr_std_string(argv[1], (std::string**)(0)); _v = SWIG_CheckState(res); if (_v) { return _wrap_Connection_createTransactionalSession__SWIG_0(nargs, args, self); } } } fail: Ruby_Format_OverloadedError( argc, 3, "Connection.createTransactionalSession", " qpid::messaging::Session Connection.createTransactionalSession(std::string const &name)\n" " qpid::messaging::Session Connection.createTransactionalSession()\n"); return Qnil; }
getAuthenticatedUsername(*args)
click to toggle source
SWIGINTERN VALUE _wrap_Connection_getAuthenticatedUsername(int argc, VALUE *argv, VALUE self) { qpid::messaging::Connection *arg1 = (qpid::messaging::Connection *) 0 ; void *argp1 = 0 ; int res1 = 0 ; std::string result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_qpid__messaging__Connection, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "qpid::messaging::Connection *","getAuthenticatedUsername", 1, self )); } arg1 = reinterpret_cast< qpid::messaging::Connection * >(argp1); { static VALUE eMessagingError = rb_define_class("MessagingError", rb_eStandardError); try { result = (arg1)->getAuthenticatedUsername(); } catch(qpid::messaging::ConnectionError& error) { static VALUE merror = rb_define_class("ConnectionError", eMessagingError); rb_raise(merror, "%s", error.what()); } catch(qpid::messaging::TransportFailure& error) { static VALUE merror = rb_define_class("TransportFailure", eMessagingError); rb_raise(merror, "%s", error.what()); } catch(qpid::messaging::TransactionAborted& error) { static VALUE merror = rb_define_class("TransactionAborted", eMessagingError); rb_raise(merror, "%s", error.what()); } catch(qpid::messaging::TransactionUnknown& error) { static VALUE merror = rb_define_class("TransactionUnknown", eMessagingError); rb_raise(merror, "%s", error.what()); } catch(qpid::messaging::TransactionError& error) { static VALUE merror = rb_define_class("TransactionError", eMessagingError); rb_raise(merror, "%s", error.what()); } catch(qpid::messaging::UnauthorizedAccess& error) { static VALUE merror = rb_define_class("UnauthorizedAccess", eMessagingError); rb_raise(merror, "%s", error.what()); } catch(qpid::messaging::SessionError& error) { static VALUE merror = rb_define_class("SessionError", eMessagingError); rb_raise(merror, "%s", error.what()); } catch(qpid::messaging::TargetCapacityExceeded& error) { static VALUE merror = rb_define_class("TargetCapacityExceeded", eMessagingError); rb_raise(merror, "%s", error.what()); } catch(qpid::messaging::SendError& error) { static VALUE merror = rb_define_class("SendError", eMessagingError); rb_raise(merror, "%s", error.what()); } catch(qpid::messaging::SenderError& error) { static VALUE merror = rb_define_class("SenderError", eMessagingError); rb_raise(merror, "%s", error.what()); } catch(qpid::messaging::NoMessageAvailable& error) { static VALUE merror = rb_define_class("NoMessageAvailable", eMessagingError); rb_raise(merror, "%s", error.what()); } catch(qpid::messaging::FetchError& error) { static VALUE merror = rb_define_class("FetchError", eMessagingError); rb_raise(merror, "%s", error.what()); } catch(qpid::messaging::ReceiverError& error) { static VALUE merror = rb_define_class("ReceiverError", eMessagingError); rb_raise(merror, "%s", error.what()); } catch(qpid::messaging::InvalidOptionString& error) { static VALUE merror = rb_define_class("InvalidOptionString", eMessagingError); rb_raise(merror, "%s", error.what()); } catch(qpid::messaging::KeyError& error) { static VALUE merror = rb_define_class("KeyError", eMessagingError); rb_raise(merror, "%s", error.what()); } catch(qpid::messaging::AssertionFailed& error) { static VALUE merror = rb_define_class("AssertionFailed", eMessagingError); rb_raise(merror, "%s", error.what()); } catch(qpid::messaging::NotFound& error) { static VALUE merror = rb_define_class("NotFound", eMessagingError); rb_raise(merror, "%s", error.what()); } catch(qpid::messaging::ResolutionError& error) { static VALUE merror = rb_define_class("ResolutionError", eMessagingError); rb_raise(merror, "%s", error.what()); } catch(qpid::messaging::MalformedAddress& error) { static VALUE merror = rb_define_class("MalformedAddress", eMessagingError); rb_raise(merror, "%s", error.what()); } catch(qpid::messaging::AddressError& error) { static VALUE merror = rb_define_class("AddressError", eMessagingError); rb_raise(merror, "%s", error.what()); } catch(qpid::messaging::LinkError& error) { static VALUE merror = rb_define_class("LinkError", eMessagingError); rb_raise(merror, "%s", error.what()); } catch(qpid::messaging::MessagingException& error) { rb_raise(eMessagingError, "%s", error.what()); } } vresult = SWIG_From_std_string(static_cast< std::string >(result)); return vresult; fail: return Qnil; }
getSession(*args)
click to toggle source
SWIGINTERN VALUE _wrap_Connection_getSession(int argc, VALUE *argv, VALUE self) { qpid::messaging::Connection *arg1 = (qpid::messaging::Connection *) 0 ; std::string *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 = SWIG_OLDOBJ ; qpid::messaging::Session result; VALUE vresult = Qnil; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_qpid__messaging__Connection, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "qpid::messaging::Connection const *","getSession", 1, self )); } arg1 = reinterpret_cast< qpid::messaging::Connection * >(argp1); { std::string *ptr = (std::string *)0; res2 = SWIG_AsPtr_std_string(argv[0], &ptr); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","getSession", 2, argv[0] )); } if (!ptr) { SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","getSession", 2, argv[0])); } arg2 = ptr; } { static VALUE eMessagingError = rb_define_class("MessagingError", rb_eStandardError); try { result = ((qpid::messaging::Connection const *)arg1)->getSession((std::string const &)*arg2); } catch(qpid::messaging::ConnectionError& error) { static VALUE merror = rb_define_class("ConnectionError", eMessagingError); rb_raise(merror, "%s", error.what()); } catch(qpid::messaging::TransportFailure& error) { static VALUE merror = rb_define_class("TransportFailure", eMessagingError); rb_raise(merror, "%s", error.what()); } catch(qpid::messaging::TransactionAborted& error) { static VALUE merror = rb_define_class("TransactionAborted", eMessagingError); rb_raise(merror, "%s", error.what()); } catch(qpid::messaging::TransactionUnknown& error) { static VALUE merror = rb_define_class("TransactionUnknown", eMessagingError); rb_raise(merror, "%s", error.what()); } catch(qpid::messaging::TransactionError& error) { static VALUE merror = rb_define_class("TransactionError", eMessagingError); rb_raise(merror, "%s", error.what()); } catch(qpid::messaging::UnauthorizedAccess& error) { static VALUE merror = rb_define_class("UnauthorizedAccess", eMessagingError); rb_raise(merror, "%s", error.what()); } catch(qpid::messaging::SessionError& error) { static VALUE merror = rb_define_class("SessionError", eMessagingError); rb_raise(merror, "%s", error.what()); } catch(qpid::messaging::TargetCapacityExceeded& error) { static VALUE merror = rb_define_class("TargetCapacityExceeded", eMessagingError); rb_raise(merror, "%s", error.what()); } catch(qpid::messaging::SendError& error) { static VALUE merror = rb_define_class("SendError", eMessagingError); rb_raise(merror, "%s", error.what()); } catch(qpid::messaging::SenderError& error) { static VALUE merror = rb_define_class("SenderError", eMessagingError); rb_raise(merror, "%s", error.what()); } catch(qpid::messaging::NoMessageAvailable& error) { static VALUE merror = rb_define_class("NoMessageAvailable", eMessagingError); rb_raise(merror, "%s", error.what()); } catch(qpid::messaging::FetchError& error) { static VALUE merror = rb_define_class("FetchError", eMessagingError); rb_raise(merror, "%s", error.what()); } catch(qpid::messaging::ReceiverError& error) { static VALUE merror = rb_define_class("ReceiverError", eMessagingError); rb_raise(merror, "%s", error.what()); } catch(qpid::messaging::InvalidOptionString& error) { static VALUE merror = rb_define_class("InvalidOptionString", eMessagingError); rb_raise(merror, "%s", error.what()); } catch(qpid::messaging::KeyError& error) { static VALUE merror = rb_define_class("KeyError", eMessagingError); rb_raise(merror, "%s", error.what()); } catch(qpid::messaging::AssertionFailed& error) { static VALUE merror = rb_define_class("AssertionFailed", eMessagingError); rb_raise(merror, "%s", error.what()); } catch(qpid::messaging::NotFound& error) { static VALUE merror = rb_define_class("NotFound", eMessagingError); rb_raise(merror, "%s", error.what()); } catch(qpid::messaging::ResolutionError& error) { static VALUE merror = rb_define_class("ResolutionError", eMessagingError); rb_raise(merror, "%s", error.what()); } catch(qpid::messaging::MalformedAddress& error) { static VALUE merror = rb_define_class("MalformedAddress", eMessagingError); rb_raise(merror, "%s", error.what()); } catch(qpid::messaging::AddressError& error) { static VALUE merror = rb_define_class("AddressError", eMessagingError); rb_raise(merror, "%s", error.what()); } catch(qpid::messaging::LinkError& error) { static VALUE merror = rb_define_class("LinkError", eMessagingError); rb_raise(merror, "%s", error.what()); } catch(qpid::messaging::MessagingException& error) { rb_raise(eMessagingError, "%s", error.what()); } } vresult = SWIG_NewPointerObj((new qpid::messaging::Session(static_cast< const qpid::messaging::Session& >(result))), SWIGTYPE_p_qpid__messaging__Session, SWIG_POINTER_OWN | 0 ); if (SWIG_IsNewObj(res2)) delete arg2; return vresult; fail: if (SWIG_IsNewObj(res2)) delete arg2; return Qnil; }
getUrl(*args)
click to toggle source
SWIGINTERN VALUE _wrap_Connection_getUrl(int argc, VALUE *argv, VALUE self) { qpid::messaging::Connection *arg1 = (qpid::messaging::Connection *) 0 ; void *argp1 = 0 ; int res1 = 0 ; std::string result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_qpid__messaging__Connection, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "qpid::messaging::Connection const *","getUrl", 1, self )); } arg1 = reinterpret_cast< qpid::messaging::Connection * >(argp1); { static VALUE eMessagingError = rb_define_class("MessagingError", rb_eStandardError); try { result = ((qpid::messaging::Connection const *)arg1)->getUrl(); } catch(qpid::messaging::ConnectionError& error) { static VALUE merror = rb_define_class("ConnectionError", eMessagingError); rb_raise(merror, "%s", error.what()); } catch(qpid::messaging::TransportFailure& error) { static VALUE merror = rb_define_class("TransportFailure", eMessagingError); rb_raise(merror, "%s", error.what()); } catch(qpid::messaging::TransactionAborted& error) { static VALUE merror = rb_define_class("TransactionAborted", eMessagingError); rb_raise(merror, "%s", error.what()); } catch(qpid::messaging::TransactionUnknown& error) { static VALUE merror = rb_define_class("TransactionUnknown", eMessagingError); rb_raise(merror, "%s", error.what()); } catch(qpid::messaging::TransactionError& error) { static VALUE merror = rb_define_class("TransactionError", eMessagingError); rb_raise(merror, "%s", error.what()); } catch(qpid::messaging::UnauthorizedAccess& error) { static VALUE merror = rb_define_class("UnauthorizedAccess", eMessagingError); rb_raise(merror, "%s", error.what()); } catch(qpid::messaging::SessionError& error) { static VALUE merror = rb_define_class("SessionError", eMessagingError); rb_raise(merror, "%s", error.what()); } catch(qpid::messaging::TargetCapacityExceeded& error) { static VALUE merror = rb_define_class("TargetCapacityExceeded", eMessagingError); rb_raise(merror, "%s", error.what()); } catch(qpid::messaging::SendError& error) { static VALUE merror = rb_define_class("SendError", eMessagingError); rb_raise(merror, "%s", error.what()); } catch(qpid::messaging::SenderError& error) { static VALUE merror = rb_define_class("SenderError", eMessagingError); rb_raise(merror, "%s", error.what()); } catch(qpid::messaging::NoMessageAvailable& error) { static VALUE merror = rb_define_class("NoMessageAvailable", eMessagingError); rb_raise(merror, "%s", error.what()); } catch(qpid::messaging::FetchError& error) { static VALUE merror = rb_define_class("FetchError", eMessagingError); rb_raise(merror, "%s", error.what()); } catch(qpid::messaging::ReceiverError& error) { static VALUE merror = rb_define_class("ReceiverError", eMessagingError); rb_raise(merror, "%s", error.what()); } catch(qpid::messaging::InvalidOptionString& error) { static VALUE merror = rb_define_class("InvalidOptionString", eMessagingError); rb_raise(merror, "%s", error.what()); } catch(qpid::messaging::KeyError& error) { static VALUE merror = rb_define_class("KeyError", eMessagingError); rb_raise(merror, "%s", error.what()); } catch(qpid::messaging::AssertionFailed& error) { static VALUE merror = rb_define_class("AssertionFailed", eMessagingError); rb_raise(merror, "%s", error.what()); } catch(qpid::messaging::NotFound& error) { static VALUE merror = rb_define_class("NotFound", eMessagingError); rb_raise(merror, "%s", error.what()); } catch(qpid::messaging::ResolutionError& error) { static VALUE merror = rb_define_class("ResolutionError", eMessagingError); rb_raise(merror, "%s", error.what()); } catch(qpid::messaging::MalformedAddress& error) { static VALUE merror = rb_define_class("MalformedAddress", eMessagingError); rb_raise(merror, "%s", error.what()); } catch(qpid::messaging::AddressError& error) { static VALUE merror = rb_define_class("AddressError", eMessagingError); rb_raise(merror, "%s", error.what()); } catch(qpid::messaging::LinkError& error) { static VALUE merror = rb_define_class("LinkError", eMessagingError); rb_raise(merror, "%s", error.what()); } catch(qpid::messaging::MessagingException& error) { rb_raise(eMessagingError, "%s", error.what()); } } vresult = SWIG_From_std_string(static_cast< std::string >(result)); return vresult; fail: return Qnil; }
isOpen(*args)
click to toggle source
SWIGINTERN VALUE _wrap_Connection_isOpen(int nargs, VALUE *args, VALUE self) { int argc; VALUE argv[2]; int ii; argc = nargs + 1; argv[0] = self; if (argc > 2) SWIG_fail; for (ii = 1; (ii < argc); ++ii) { argv[ii] = args[ii-1]; } if (argc == 1) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_qpid__messaging__Connection, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Connection_isOpen__SWIG_0(nargs, args, self); } } if (argc == 1) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_qpid__messaging__Connection, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Connection_isOpen__SWIG_1(nargs, args, self); } } fail: Ruby_Format_OverloadedError( argc, 2, "Connection.isOpen", " bool Connection.isOpen()\n" " bool Connection.isOpen()\n"); return Qnil; }
open(*args)
click to toggle source
SWIGINTERN VALUE _wrap_Connection_open(int argc, VALUE *argv, VALUE self) { qpid::messaging::Connection *arg1 = (qpid::messaging::Connection *) 0 ; void *argp1 = 0 ; int res1 = 0 ; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_qpid__messaging__Connection, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "qpid::messaging::Connection *","open", 1, self )); } arg1 = reinterpret_cast< qpid::messaging::Connection * >(argp1); { static VALUE eMessagingError = rb_define_class("MessagingError", rb_eStandardError); try { (arg1)->open(); } catch(qpid::messaging::ConnectionError& error) { static VALUE merror = rb_define_class("ConnectionError", eMessagingError); rb_raise(merror, "%s", error.what()); } catch(qpid::messaging::TransportFailure& error) { static VALUE merror = rb_define_class("TransportFailure", eMessagingError); rb_raise(merror, "%s", error.what()); } catch(qpid::messaging::TransactionAborted& error) { static VALUE merror = rb_define_class("TransactionAborted", eMessagingError); rb_raise(merror, "%s", error.what()); } catch(qpid::messaging::TransactionUnknown& error) { static VALUE merror = rb_define_class("TransactionUnknown", eMessagingError); rb_raise(merror, "%s", error.what()); } catch(qpid::messaging::TransactionError& error) { static VALUE merror = rb_define_class("TransactionError", eMessagingError); rb_raise(merror, "%s", error.what()); } catch(qpid::messaging::UnauthorizedAccess& error) { static VALUE merror = rb_define_class("UnauthorizedAccess", eMessagingError); rb_raise(merror, "%s", error.what()); } catch(qpid::messaging::SessionError& error) { static VALUE merror = rb_define_class("SessionError", eMessagingError); rb_raise(merror, "%s", error.what()); } catch(qpid::messaging::TargetCapacityExceeded& error) { static VALUE merror = rb_define_class("TargetCapacityExceeded", eMessagingError); rb_raise(merror, "%s", error.what()); } catch(qpid::messaging::SendError& error) { static VALUE merror = rb_define_class("SendError", eMessagingError); rb_raise(merror, "%s", error.what()); } catch(qpid::messaging::SenderError& error) { static VALUE merror = rb_define_class("SenderError", eMessagingError); rb_raise(merror, "%s", error.what()); } catch(qpid::messaging::NoMessageAvailable& error) { static VALUE merror = rb_define_class("NoMessageAvailable", eMessagingError); rb_raise(merror, "%s", error.what()); } catch(qpid::messaging::FetchError& error) { static VALUE merror = rb_define_class("FetchError", eMessagingError); rb_raise(merror, "%s", error.what()); } catch(qpid::messaging::ReceiverError& error) { static VALUE merror = rb_define_class("ReceiverError", eMessagingError); rb_raise(merror, "%s", error.what()); } catch(qpid::messaging::InvalidOptionString& error) { static VALUE merror = rb_define_class("InvalidOptionString", eMessagingError); rb_raise(merror, "%s", error.what()); } catch(qpid::messaging::KeyError& error) { static VALUE merror = rb_define_class("KeyError", eMessagingError); rb_raise(merror, "%s", error.what()); } catch(qpid::messaging::AssertionFailed& error) { static VALUE merror = rb_define_class("AssertionFailed", eMessagingError); rb_raise(merror, "%s", error.what()); } catch(qpid::messaging::NotFound& error) { static VALUE merror = rb_define_class("NotFound", eMessagingError); rb_raise(merror, "%s", error.what()); } catch(qpid::messaging::ResolutionError& error) { static VALUE merror = rb_define_class("ResolutionError", eMessagingError); rb_raise(merror, "%s", error.what()); } catch(qpid::messaging::MalformedAddress& error) { static VALUE merror = rb_define_class("MalformedAddress", eMessagingError); rb_raise(merror, "%s", error.what()); } catch(qpid::messaging::AddressError& error) { static VALUE merror = rb_define_class("AddressError", eMessagingError); rb_raise(merror, "%s", error.what()); } catch(qpid::messaging::LinkError& error) { static VALUE merror = rb_define_class("LinkError", eMessagingError); rb_raise(merror, "%s", error.what()); } catch(qpid::messaging::MessagingException& error) { rb_raise(eMessagingError, "%s", error.what()); } } return Qnil; fail: return Qnil; }
reconnect(*args)
click to toggle source
SWIGINTERN VALUE _wrap_Connection_reconnect(int nargs, VALUE *args, VALUE self) { int argc; VALUE argv[3]; int ii; argc = nargs + 1; argv[0] = self; if (argc > 3) SWIG_fail; for (ii = 1; (ii < argc); ++ii) { argv[ii] = args[ii-1]; } if (argc == 1) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_qpid__messaging__Connection, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Connection_reconnect__SWIG_1(nargs, args, self); } } if (argc == 2) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_qpid__messaging__Connection, 0); _v = SWIG_CheckState(res); if (_v) { int res = SWIG_AsPtr_std_string(argv[1], (std::string**)(0)); _v = SWIG_CheckState(res); if (_v) { return _wrap_Connection_reconnect__SWIG_0(nargs, args, self); } } } fail: Ruby_Format_OverloadedError( argc, 3, "Connection.reconnect", " void Connection.reconnect(std::string const &url)\n" " void Connection.reconnect()\n"); return Qnil; }
setOption(*args)
click to toggle source
SWIGINTERN VALUE _wrap_Connection_setOption(int argc, VALUE *argv, VALUE self) { qpid::messaging::Connection *arg1 = (qpid::messaging::Connection *) 0 ; std::string *arg2 = 0 ; qpid::types::Variant *arg3 = 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 = SWIG_OLDOBJ ; if ((argc < 2) || (argc > 2)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_qpid__messaging__Connection, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "qpid::messaging::Connection *","setOption", 1, self )); } arg1 = reinterpret_cast< qpid::messaging::Connection * >(argp1); { std::string *ptr = (std::string *)0; res2 = SWIG_AsPtr_std_string(argv[0], &ptr); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::string const &","setOption", 2, argv[0] )); } if (!ptr) { SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","setOption", 2, argv[0])); } arg2 = ptr; } { arg3 = new qpid::types::Variant(RbToVariant(argv[1])); } { static VALUE eMessagingError = rb_define_class("MessagingError", rb_eStandardError); try { (arg1)->setOption((std::string const &)*arg2,(qpid::types::Variant const &)*arg3); } catch(qpid::messaging::ConnectionError& error) { static VALUE merror = rb_define_class("ConnectionError", eMessagingError); rb_raise(merror, "%s", error.what()); } catch(qpid::messaging::TransportFailure& error) { static VALUE merror = rb_define_class("TransportFailure", eMessagingError); rb_raise(merror, "%s", error.what()); } catch(qpid::messaging::TransactionAborted& error) { static VALUE merror = rb_define_class("TransactionAborted", eMessagingError); rb_raise(merror, "%s", error.what()); } catch(qpid::messaging::TransactionUnknown& error) { static VALUE merror = rb_define_class("TransactionUnknown", eMessagingError); rb_raise(merror, "%s", error.what()); } catch(qpid::messaging::TransactionError& error) { static VALUE merror = rb_define_class("TransactionError", eMessagingError); rb_raise(merror, "%s", error.what()); } catch(qpid::messaging::UnauthorizedAccess& error) { static VALUE merror = rb_define_class("UnauthorizedAccess", eMessagingError); rb_raise(merror, "%s", error.what()); } catch(qpid::messaging::SessionError& error) { static VALUE merror = rb_define_class("SessionError", eMessagingError); rb_raise(merror, "%s", error.what()); } catch(qpid::messaging::TargetCapacityExceeded& error) { static VALUE merror = rb_define_class("TargetCapacityExceeded", eMessagingError); rb_raise(merror, "%s", error.what()); } catch(qpid::messaging::SendError& error) { static VALUE merror = rb_define_class("SendError", eMessagingError); rb_raise(merror, "%s", error.what()); } catch(qpid::messaging::SenderError& error) { static VALUE merror = rb_define_class("SenderError", eMessagingError); rb_raise(merror, "%s", error.what()); } catch(qpid::messaging::NoMessageAvailable& error) { static VALUE merror = rb_define_class("NoMessageAvailable", eMessagingError); rb_raise(merror, "%s", error.what()); } catch(qpid::messaging::FetchError& error) { static VALUE merror = rb_define_class("FetchError", eMessagingError); rb_raise(merror, "%s", error.what()); } catch(qpid::messaging::ReceiverError& error) { static VALUE merror = rb_define_class("ReceiverError", eMessagingError); rb_raise(merror, "%s", error.what()); } catch(qpid::messaging::InvalidOptionString& error) { static VALUE merror = rb_define_class("InvalidOptionString", eMessagingError); rb_raise(merror, "%s", error.what()); } catch(qpid::messaging::KeyError& error) { static VALUE merror = rb_define_class("KeyError", eMessagingError); rb_raise(merror, "%s", error.what()); } catch(qpid::messaging::AssertionFailed& error) { static VALUE merror = rb_define_class("AssertionFailed", eMessagingError); rb_raise(merror, "%s", error.what()); } catch(qpid::messaging::NotFound& error) { static VALUE merror = rb_define_class("NotFound", eMessagingError); rb_raise(merror, "%s", error.what()); } catch(qpid::messaging::ResolutionError& error) { static VALUE merror = rb_define_class("ResolutionError", eMessagingError); rb_raise(merror, "%s", error.what()); } catch(qpid::messaging::MalformedAddress& error) { static VALUE merror = rb_define_class("MalformedAddress", eMessagingError); rb_raise(merror, "%s", error.what()); } catch(qpid::messaging::AddressError& error) { static VALUE merror = rb_define_class("AddressError", eMessagingError); rb_raise(merror, "%s", error.what()); } catch(qpid::messaging::LinkError& error) { static VALUE merror = rb_define_class("LinkError", eMessagingError); rb_raise(merror, "%s", error.what()); } catch(qpid::messaging::MessagingException& error) { rb_raise(eMessagingError, "%s", error.what()); } } if (SWIG_IsNewObj(res2)) delete arg2; { delete arg3; } return Qnil; fail: if (SWIG_IsNewObj(res2)) delete arg2; { delete arg3; } return Qnil; }