Propchange: qpid/site/docs/books/trunk/Programming-In-Apache-Qpid-Book/html/ch04s04.html ------------------------------------------------------------------------------ svn:eol-style = native Propchange: qpid/site/docs/books/trunk/Programming-In-Apache-Qpid-Book/html/ch04s04.html ------------------------------------------------------------------------------ svn:keywords = Rev Date Propchange: qpid/site/docs/books/trunk/Programming-In-Apache-Qpid-Book/html/ch04s04.html ------------------------------------------------------------------------------ svn:mime-type = text/html Added: qpid/site/docs/books/trunk/Programming-In-Apache-Qpid-Book/html/ch04s05.html URL: http://svn.apache.org/viewvc/qpid/site/docs/books/trunk/Programming-In-Apache-Qpid-Book/html/ch04s05.html?rev=1368244&view=auto ============================================================================== --- qpid/site/docs/books/trunk/Programming-In-Apache-Qpid-Book/html/ch04s05.html (added) +++ qpid/site/docs/books/trunk/Programming-In-Apache-Qpid-Book/html/ch04s05.html Wed Aug 1 20:54:46 2012 @@ -0,0 +1,43 @@ +4.5. Transactions

4.5. Transactions

The WCF channel provides a transaction resource manager + module and a recovery module that together provide distributed + transaction support with one-phase optimization. Some + configuration is required on Windows machines to enable + transaction support (see your installation notes or top level + ReadMe.txt file for instructions). Once properly configured, + the Qpid WCF channel acts as any other System.Transactions aware + resource, capable of participating in explicit or implicit + transactions.

Server code:

+[OperationBehavior(TransactionScopeRequired = true,
+                   TransactionAutoComplete = true)]
+
+public void SayHello(string greeting)
+{
+  // increment ExactlyOnceReceived counter on DB
+
+  // Success: transaction auto completes:
+}
+

Because this operation involves two transaction resources, the + database and the AMQP message broker, this operates as a full two + phase commit transaction managed by the Distributed Transaction + Coordinator service. If the transaction proceeds without error, + both ExactlyOnceReceived is incremented in the database and the AMQP + message is consumed from the broker. Otherwise, ExactlyOnceReceived is + unchanged and AMQP message is returned to its queue on the broker.

For the client code a few changes are made to the non-transacted + example. For "exactly once" semantics, we set the AMQP "Durable" + message property and enclose the transacted activities in a + TransactionScope:

+AmqpProperties myDefaults = new AmqpProperties();
+myDefaults.Durable = true;
+amqpBinding.DefaultMessageProperties = myDefaults;
+ChannelFactory<IHelloService> channelFactory =
+new ChannelFactory<IHelloService>(amqpBinding, clientEndpoint);
+IHelloService clientProxy = channelFactory.CreateChannel();
+
+using (TransactionScope ts = new TransactionScope())
+{
+   AmqpProperties amqpProperties = new AmqpProperties();
+   clientProxy.SayHello("Greetings from WCF client");
+   // increment ExactlyOnceSent counter on DB
+   ts.Complete();
+}
+
Propchange: qpid/site/docs/books/trunk/Programming-In-Apache-Qpid-Book/html/ch04s05.html ------------------------------------------------------------------------------ svn:eol-style = native Propchange: qpid/site/docs/books/trunk/Programming-In-Apache-Qpid-Book/html/ch04s05.html ------------------------------------------------------------------------------ svn:keywords = Rev Date Propchange: qpid/site/docs/books/trunk/Programming-In-Apache-Qpid-Book/html/ch04s05.html ------------------------------------------------------------------------------ svn:mime-type = text/html Added: qpid/site/docs/books/trunk/Programming-In-Apache-Qpid-Book/html/ch05.html URL: http://svn.apache.org/viewvc/qpid/site/docs/books/trunk/Programming-In-Apache-Qpid-Book/html/ch05.html?rev=1368244&view=auto ============================================================================== --- qpid/site/docs/books/trunk/Programming-In-Apache-Qpid-Book/html/ch05.html (added) +++ qpid/site/docs/books/trunk/Programming-In-Apache-Qpid-Book/html/ch05.html Wed Aug 1 20:54:46 2012 @@ -0,0 +1,41 @@ +Chapter 5. The .NET Binding for the C++ Messaging Client

Chapter 5. The .NET Binding for the C++ Messaging Client

+ The .NET Binding for the C++ Qpid Messaging Client is a library that gives + any .NET program access to Qpid C++ Messaging objects and methods. +

5.1. .NET Binding for the C++ Messaging Client Component Architecture

