From 44d2ef1080ca99072d97019109be13610605e15c Mon Sep 17 00:00:00 2001 From: Ted Ross Date: Mon, 19 Jul 2010 19:33:01 +0000 Subject: QPID-2589 - Patch from Chuck Rolke Added a chapter in the docs for the .NET binding. Removed the empty doc/book/build directory from SVN. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@965596 13f79535-47bb-0310-9956-ffa450edef68 --- qpid/doc/book/src/Programming-In-Apache-Qpid.xml | 1746 ++++++++++++++++++++++ 1 file changed, 1746 insertions(+) (limited to 'qpid/doc/book/src/Programming-In-Apache-Qpid.xml') diff --git a/qpid/doc/book/src/Programming-In-Apache-Qpid.xml b/qpid/doc/book/src/Programming-In-Apache-Qpid.xml index 931b7c15f2..0b957cd0d7 100644 --- a/qpid/doc/book/src/Programming-In-Apache-Qpid.xml +++ b/qpid/doc/book/src/Programming-In-Apache-Qpid.xml @@ -3702,6 +3702,1752 @@ using (TransactionScope ts = new TransactionScope()) + + The .NET Binding for the C++ Messaging Client + + The C++ Messaging Client unmanaged code is exposed to .NET + code through an interoperability DLL. This DLL wrapper + is a thin layer that serves primarily by translating between + the managed .NET programs and the unmanaged C++ libraries. + + + This chapter describes the mapping provided by the .NET binding classes. + +
+ .NET Binding Class: Address + + .NET Binding Class: Address + + + + + + .NET Binding Class: Address + + + Language + Syntax + + + + + C++ + class Address + + + .NET + public ref class Address + + + Constructor + + + C++ + Address(); + + + .NET + public Address(); + + + Constructor + + + C++ + Address(const std::string& address); + + + .NET + public Address(string address); + + + Constructor + + + C++ + Address(const std::string& name, const std::string& subject, const qpid::types::Variant::Map& options, const std::string& type = ""); + + + .NET + public Address(string name, string subject, Dictionary<string, object> options); + + + .NET + public Address(string name, string subject, Dictionary<string, object> options, string type); + + + Copy constructor + + + C++ + Address(const Address& address); + + + .NET + public Address(Address address); + + + Destructor + + + C++ + ~Address(); + + + .NET + ~Address(); + + + Finalizer + + + C++ + n/a + + + .NET + !Address(); + + + Copy assignment operator + + + C++ + Address& operator=(const Address&); + + + .NET + public Address op_Assign(Address rhs); + + + Property: Name + + + C++ + const std::string& getName() const; + + + C++ + void setName(const std::string&); + + + .NET + public string Name { get; set; } + + + Property: Subject + + + C++ + const std::string& getSubject() const; + + + C++ + void setSubject(const std::string&); + + + .NET + public string Subject { get; set; } + + + Property: Options + + + C++ + const qpid::types::Variant::Map& getOptions() const; + + + C++ + qpid::types::Variant::Map& getOptions(); + + + C++ + void setOptions(const qpid::types::Variant::Map&); + + + .NET + public Dictionary<string, object> Options { get; set; } + + + Property: Type + + + C++ + std::string getType() const; + + + C++ + void setType(const std::string&); + + + .NET + public string Type { get; set; } + + + Miscellaneous + + + C++ + std::string str() const; + + + .NET + public string ToStr(); + + + Miscellaneous + + + C++ + operator bool() const; + + + .NET + n/a + + + Miscellaneous + + + C++ + bool operator !() const; + + + .NET + n/a + + + +
+
+
+ .NET Binding Class: Connection + + .NET Binding Class: Connection + + + + + + .NET Binding Class: Connection + + + Language + Syntax + + + + + C++ + class Connection : public qpid::messaging::Handle<ConnectionImpl> + + + .NET + public ref class Connection + + + Constructor + + + C++ + Connection(ConnectionImpl* impl); + + + .NET + n/a + + + Constructor + + + C++ + Connection(); + + + .NET + TODO: + + + Constructor + + + C++ + Connection(const std::string& url, const qpid::types::Variant::Map& options = qpid::types::Variant::Map()); + + + .NET + public Connection(string url); + + + .NET + public Connection(string url, Dictionary<string, object> options); + + + + Constructor + + + C++ + Connection(const std::string& url, const std::string& options); + + + .NET + public Connection(string url, string options); + + + + Copy constructor + + + C++ + Connection(const Connection&); + + + .NET + public Connection(Connection connection); + + + Destructor + + + C++ + ~Connection(); + + + .NET + ~Connection(); + + + Finalizer + + + C++ + n/a + + + .NET + !Connection(); + + + Copy assignment operator + + + C++ + Connection& operator=(const Connection&); + + + .NET + public Connection op_Assign(Connection rhs); + + + Method: SetOption + + + C++ + void setOption(const std::string& name, const qpid::types::Variant& value); + + + .NET + public void SetOption(string name, object value); + + + Method: open + + + C++ + void open(); + + + .NET + public void Open(); + + + Property: isOpen + + + C++ + bool isOpen(); + + + .NET + public bool IsOpen { get; } + + + Method: close + + + C++ + void close(); + + + .NET + public void Close(); + + + Method: createTransactionalSession + + + C++ + Session createTransactionalSession(const std::string& name = std::string()); + + + .NET + public Session CreateTransactionalSession(); + + + .NET + public Session CreateTransactionalSession(string name); + + + Method: createSession + + + C++ + Session createSession(const std::string& name = std::string()); + + + .NET + public Session CreateSession(); + + + .NET + public Session CreateSession(string name); + + + Method: getSession + + + C++ + Session getSession(const std::string& name) const; + + + .NET + public Session GetSession(string name); + + + Property: AuthenticatedUsername + + + C++ + std::string getAuthenticatedUsername(); + + + .NET + public string GetAuthenticatedUsername(); + + + +
+
+
+ .NET Binding Class: Duration + + .NET Binding Class: Duration + + + + + + .NET Binding Class: Duration + + + Language + Syntax + + + + + C++ + class Duration + + + .NET + public ref class Duration + + + Constructor + + + C++ + explicit Duration(uint64_t milliseconds); + + + .NET + public Duration(ulong mS); + + + Copy constructor + + + C++ + n/a + + + .NET + public Duration(Duration rhs); + + + Destructor + + + C++ + default + + + .NET + default + + + Finalizer + + + C++ + n/a + + + .NET + default + + + Property: Milliseconds + + + C++ + uint64_t getMilliseconds() const; + + + .NET + public ulong Milliseconds { get; } + + + Operator: * + + + C++ + Duration operator*(const Duration& duration, uint64_t multiplier); + + + .NET + public static Duration operator *(Duration dur, ulong multiplier); + + + .NET + public static Duration Multiply(Duration dur, ulong multiplier); + + + C++ + Duration operator*(uint64_t multiplier, const Duration& duration); + + + .NET + public static Duration operator *(ulong multiplier, Duration dur); + + + .NET + public static Duration Multiply(ulong multiplier, Duration dur); + + + Constants + + + C++ + static const Duration FOREVER; + + + C++ + static const Duration IMMEDIATE; + + + C++ + static const Duration SECOND; + + + C++ + static const Duration MINUTE; + + + .NET + public sealed class DurationConstants + + + .NET + public static Duration FORVER; + + + .NET + public static Duration IMMEDIATE; + + + .NET + public static Duration MINUTE; + + + .NET + public static Duration SECOND; + + + +
+
+
+ .NET Binding Class: Message + + .NET Binding Class: Message + + + + + + .NET Binding Class: Message + + + Language + Syntax + + + + + C++ + class Message + + + .NET + public ref class Message + + + Constructor + + + C++ + Message(const std::string& bytes = std::string()); + + + .NET + Message(); + + + .NET + Message(System::String ^ theStr); + + + .NET + Message(System::Object ^ theValue); + + + .NET + Message(array<System::Byte> ^ bytes); + + + Constructor + + + C++ + Message(const char*, size_t); + + + .NET + public Message(byte[] bytes, int offset, int size); + + + + Copy constructor + + + C++ + Message(const Message&); + + + .NET + public Message(Message message); + + + + Copy assignment operator + + + C++ + Message& operator=(const Message&); + + + .NET + public Message op_Assign(Message rhs); + + + Destructor + + + C++ + ~Message(); + + + .NET + ~Message(); + + + Finalizer + + + C++ + n/a + + + .NET + !Message() + + + Property: ReplyTo + + + C++ + void setReplyTo(const Address&); + + + C++ + const Address& getReplyTo() const; + + + .NET + public Address ReplyTo { get; set; } + + + Property: Subject + + + C++ + void setSubject(const std::string&); + + + C++ + const std::string& getSubject() const; + + + .NET + public string Subject { get; set; } + + + Property: ContentType + + + C++ + void setContentType(const std::string&); + + + C++ + const std::string& getContentType() const; + + + .NET + public string ContentType { get; set; } + + + Property: MessageId + + + C++ + void setMessageId(const std::string&); + + + C++ + const std::string& getMessageId() const; + + + .NET + public string MessageId { get; set; } + + + Property: UserId + + + C++ + void setUserId(const std::string&); + + + C++ + const std::string& getUserId() const; + + + .NET + public string UserId { get; set; } + + + Property: CorrelationId + + + C++ + void setCorrelationId(const std::string&); + + + C++ + const std::string& getCorrelationId() const; + + + .NET + public string CorrelationId { get; set; } + + + Property: Priority + + + C++ + void setPriority(uint8_t); + + + C++ + uint8_t getPriority() const; + + + .NET + public byte Priority { get; set; } + + + Property: Ttl + + + C++ + void setTtl(Duration ttl); + + + C++ + Duration getTtl() const; + + + .NET + public Duration Ttl { get; set; } + + + Property: Durable + + + C++ + void setDurable(bool durable); + + + C++ + bool getDurable() const; + + + .NET + public bool Durable { get; set; } + + + Property: Redelivered + + + C++ + bool getRedelivered() const; + + + C++ + void setRedelivered(bool); + + + .NET + public bool Redelivered { get; set; } + + + Method: SetProperty + + + C++ + n/a + + + .NET + public void SetProperty(string name, object value); + + + Property: Properties + + + C++ + const qpid::types::Variant::Map& getProperties() const; + + + C++ + qpid::types::Variant::Map& getProperties(); + + + .NET + public Dictionary<string, object> Properties { get; set; } + + + Method: SetContent + + + C++ + void setContent(const std::string&); + + + C++ + void setContent(const char* chars, size_t count); + + + .NET + public void SetContent(byte[] bytes); + + + .NET + public void SetContent(string content); + + + .NET + public void SetContent(byte[] bytes, int offset, int size); + + + Method: GetContent + + + C++ + std::string getContent() const; + + + .NET + public string GetContent(); + + + .NET + public void GetContent(byte[] arr); + + + .NET + public void GetContent(Collection<object> __p1); + + + .NET + public void GetContent(Dictionary<string, object> dict); + + + Method: GetContentPtr + + + C++ + const char* getContentPtr() const; + + + .NET + n/a + + + Property: ContentSize + + + C++ + size_t getContentSize() const; + + + .NET + public ulong ContentSize { get; } + + + Struct: EncodingException + + + C++ + struct EncodingException : qpid::types::Exception + + + .NET + n/a + + + Method: decode + + + C++ + void decode(const Message& message, qpid::types::Variant::Map& map, const std::string& encoding = std::string()); + + + C++ + void decode(const Message& message, qpid::types::Variant::List& list, const std::string& encoding = std::string()); + + + .NET + TODO: + + + Method: encode + + + C++ + void encode(const qpid::types::Variant::Map& map, Message& message, const std::string& encoding = std::string()); + + + C++ + void encode(const qpid::types::Variant::List& list, Message& message, const std::string& encoding = std::string()); + + + .NET + TODO: + + + Method: AsString + + + C++ + n/a + + + .NET + public string AsString(object obj); + + + .NET + public string ListAsString(Collection<object> list); + + + .NET + public string MapAsString(Dictionary<string, object> dict); + + + +
+
+
+ .NET Binding Class: Receiver + + .NET Binding Class: Receiver + + + + + + .NET Binding Class: Receiver + + + Language + Syntax + + + + + C++ + class Receiver + + + .NET + public ref class Receiver + + + Constructor + + + .NET + Constructed object is returned by Session.CreateReceiver + + + Copy constructor + + + C++ + Receiver(const Receiver&); + + + .NET + public Receiver(Receiver receiver); + + + Destructor + + + C++ + ~Receiver(); + + + .NET + ~Receiver(); + + + Finalizer + + + C++ + n/a + + + .NET + !Receiver() + + + Copy assignment operator + + + C++ + Receiver& operator=(const Receiver&); + + + .NET + public Receiver op_Assign(Receiver rhs); + + + Method: Get + + + C++ + bool get(Message& message, Duration timeout=Duration::FOREVER); + + + .NET + public bool Get(Message mmsgp); + + + .NET + public bool Get(Message mmsgp, Duration durationp); + + + Method: Get + + + C++ + Message get(Duration timeout=Duration::FOREVER); + + + .NET + public Message Get(); + + + .NET + public Message Get(Duration durationp); + + + Method: Fetch + + + C++ + bool fetch(Message& message, Duration timeout=Duration::FOREVER); + + + .NET + public bool Fetch(Message mmsgp); + + + .NET + public bool Fetch(Message mmsgp, Duration duration); + + + Method: Fetch + + + C++ + Message fetch(Duration timeout=Duration::FOREVER); + + + .NET + public Message Fetch(); + + + .NET + public Message Fetch(Duration durationp); + + + Property: Capacity + + + C++ + void setCapacity(uint32_t); + + + C++ + uint32_t getCapacity(); + + + .NET + public uint Capacity { get; set; } + + + Property: Available + + + C++ + uint32_t getAvailable(); + + + .NET + public uint Available { get; } + + + Property: Unsettled + + + C++ + uint32_t getUnsettled(); + + + .NET + public uint Unsettled { get; } + + + Method: Close + + + C++ + void close(); + + + .NET + public void Close(); + + + Property: IsClosed + + + C++ + bool isClosed() const; + + + .NET + public bool IsClosed { get; } + + + Property: Name + + + C++ + const std::string& getName() const; + + + .NET + public string Name { get; } + + + Property: Session + + + C++ + Session getSession() const; + + + .NET + public Session Session { get; } + + + +
+
+
+ .NET Binding Class: Sender + + .NET Binding Class: Sender + + + + + + .NET Binding Class: Sender + + + Language + Syntax + + + + + C++ + class Sender + + + .NET + public ref class Sender + + + Constructor + + + .NET + Constructed object is returned by Session.CreateSender + + + Copy constructor + + + C++ + Sender(const Sender&); + + + .NET + public Sender(Sender sender); + + + Destructor + + + C++ + ~Sender(); + + + .NET + ~Sender(); + + + Finalizer + + + C++ + n/a + + + .NET + !Sender() + + + Copy assignment operator + + + C++ + Sender& operator=(const Sender&); + + + .NET + public Sender op_Assign(Sender rhs); + + + Method: Send + + + C++ + void send(const Message& message, bool sync=false); + + + .NET + public void Send(Message mmsgp); + + + .NET + public void Send(Message mmsgp, bool sync); + + + Method: Close + + + C++ + void close(); + + + .NET + public void Close(); + + + Property: Capacity + + + C++ + void setCapacity(uint32_t); + + + C++ + uint32_t getCapacity(); + + + .NET + public uint Capacity { get; set; } + + + Property: Available + + + C++ + uint32_t getAvailable(); + + + .NET + public uint Available { get; } + + + Property: Unsettled + + + C++ + uint32_t getUnsettled(); + + + .NET + public uint Unsettled { get; } + + + Property: Name + + + C++ + const std::string& getName() const; + + + .NET + public string Name { get; } + + + Property: Session + + + C++ + Session getSession() const; + + + .NET + public Session Session { get; } + + + +
+
+
+ .NET Binding Class: Session + + .NET Binding Class: Session + + + + + + .NET Binding Class: Session + + + Language + Syntax + + + + + C++ + class Session + + + .NET + public ref class Session + + + Constructor + + + .NET + Constructed object is returned by Connection.CreateSession + + + Copy constructor + + + C++ + Session(const Session&); + + + .NET + public Session(Session session); + + + Destructor + + + C++ + ~Session(); + + + .NET + ~Session(); + + + Finalizer + + + C++ + n/a + + + .NET + !Session() + + + Copy assignment operator + + + C++ + Session& operator=(const Session&); + + + .NET + public Session op_Assign(Session rhs); + + + Method: Close + + + C++ + void close(); + + + .NET + public void Close(); + + + Method: Commit + + + C++ + void commit(); + + + .NET + public void Commit(); + + + Method: Rollback + + + C++ + void rollback(); + + + .NET + public void Rollback(); + + + Method: Acknowledge + + + C++ + void acknowledge(bool sync=false); + + + .NET + public void Acknowledge(); + + + .NET + public void Acknowledge(bool sync); + + + Method: Reject + + + C++ + void reject(Message&); + + + .NET + public void Reject(Message __p1); + + + Method: Release + + + C++ + void release(Message&); + + + .NET + public void Release(Message __p1); + + + Method: Sync + + + C++ + void sync(bool block=true); + + + .NET + public void Sync(); + + + .NET + public void Sync(bool block); + + + Property: Receivable + + + C++ + uint32_t getReceivable(); + + + .NET + public uint Receivable { get; } + + + Property: UnsettledAcks + + + C++ + uint32_t getUnsettledAcks(); + + + .NET + public uint UnsetledAcks { get; } + + + Method: NextReceiver + + + C++ + bool nextReceiver(Receiver&, Duration timeout=Duration::FOREVER); + + + .NET + public bool NextReceiver(Receiver rcvr); + + + .NET + public bool NextReceiver(Receiver rcvr, Duration timeout); + + + Method: NextReceiver + + + C++ + Receiver nextReceiver(Duration timeout=Duration::FOREVER); + + + .NET + public Receiver NextReceiver(); + + + .NET + public Receiver NextReceiver(Duration timeout); + + + Method: CreateSender + + + C++ + Sender createSender(const Address& address); + + + .NET + public Sender CreateSender(Address address); + + + Method: CreateSender + + + C++ + Sender createSender(const std::string& address); + + + .NET + public Sender CreateSender(string address); + + + Method: CreateReceiver + + + C++ + Receiver createReceiver(const Address& address); + + + .NET + public Receiver CreateReceiver(Address address); + + + Method: CreateReceiver + + + C++ + Receiver createReceiver(const std::string& address); + + + .NET + public Receiver CreateReceiver(string address); + + + Method: GetSender + + + C++ + Sender getSender(const std::string& name) const; + + + .NET + public Sender GetSender(string name); + + + Method: GetReceiver + + + C++ + Receiver getReceiver(const std::string& name) const; + + + .NET + public Receiver GetReceiver(string name); + + + Property: Connection + + + C++ + Connection getConnection() const; + + + .NET + public Connection Connection { get; } + + + Property: HasError + + + C++ + bool hasError(); + + + .NET + public bool HasError { get; } + + + Method: CheckError + + + C++ + void checkError(); + + + .NET + public void CheckError(); + + + +
+
+
+ .NET Binding Class: SessionReceiver + + The SessionReceiver class provides a convenient callback + mechanism for Messages received by all Receivers on a given + Session. + + + + + + + To use this class a client program includes references to both + Org.Apache.Qpid.Messaging and Org.Apache.Qpid.Messaging.SessionReceiver. + The calling program creates a function that implements the + ISessionReceiver interface. This function will be called whenever + message is received by the session. The callback process is started + by creating a CallbackServer and will continue to run until the + client program calls the CallbackServer.Close function. + + + A complete operating example of using the SessionReceiver callback + is contained in cpp/bindings/qpid/dotnet/examples/csharp.map.callback.receiver. + +
+