Modified: incubator/qpid/branches/M2.1.x/dotnet/Qpid.Messaging/IMessage.cs URL: http://svn.apache.org/viewvc/incubator/qpid/branches/M2.1.x/dotnet/Qpid.Messaging/IMessage.cs?rev=668164&r1=668163&r2=668164&view=diff ============================================================================== --- incubator/qpid/branches/M2.1.x/dotnet/Qpid.Messaging/IMessage.cs (original) +++ incubator/qpid/branches/M2.1.x/dotnet/Qpid.Messaging/IMessage.cs Mon Jun 16 07:02:16 2008 @@ -1,97 +1,98 @@ -/* - * - * 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. - * - */ -namespace Apache.Qpid.Messaging -{ - public interface IMessage - { - /// <summary> - /// The MIME Content Type - /// </summary> - string ContentType { get; set;} - /// <summary> - /// The MIME Content Encoding - /// </summary> - string ContentEncoding { get; set; } - /// <summary> - /// The application correlation identifier - /// </summary> - string CorrelationId { get; set; } - /// <summary> - /// The application correlation identifier, as an array of bytes - /// </summary> - byte[] CorrelationIdAsBytes { get; set; } - /// <summary> - /// Non-persistent (1) or persistent (2) - /// </summary> - DeliveryMode DeliveryMode { get; set; } - /// <summary> - /// Message expiration specification - /// </summary> - long Expiration { get; set; } - /// <summary> - /// The application message identifier - /// </summary> - string MessageId { get; set; } - /// <summary> - /// The message priority, 0 to 9 - /// </summary> - byte Priority { get; set; } - /// <summary> - /// True if the message has been redelivered - /// </summary> - bool Redelivered { get; set; } - /// <summary> - /// Exchange name of the reply-to address - /// </summary> - string ReplyToExchangeName { get; set; } - /// <summary> - /// Routing key of the reply-to address - /// </summary> - string ReplyToRoutingKey { get; set; } - /// <summary> - /// The message timestamp - /// </summary> - long Timestamp { get; set; } - /// <summary> - /// The message type name - /// </summary> - string Type { get; set; } - /// <summary> - /// Message headers - /// </summary> - IHeaders Headers { get; } - /// <summary> - /// The creating user id - /// </summary> - string UserId { get; set; } - /// <summary> - /// The creating application id - /// </summary> - string AppId { get; set; } - /// <summary> - /// Intra-cluster routing identifier - /// </summary> - string ClusterId { get; set; } - - void Acknowledge(); - void ClearBody(); - } -} +/* + * + * 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. + * + */ +namespace Apache.Qpid.Messaging +{ + public interface IMessage + { + /// <summary> + /// The MIME Content Type + /// </summary> + string ContentType { get; set;} + /// <summary> + /// The MIME Content Encoding + /// </summary> + string ContentEncoding { get; set; } + /// <summary> + /// The application correlation identifier + /// </summary> + string CorrelationId { get; set; } + /// <summary> + /// The application correlation identifier, as an array of bytes + /// </summary> + byte[] CorrelationIdAsBytes { get; set; } + /// <summary> + /// Non-persistent (1) or persistent (2) + /// </summary> + DeliveryMode DeliveryMode { get; set; } + /// <summary> + /// Message expiration specification + /// </summary> + long Expiration { get; set; } + /// <summary> + /// The application message identifier + /// </summary> + string MessageId { get; set; } + /// <summary> + /// The message priority, 0 to 9 + /// </summary> + byte Priority { get; set; } + /// <summary> + /// True if the message has been redelivered + /// </summary> + bool Redelivered { get; set; } + /// <summary> + /// Exchange name of the reply-to address + /// </summary> + string ReplyToExchangeName { get; set; } + /// <summary> + /// Routing key of the reply-to address + /// </summary> + string ReplyToRoutingKey { get; set; } + /// <summary> + /// The message timestamp + /// </summary> + long Timestamp { get; set; } + /// <summary> + /// The message type name + /// </summary> + string Type { get; set; } + /// <summary> + /// Message headers + /// </summary> + IHeaders Headers { get; } + /// <summary> + /// The creating user id + /// </summary> + string UserId { get; set; } + /// <summary> + /// The creating application id + /// </summary> + string AppId { get; set; } + /// <summary> + /// Intra-cluster routing identifier + /// </summary> + string ClusterId { get; set; } + + void Acknowledge(); + void Acknowledge(bool ackprevious); + void ClearBody(); + } +}
Modified: incubator/qpid/branches/M2.1.x/dotnet/Qpid.Messaging/IMessagePublisher.cs URL: http://svn.apache.org/viewvc/incubator/qpid/branches/M2.1.x/dotnet/Qpid.Messaging/IMessagePublisher.cs?rev=668164&r1=668163&r2=668164&view=diff ============================================================================== --- incubator/qpid/branches/M2.1.x/dotnet/Qpid.Messaging/IMessagePublisher.cs (original) +++ incubator/qpid/branches/M2.1.x/dotnet/Qpid.Messaging/IMessagePublisher.cs Mon Jun 16 07:02:16 2008 @@ -1,92 +1,97 @@ -/* - * - * 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. - * - */ -using System; - -namespace Apache.Qpid.Messaging -{ - /// <summary> - /// Defines an object capable of publishing messages - /// to an AMQP broker. - /// </summary> - /// <remarks> - /// A publisher can be created using either - /// <see cref="IChannel.CreatePublisher"/> or - /// using the builder pattern (preferred) with - /// <see cref="IChannel.CreatePublisherBuilder"/> - /// </remarks> - public interface IMessagePublisher : IDisposable, ICloseable - { - /// <summary> - /// Default delivery mode to use with this publisher - /// </summary> - DeliveryMode DeliveryMode { get; set; } - /// <summary> - /// Name of exchange messages are published to - /// </summary> - string ExchangeName { get; } - /// <summary> - /// Routing key used when publishing messages - /// </summary> - string RoutingKey { get; } - /// <summary> - /// If true, a message ID will not be generated by the publisher - /// when sending the message - /// </summary> - bool DisableMessageID { get; set; } - /// <summary> - /// If true, no timestamp will be added to the message - /// when publishing it - /// </summary> - bool DisableMessageTimestamp { get; set; } - /// <summary> - /// Default priority used when publishing messages - /// </summary> - int Priority { get; set; } - /// <summary> - /// Default time to live used when publishing messages - /// </summary> - long TimeToLive { get; set; } - /// <summary> - /// Set the default MIME type for messages produced by this producer. - /// This reduces the overhead of each message. - /// </summary> - string MimeType { get; set; } - /// <summary> - /// Set the default encoding for messages produced by this producer. - /// This reduces the overhead of each message. - /// </summary> - string Encoding { get; set; } - - /// <summary> - /// Publish a message, using any default values configured - /// </summary> - /// <param name="msg">Message to publish</param> - void Send(IMessage msg); - /// <summary> - /// Publish a message with the specified options - /// </summary> - /// <param name="msg">Message to publish</param> - /// <param name="deliveryMode">Delivery mode to use</param> - /// <param name="priority">Priority of the message</param> - /// <param name="timeToLive">Time to live of the message</param> - void Send(IMessage msg, DeliveryMode deliveryMode, int priority, long timeToLive); - } -} +/* + * + * 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. + * + */ +using System; + +namespace Apache.Qpid.Messaging +{ + /// <summary> + /// Defines an object capable of publishing messages + /// to an AMQP broker. + /// </summary> + /// <remarks> + /// A publisher can be created using either + /// <see cref="IChannel.CreatePublisher"/> or + /// using the builder pattern (preferred) with + /// <see cref="IChannel.CreatePublisherBuilder"/> + /// </remarks> + public interface IMessagePublisher : IDisposable, ICloseable + { + /// <summary> + /// Default delivery mode to use with this publisher + /// </summary> + DeliveryMode DeliveryMode { get; set; } + /// <summary> + /// Name of exchange messages are published to + /// </summary> + string ExchangeName { get; } + /// <summary> + /// Routing key used when publishing messages + /// </summary> + string RoutingKey { get; } + /// <summary> + /// If true, a message ID will not be generated by the publisher + /// when sending the message + /// </summary> + bool DisableMessageID { get; set; } + /// <summary> + /// If true, no timestamp will be added to the message + /// when publishing it + /// </summary> + bool DisableMessageTimestamp { get; set; } + /// <summary> + /// Default priority used when publishing messages + /// </summary> + int Priority { get; set; } + /// <summary> + /// Default time to live used when publishing messages + /// </summary> + long TimeToLive { get; set; } + /// <summary> + /// Set the default MIME type for messages produced by this producer. + /// This reduces the overhead of each message. + /// </summary> + string MimeType { get; set; } + /// <summary> + /// Set the default encoding for messages produced by this producer. + /// This reduces the overhead of each message. + /// </summary> + string Encoding { get; set; } + + /// <summary> + /// Get the channel this producer is on + /// </summary> + IChannel Channel { get; } + + /// <summary> + /// Publish a message, using any default values configured + /// </summary> + /// <param name="msg">Message to publish</param> + void Send(IMessage msg); + /// <summary> + /// Publish a message with the specified options + /// </summary> + /// <param name="msg">Message to publish</param> + /// <param name="deliveryMode">Delivery mode to use</param> + /// <param name="priority">Priority of the message</param> + /// <param name="timeToLive">Time to live of the message</param> + void Send(IMessage msg, DeliveryMode deliveryMode, int priority, long timeToLive); + } +}