+                      +----------------------------+
+                      | Dotnet examples            |
+                      | Managed C#                 |
+                      +------+---------------+-----+
+                             |               |
+                             V               |
+        +---------------------------+        |
+        | .NET Managed Callback     |        |
+        | org.apache.qpid.messaging.|        |
+        | sessionreceiver.dll       |        |
+        +----------------------+----+        |
+                               |             |
+managed                        V             V
+(.NET)                 +--------------------------------+
+:::::::::::::::::::::::| .NET Binding Library           |::::::::::::
+unmanaged              | org.apache.qpid.messaging.dll  |
+(Native Win32/64)      +---------------+----------------+
+                                       |
+                                       |
+      +----------------+               |
+      | Native examples|               |
+      | Unmanaged C++  |               |
+      +--------+-------+               |
+               |                       |
+               V                       V
+          +----------------------------------+
+          | QPID Messaging C++ Libraries     |
+          | qpid*.dll qmf*.dll               |
+          +--------+--------------+----------+
+

This diagram illustrates the code and library components of the binding +and the hierarchical relationships between them.

Table 5.1. .NET Binding for the C++ Messaging Client Component Architecture

Component NameComponent Function
QPID Messaging C++ LibrariesThe QPID Messaging C++ core run time system
Unmanaged C++ Example Source ProgramsOrdinary C++ programs that illustrate using qpid/cpp Messaging directly + in a native Windows environment.
.NET Messaging Binding LibraryThe .NET Messaging Binding library provides interoprability between + managed .NET programs and the unmanaged, native Qpid Messaging C++ core + run time system. .NET programs create a Reference to this library thereby + exposing all of the native C++ Messaging functionality to programs + written in any .NET language.
.NET Messaging Managed Callback LibraryAn extension of the .NET Messaging Binding Library that provides message + callbacks in a managed .NET environment.
Managed C# .NET Example Source ProgramsVarious C# example programs that illustrate using .NET Binding for C++ Messaging in the .NET environment.

Propchange: qpid/site/docs/books/trunk/Programming-In-Apache-Qpid-Book/html/ch05.html ------------------------------------------------------------------------------ svn:eol-style = native Propchange: qpid/site/docs/books/trunk/Programming-In-Apache-Qpid-Book/html/ch05.html ------------------------------------------------------------------------------ svn:keywords = Rev Date Propchange: qpid/site/docs/books/trunk/Programming-In-Apache-Qpid-Book/html/ch05.html ------------------------------------------------------------------------------ svn:mime-type = text/html Added: qpid/site/docs/books/trunk/Programming-In-Apache-Qpid-Book/html/ch05s02.html URL: http://svn.apache.org/viewvc/qpid/site/docs/books/trunk/Programming-In-Apache-Qpid-Book/html/ch05s02.html?rev=1368244&view=auto ============================================================================== --- qpid/site/docs/books/trunk/Programming-In-Apache-Qpid-Book/html/ch05s02.html (added) +++ qpid/site/docs/books/trunk/Programming-In-Apache-Qpid-Book/html/ch05s02.html Wed Aug 1 20:54:46 2012 @@ -0,0 +1,18 @@ +5.2. .NET Binding for the C++ Messaging Client Examples

5.2. .NET Binding for the C++ Messaging Cl ient Examples

This chapter describes the various sample programs that + are available to illustrate common Qpid Messaging usage.

Table 5.2. Example : Client - Server

Example NameExample Description
csharp.example.serverCreates a Receiver and listens for messages. + Upon message reception the message content is converted to upper case + and forwarded to the received message's ReplyTo address.
csharp.example.clientSends a series of messages to the Server and prints the original message + content and the received message content.

Table 5.3. Example : Map Sender – Map Receiver

Example NameExample Description
csharp.map.receiverCreates a Receiver and listens for a map message. + Upon message reception the message is decoded and displayed on the console.
csharp.map.senderCreates a map message and sends it to map.receiver. + The map message contains values for every supported .NET Messaging + Binding data type.

Table 5.4. Example : Spout - Drain

Example NameExample Description
csharp.example.spoutSpout is a more complex example of code that generates a series of messages + and sends them to peer program Drain. Flexible command line arguments allow + the user to specify a variety of message and program options.
csharp.example.drainDrain is a more complex example of code that receives a series of messages + and displays their contents on the console.

Table 5.5. Example : Map Callback Sender – Map Callback Receiver

Example NameExample Description
csharp.map.callback.receiverCreates a Receiver and listens for a map message. + Upon message reception the message is decoded and displayed on the console. + This example illustrates the use of the C# managed code callback mechanism + provided by .NET Messaging Binding Managed Callback Library.
csharp.map.callback.senderCreates a map message and sends it to map_receiver. + The map message contains values for every supported .NET Messaging + Binding data type.

Table 5.6. Example - Declare Queues

Example NameExample Description
csharp.example.declare_queuesA program to illustrate creating objects on a broker. + This program creates a queue used by spout and drain.

Table 5.7. Example: Direct Sender - Direct Receiver

Example NameExample Description
csharp.direct.receiverCreates a Receiver and listens for a messages. + Upon message reception the message is decoded and displayed on the console.
csharp.direct.sender Creates a series of messages and sends them to csharp.direct.receiver.

Table 5.8. Example: Hello World

Example NameExample Description
csharp.example.helloworldA program to send a message and to receive the same message.

Propchange: qpid/site/docs/books/trunk/Programming-In-Apache-Qpid-Book/html/ch05s02.html ------------------------------------------------------------------------------ svn:eol-style = native Propchange: qpid/site/docs/books/trunk/Programming-In-Apache-Qpid-Book/html/ch05s02.html ------------------------------------------------------------------------------ svn:keywords = Rev Date Propchange: qpid/site/docs/books/trunk/Programming-In-Apache-Qpid-Book/html/ch05s02.html ------------------------------------------------------------------------------ svn:mime-type = text/html Added: qpid/site/docs/books/trunk/Programming-In-Apache-Qpid-Book/html/ch05s03.html URL: http://svn.apache.org/viewvc/qpid/site/docs/books/trunk/Programming-In-Apache-Qpid-Book/html/ch05s03.html?rev=1368244&view=auto ============================================================================== --- qpid/site/docs/books/trunk/Programming-In-Apache-Qpid-Book/html/ch05s03.html (added) +++ qpid/site/docs/books/trunk/Programming-In-Apache-Qpid-Book/html/ch05s03.html Wed Aug 1 20:54:46 2012 @@ -0,0 +1,39 @@ +5.3. .NET Binding Class Mapping to Underlying C++ Messaging API

5.3. .NET Binding Class Mapping to Underlying C++ Messaging API

This chapter describes the specific mappin gs between + classes in the .NET Binding and the underlying C++ Messaging + API.

5.3.1. .NET Binding for the C++ Messaging API Class: Address

Table 5.9. .NET Binding for the C++ Messaging API Class: Address

.NET Binding Class: Address
LanguageSyntax
C++class Address
.NETpublic ref class Address
Constructor
C++Address();
.NETpublic Address();
Constructor
C++Address(const std::string& address);
.NETpublic Address(string address);
Constructor
C++Address(const std::string& name, const std::string& subject, const qpid::types::Variant::Map& options, const std::string& type = "");
.NETpublic Address(string name, string subject, Dictionary<string, object> options);
.NETpublic Address(string name, string subject, Dictionary<string, object> options, string type);
Copy constructor
C++Address(const Address& address);
.NETpublic Address(Address address);
Destructor
C++~Address();
.NET~Address();
Finalizer
C++n/a
.NET!Address();
Copy assignment operator
C++Address& operator=(const Address&);
.NETpublic Address op_Assign(Address rhs);
Property: Name
C++const std::string& getName() const;
C++void setName(const std::string&);
.NETpublic string Name { get; set; }
Property: Subject
C++const std::string& getSubject() const;
C++void setSubject(const std::string&);
.NETpublic string Subject { get; set; }
Property: Options
C++const qpid::types::Variant::Map& getOptions() co nst;
C++qpid::types::Variant::Map& getOptions();
C++void setOptions(const qpid::types::Variant::Map&);
.NETpublic Dictionary<string, object> Options { get; set; }
Property: Type
C++std::string getType() const;
C++void setType(const std::string&);
.NETpublic string Type { get; set; }
Miscellaneous
C++std::string str() const;
.NETpublic string ToStr();
Miscellaneous
C++operator bool() const;
.NETn/a
Miscellaneous
C++bool operator !() const;
.NETn/a
< /div>

5.3.2. .NET Binding for the C++ Messaging API Class: Connection

Table 5.10. .NET Binding for the C++ Messaging API Class: Connection

.NET Binding Class: Connection
LanguageSyntax
C++class Connection : public qpid::messaging::Handle<ConnectionImpl>
.NETpublic ref class Connection
Constructor
C ++Connection(ConnectionImpl* impl);
.NETn/a
Constructor
C++Connection();
.NETn/a
Constructor
C++Connection(const std::string& url, const qpid::types::Variant::Map& options = qpid::types::Variant::Map());
.NETpublic Connection(string url);
.NETpublic Connection(string url, Dictionary<string, object> options);
Constructor
C++Connection(const std::string& url, const std::string& options);
.NETpublic Connection(string url, string options);
Copy Constructor
C++Connection(const Connection&);
.NETpublic Connection(Con nection connection);
Destructor
C++~Connection();
.NET~Connection();
Finalizer
C++n/a
.NET!Connection();
Copy assignment operator
C++Connection& operator=(const Connection&);
.NETpublic Connection op_Assign(Connection rhs);
Method: SetOption
C++void setOption(const std::string& name, const qpid::types::Variant& value);
.NETpublic void SetOption(string name, object value);
Method: open
C++void open();
.NETpublic void Open();
Property: isOpen
C++bool isOpen();
.NETpublic bool IsOpen { get; }
Method: close
C++void close();
.NETpublic void Close();
Method: createTransactionalSession
C++Session createTransactionalSession(const std::string& name = std::string());
.NETpublic Session CreateTransactionalSession();
.NETpublic Session CreateTransactionalSession(string name);
Method: createSession
C++Session createSession(const std::string& name = std::string());
.NETpublic Session CreateSession();
.NETpublic Session CreateSession(string name);
Method: getSession
C++Session getSession(const std::string& name) const;
.NETpublic Session GetSession(string name);
Property: AuthenticatedUsername
C++std::string getAuthenticatedUsername();
.NETpublic string GetAuthenticatedUsername();

5.3.3. .NET Binding for the C++ Messaging API Class: Duration

Table 5.11. .NET Binding for the C++ Messaging API Class: Duration

.NET Binding Class: Duration
LanguageSyntax
C++class Duration
.NETpublic ref class Duration
Constructor
C++explicit Duration(uint64_t milliseconds);
.NETpublic Duration(ulong mS);
Copy constructor
C++n/a
.NETpublic Duration(Duration rhs);
Destructor
C++default
.NETdefault
Finalizer
C++n/a
.NETdefault
Property: Milliseconds
C++uint64_t getMilliseconds() const;
.NETpubli c ulong Milliseconds { get; }
Operator: *
C++Duration operator*(const Duration& duration, uint64_t multiplier);
.NETpublic static Duration operator *(Duration dur, ulong multiplier);
.NETpublic static Duration Multiply(Duration dur, ulong multiplier);
C++Duration operator*(uint64_t multiplier, const Duration& duration);
.NETpublic static Duration operator *(ulong multiplier, Duration dur);
.NETpublic 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;
.NETpublic sealed class DurationConstants
.NETpublic static Duration FORVER;
.NETpublic static Duration IMMEDIATE;
.NETpublic static Duration MINUTE;
.NETpublic static Duration SECOND;

5.3.4. .NET Binding for the C++ Messaging API Class: FailoverUpdates

Table 5.12. .NET Binding for the C++ Messaging API Class: FailoverUpdates

.NET Binding Class: FailoverUpdates
LanguageSyntax
C++class FailoverUpdates
.NETpublic ref class FailoverUpdates
Constructor
C++FailoverUpdates(Connection& connection);
.NETpublic FailoverUpdates(Connection connection);
Destructor
C++~FailoverUpdates();
.NET~FailoverUpdates();
Finalizer
C++n/a
.NET!FailoverUpdates();

5.3.5. .NET Binding f or the C++ Messaging API Class: Message

Table 5.13. .NET Binding for the C++ Messaging API Class: Message

public Dictionary<string, object> Properties { get; set; }
.NET Binding Class: Message
LanguageSyntax
C++class Message
.NETpublic ref class Message
Constructor
C++Message(const std::string& bytes = std::string());
.NETMessage();
.NETMessage(System::String ^ theStr);
.NETMessage(System::Object ^ theValue);
.NETMessage(array<System::Byte> ^ by tes);
Constructor
C++Message(const char*, size_t);
.NETpublic Message(byte[] bytes, int offset, int size);
Copy constructor
C++Message(const Message&);
.NETpublic Message(Message message);
Copy assignment operator
C++Message& operator=(const Message&);
.NETpublic Message op_Assign(Message rhs);
Destructor
C++~Message();
.NET~Message();
Finalizer
C++n/a
.NET!Message()
Property: ReplyTo
C++void setReplyTo(const Address&);
C++cons t Address& getReplyTo() const;
.NETpublic Address ReplyTo { get; set; }
Property: Subject
C++void setSubject(const std::string&);
C++const std::string& getSubject() const;
.NETpublic string Subject { get; set; }
Property: ContentType
C++void setContentType(const std::string&);
C++const std::string& getContentType() const;
.NETpublic string ContentType { get; set; }
Property: MessageId
C++void setMessageId(const std::string&);
C++const std::string& getMessageId() const;
.NETpublic string MessageId { get; set; }
Property: UserId
C++void setUserId(const std::string&);
C++const std::string& getUserId() const;
.NETpublic string UserId { get; set; }
Property: CorrelationId
C++void setCorrelationId(const std::string&);
C++const std::string& getCorrelationId() const;
.NETpublic string CorrelationId { get; set; }
Property: Priority
C++void setPriority(uint8_t);
C++uint8_t getPriority() const;
.NETpublic byte Priority { get; set; }
Property: Ttl
C++void setTtl(Duration ttl);
C++Duration getTtl() const;
.NETpublic Duration Ttl { get; set; }
Property: Durable
C++void setDurable(bool durable);
C++bool getDurable() const;
.NETpublic bool Durable { get; set; }
Property: Redelivered
C++bool getRedelivered() const;
C++void setRedelivered(bool);
.NETpublic bool Redelivered { get; set; }
Method: SetProperty
C++void setProperty(const std::string&, const qpid::types::Variant&);
.NETpublic void SetProperty(string name, object value);
Property: Properties
C++const qpid::types::Variant::Map& getProperties() const;
C++qpid::types::Variant::Map& getProperties();
.NET
Method: SetContent
C++void setContent(const std::string&);
C++void setContent(const char* chars, size_t count);
.NETpublic void SetContent(byte[] bytes);
.NETpublic void SetContent(string content);
.NETpublic void SetContent(byte[] bytes, int offset, int size);
Method: GetContent
C++std::string getContent() const;
.NETpublic string GetContent();
.NETpublic void GetContent(byte[] arr);
.NETpublic void GetContent(Collection<object> __p1);
.NETpublic void GetContent(Dictionary<string, object> dict);
Method: GetC ontentPtr
C++const char* getContentPtr() const;
.NETn/a
Property: ContentSize
C++size_t getContentSize() const;
.NETpublic ulong ContentSize { get; }
Struct: EncodingException
C++struct EncodingException : qpid::types::Exception
.NETn/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());
.NETn/a
Method: encode
C++void encode(con st 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());
.NETn/a
Method: AsString
C++n/a
.NETpublic string AsString(object obj);
.NETpublic string ListAsString(Collection<object> list);
.NETpublic string MapAsString(Dictionary<string, object> dict);

5.3.6. .NET Binding for the C++ Messaging API Class: Receiver

< a name="table-Dotnet-Binding-Receiver">

Table 5.14. .NET Binding for the C++ Messaging API Class: Receiver

~Receiver();
.NET Binding Class: Receiver
LanguageSyntax
C++class Receiver
.NETpublic ref class Receiver
Constructor
.NETConstructed object is returned by Session.CreateReceiver
Copy constructor
C++Receiver(const Receiver&);
.NETpublic Receiver(Receiver receiver);
Destructor
C++~Receiver();
.NET
Finalizer
C++n/a
.NET!Receiver()
Copy assignment operator
C++Receiver& operator=(const Receiver&);
.NETpublic Receiver op_Assign(Receiver rhs);
Method: Get
C++bool get(Message& message, Duration timeout=Duration::FOREVER);
.NETpublic bool Get(Message mmsgp);
.NETpublic bool Get(Message mmsgp, Duration durationp);
Method: Get
C++Message get(Duration timeout=Duration::FOREVER);
.NETpublic Message Get();
.NETpublic Message Get(Duration durationp);
Method: Fetch
C+ +bool fetch(Message& message, Duration timeout=Duration::FOREVER);
.NETpublic bool Fetch(Message mmsgp);
.NETpublic bool Fetch(Message mmsgp, Duration duration);
Method: Fetch
C++Message fetch(Duration timeout=Duration::FOREVER);
.NETpublic Message Fetch();
.NETpublic Message Fetch(Duration durationp);
Property: Capacity
C++void setCapacity(uint32_t);
C++uint32_t getCapacity();
.NETpublic uint Capacity { get; set; }
Property: Available
C++uint32_t getAvailable();
.NETpublic uint Available { get; }
Property: Unsettled
C++uint32_t getUnsettled();
.NETpublic uint Unsettled { get; }
Method: Close
C++void close();
.NETpublic void Close();
Property: IsClosed
C++bool isClosed() const;
.NETpublic bool IsClosed { get; }
Property: Name
C++const std::string& getName() const;
.NETpublic string Name { get; }
Property: Session
C++Session getSession() const;
.NETpublic Session Session { get; }

5.3.7. .NET Binding for the C++ Messaging API Class: Sender

Table 5.15. .NET Binding for the C++ Messaging API Class: Sender

.NET Binding Class: Sender
LanguageSyntax
C++class Sender
.NETpublic ref class Sender
Constructor
.NETConstructed object is returned by Session.CreateSender
Copy constructor
C++Sender(const Sender&);
.NETpublic Sender(Sender sender);
Destructor
C++~Sender();
.NET~Sender();
Finalizer
C++n/a
.NET!Sender()
Copy assignment operator
C++Sender& operator=(const Sender&);
.NETpublic Sender op_Assign(Sender rhs);
Method: Send
C++void send(const Message& message, bool sync=false);
.NETpublic void Send(Message mmsgp);
.NETpublic void Send(Message mmsgp, bool sync);
Method: Close
C++void close();
.NETpublic void Close();
Property: Capacity
C++void setCapacity(uint32_t);
C++uint32_t getCapacity();
.NETpublic uint Capacity { get; set; }
Property: Available
C++uint32_t getAvailable();
.NETpublic uint Available { get; }
Property: Unsettled
C++uint32_t getUnsettled();
.NETpublic uint Unsettled { get; }
Property: Name
C++const std::string& getName() const;
.NETpublic string Name { get; }
Property: Session
C++Session getSession() const;
.NETpublic Session Session { get; }

5.3.8. .NET Binding for the C++ Messaging API Class: Session

Table 5.16. .NET Binding for the C++ Messaging API Class: Session

< td>.NET
.NET Binding Class: Session
LanguageSyntax
C++class Session
.NETpublic ref class Session
Constructor
.NETConstructed object is returned by Connection.CreateSession
Copy constructor
C++Session( const Session&);
.NETpublic Session(Session session);
Destructor
C++~Session();
.NET~Session();
Finalizer
C++n/a
.NET!Session()
Copy assignment operator
C++Session& operator=(const Session&);
.NETpublic Session op_Assign(Session rhs);
Method: Close
C++void close();
.NETpublic void Close();
Method: Commit
C++void commit();
.NETpublic void Commit();
Method: Rollback
C++void rollback();
public void Rollback();
Method: Acknowledge
C++void acknowledge(bool sync=false);
C++void acknowledge(Message&, bool sync=false);
.NETpublic void Acknowledge();
.NETpublic void Acknowledge(bool sync);
.NETpublic void Acknowledge(Message __p1);
.NETpublic void Acknowledge(Message __p1, bool __p2);
Method: Reject
C++void reject(Message&);
.NETpublic void Reject(Message __p1);
Method: Release
C++void release(Message&);
.NETpublic void Release(Message __p1);
Method: Sync
C++void sync(bool block=tru e);
.NETpublic void Sync();
.NETpublic void Sync(bool block);
Property: Receivable
C++uint32_t getReceivable();
.NETpublic uint Receivable { get; }
Property: UnsettledAcks
C++uint32_t getUnsettledAcks();
.NETpublic uint UnsetledAcks { get; }
Method: NextReceiver
C++bool nextReceiver(Receiver&, Duration timeout=Duration::FOREVER);
.NETpublic bool NextReceiver(Receiver rcvr);
.NETpublic bool NextReceiver(Receiver rcvr, Duration timeout);
Method: NextReceiver
C++Receiver nextReceiver(Duration timeout=Duration::FOREVER);
.NET public Receiver NextReceiver();
.NETpublic Receiver NextReceiver(Duration timeout);
Method: CreateSender
C++Sender createSender(const Address& address);
.NETpublic Sender CreateSender(Address address);
Method: CreateSender
C++Sender createSender(const std::string& address);
.NETpublic Sender CreateSender(string address);
Method: CreateReceiver
C++Receiver createReceiver(const Address& address);
.NETpublic Receiver CreateReceiver(Address address);
Method: CreateReceiver
C++Receiver createReceiver(const std::string& address);
.NETpublic Receiver CreateRec eiver(string address);
Method: GetSender
C++Sender getSender(const std::string& name) const;
.NETpublic Sender GetSender(string name);
Method: GetReceiver
C++Receiver getReceiver(const std::string& name) const;
.NETpublic Receiver GetReceiver(string name);
Property: Connection
C++Connection getConnection() const;
.NETpublic Connection Connection { get; }
Property: HasError
C++bool hasError();
.NETpublic bool HasError { get; }
Method: CheckError
C++void checkError();
.NETpublic void CheckError();< /td>

5.3.9. .NET Binding Class: SessionReceiver

+ The SessionReceiver class provides a convenient callback + mechanism for Messages received by all Receivers on a given + Session. +

+

+using Org.Apache.Qpid.Messaging;
+using System;
+
+namespace Org.Apache.Qpid.Messaging.SessionReceiver
+{
+    public interface ISessionReceiver
+    {
+        void SessionReceiver(Receiver receiver, Message message);
+    }
+
+    public class CallbackServer
+    {
+        public CallbackServer(Session session, ISessionReceiver callback);
+
+        public void Close();
+    }
+}
+
+	

+

+ 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. +

Propchange: qpid/site/docs/books/trunk/Programming-In-Apache-Qpid-Book/html/ch05s03.html ------------------------------------------------------------------------------ svn:eol-style = native Propchange: qpid/site/docs/books/trunk/Programming-In-Apache-Qpid-Book/html/ch05s03.html ------------------------------------------------------------------------------ svn:keywords = Rev Date Propchange: qpid/site/docs/books/trunk/Programming-In-Apache-Qpid-Book/html/ch05s03.html ------------------------------------------------------------------------------ svn:mime-type = text/html Added: qpid/site/docs/books/trunk/Programming-In-Apache-Qpid-Book/html/connection-options.html URL: http://svn.apache.org/viewvc/qpid/site/docs/books/trunk/Programming-In-Apache-Qpid-Book/html/connection-options.html?rev=1368244&view=auto ============================================================================== --- qpid/site/docs/books/trunk/Programming-In-Apache-Qpid-Book/html/connection-options.html (added) +++ qpid/site/docs/books/trunk/Programming-In-Apache-Qpid-Book/html/connection-options.html Wed Aug 1 20:54:46 2012 @@ -0,0 +1,120 @@ +2.10. Connection Options

2.10. Connection Options

+ Aspects of the connections behaviour can be controlled through + specifying connection options. For example, connections can be + configured to automatically reconnect if the connection to a + broker is lost. +

Example 2.14. Specifying Connection Options in C++, Python, and .NET

In C++, these options can be set using Connection::setOption() or by passing in a set of options to the constructor. The options can be passed in as a map or in string form:

+	Connection connection("localhost:5672", "{reconnect: true}");
+	try {
+	connection.open();
+	!!! SNIP !!!
+	

or

+	Connection connection("localhost:5672");
+	connection.setOption("reconnect", true);
+	try {
+	connection.open();
+	!!! SNIP !!!
+	

In Python, these options can be set as attributes of the connection or using named arguments in + the Connection constructor:

+	connection = Connection("localhost:5672", reconnect=True)
+	try:
+	connection.open()
+	!!! SNIP !!!
+	

or

+	connection = Connection("localhost:5672")
+	connection.reconnect = True
+	try:
+	connection.open()
+	!!! SNIP !!!
+	

+ In .NET, these options can be set using Connection.SetOption() or by passing in a set of options to the constructor. The options can be passed in as a map or in string form: +

+	  Connection connection= new Connection("localhost:5672", "{reconnect: true}");
+	  try {
+	  connection.Open();
+	  !!! SNIP !!!
+	

+ or +

+	  Connection connection = new Connection("localhost:5672");
+	  connection.SetOption("reconnect", true);
+	  try {
+	  connection.Open();
+	  !!! SNIP !!!
+	

See the reference documentation for details in each language.


The following table lists the supported connection options.

Table 2.4. Connection Options

option namevalue typesemantics
+ username + + string + + The username to use when authenticating to the broker. +
+ password + + string + + The password to use when authenticating to the broker. +
+ sasl_mechanisms + + string + + The specific SASL mechanisms to use with the python + client when authenticating to the broker. The value + is a space separated list. +
+ reconnect + + boolean + + Transparently reconnect if the connection is lost. +
+ reconnect_timeout + + integer + + Total number of seconds to continue reconnection attempts before giving up and raising an exception. +
+ reconnect_limit + + integer + + Maximum number of reconnection attempts before giving up and raising an exception. +
+ reconnect_interval_min + + integer representing time in seconds + + Minimum number of seconds between reconnection attempts. The first reconnection attempt is made immediately; if that fails, the first reconnection delay is set to the value of reconnect_interval_min; if that attempt fails, the reconnect interval increases exponentially until a reconnection attempt succeeds or reconnect_interval_max is reached. +
+ reconnect_interval_max + + integer representing time in seconds + + Maximum reconnect interval. +
+ reconnect_interval + + integer representing time in seconds + + Sets both reconnection_interval_min and reconnection_interval_max to the same value. +
+ heartbeat + + integer representing time in seconds + + Requests that heartbeats be sent every N seconds. If two + successive heartbeats are missed the connection is + considered to be lost. +
+ protocol + + string + + Sets the underlying protocol used. The default option is 'tcp'. To enable ssl, set to 'ssl'. The C++ client additionally supports 'rdma'. +
+ tcp-nodelay + + boolean + + Set tcp no-delay, i.e. disable Nagle algorithm. [C++ only] +

Propchange: qpid/site/docs/books/trunk/Programming-In-Apache-Qpid-Book/html/connection-options.html ------------------------------------------------------------------------------ svn:eol-style = native Propchange: qpid/site/docs/books/trunk/Programming-In-Apache-Qpid-Book/html/connection-options.html ------------------------------------------------------------------------------ svn:keywords = Rev Date Propchange: qpid/site/docs/books/trunk/Programming-In-Apache-Qpid-Book/html/connection-options.html ------------------------------------------------------------------------------ svn:mime-type = text/html Added: qpid/site/docs/books/trunk/Programming-In-Apache-Qpid-Book/html/css/style.css URL: http://svn.apache.org/viewvc/qpid/site/docs/books/trunk/Programming-In-Apache-Qpid-Book/html/css/style.css?rev=1368244&view=auto ============================================================================== --- qpid/site/docs/books/trunk/Programming-In-Apache-Qpid-Book/html/css/style.css (added) +++ qpid/site/docs/books/trunk/Programming-In-Apache-Qpid-Book/html/css/style.css Wed Aug 1 20:54:46 2012 @@ -0,0 +1,279 @@ +/* + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * + */ +ul { + list-style-type:square; +} + +th { + font-weight: bold; +} + +.navfooter td { + font-size:10pt; +} + +.navheader td { + font-size:10pt; +} + +body { + margin:0; + background:#FFFFFF; + font-family:"Verdana", sans-serif; + font-size:10pt; +} + +.container { + width:950px; + margin:0 auto; +} + +body a { + color:#000000; +} + + +div.book { + margin-left:10pt; + margin-right:10pt; +} + +div.preface { + margin-left:10pt; + margin-right:10pt; +} + +div.chapter { + margin-left:10pt; + margin-right:10pt; +} + +div.section { + margin-left:10pt; + margin-right:10pt; +} + +div.titlepage { + margin-left:-10pt; + margin-right:-10pt; +} + +.calloutlist td { + font-size:10pt; +} + +.table-contents table { + border-spacing: 0px; +} + +.table-contents td { + font-size:10pt; + padding-left:6px; + padding-right:6px; +} + +div.breadcrumbs { + font-size:9pt; + margin-right:10pt; + padding-bottom:16px; +} + +.chapter h2.title { + font-size:20pt; + color:#0c3b82; +} + +.chapter .section h2.title { + font-size:18pt; + color:#0c3b82; +} + +.section h2.title { + font-size:16pt; + color:#0c3b82; +} + +.section h3.title { + font-size:14pt; + color:#0c3b82; +} + +.section h4.title { + font-size:12pt; + color:#0c3b82; +} + +.section h5.title { + font-size:12pt; + color:#0c3b82; +} + +.section h6.title { + font-size:12pt; + color:#0c3b82; +} + +.toc a { + font-size:9pt; +} + +.header { + height:100px; + width:950px; + background:url(http://qpid.apache.org/images/header.png) +} + +.logo { + text-align:center; + font-weight:600; + padding:0 0 0 0; + font-size:14px; + font-family:"Verdana", cursive; +} + +.logo a { + color:#000000; + text-decoration:none; +} + +.main_text_area { + margin-left:200px; +} + +.main_text_area_top { + height:14px; + font-size:1px; +} + +.main_text_area_bottom { + display:none; +/* height:14px; + margin-bottom:4px;*/ +} + +.main_text_area_body { + padding:5px 24px; +} + +.main_text_area_body p { + text-align:justify; +} + +.main_text_area br { + line-height:10px; +} + +.main_text_area h1 { + font-size:28px; + font-weight:600; + margin:0 0 24px 0; + color:#0c3b82; + font-family:"Verdana", Times, serif; +} + +.main_text_area h2 { + font-size:24px; + font-weight:600; + margin:24px 0 8px 0; + color:#0c3b82; + font-family:"Verdana",Times, serif; +} + +.main_text_area ol, .main_text_area ul { + padding:0; + margin:10px 0; + margin-left:20px; +} + +.main_text_area li { +/* margin-left:40px; */ +} + +.main_text_area, .menu_box { + font-size:13px; + line-height:17px; + color:#000000; +} + +.main_text_area { + font-size:14px; +} + +.main_text_area a { + color:#000000; +} + +.main_text_area a:hover { + color:#000000; +} + +.menu_box { + width:196px; + float:left; + margin-left:4px; +} + +.menu_box_top { + background:url(http://qpid.apache.org/images/menu_top.png) no-repeat; + height:14px; + font-size:1px; +} + +.menu_box_body { + background:url(http://qpid.apache.org/images/menu_body.png) repeat-y; + padding:5px 24px 5px 24px; +} + +.menu_box_bottom { + background:url(http://qpid.apache.org/images/menu_bottom.png) no-repeat; + height:14px; + font-size:1px; + margin-bottom:1px; +} + +.menu_box h3 { + font-size:20px; + font-weight:500; + margin:0 0 8px 0; + color:#0c3b82; + font-family:"Verdana",Times, serif; +} + +.menu_box ul { + margin:12px; + padding:0px; +} + +.menu_box li { + list-style:square; +} + +.menu_box a { + color:#000000; + text-decoration:none; +} + +.menu_box a:hover { + color:#000000; + text-decoration:underline; +} + + Propchange: qpid/site/docs/books/trunk/Programming-In-Apache-Qpid-Book/html/css/style.css ------------------------------------------------------------------------------ svn:eol-style = native --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org For additional commands, e-mail: commits-help@qpid.apache.org