Fixed up some comments.

git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@383314 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Hiram R. Chirino 2006-03-05 13:07:48 +00:00
parent 8f8bfee0be
commit bfe91884be
37 changed files with 172 additions and 186 deletions

View File

@ -17,13 +17,12 @@
using ActiveMQ.Commands;
using JMS;
namespace ActiveMQ
{
/// <summary>
/// Exception thrown when the broker returns an error
/// </summary>
namespace ActiveMQ
{
public class BrokerException : JMSException
{

View File

@ -17,12 +17,12 @@
using ActiveMQ.Commands;
using System;
namespace ActiveMQ.Commands
{
/// <summary>
/// Summary description for AbstractCommand.
/// </summary>
namespace ActiveMQ.Commands
{
public abstract class AbstractCommand : Command
{
private short commandId;

View File

@ -17,14 +17,12 @@
using ActiveMQ.Commands;
using JMS;
using System;
namespace ActiveMQ.Commands
{
/// <summary>
/// Summary description for ActiveMQDestination.
/// </summary>
namespace ActiveMQ.Commands
{
public abstract class ActiveMQDestination : AbstractCommand, IDestination
{

View File

@ -18,12 +18,12 @@ using ActiveMQ.Commands;
using JMS;
using System;
namespace ActiveMQ.Commands
{
/// <summary>
/// Summary description for ActiveMQQueue.
/// </summary>
namespace ActiveMQ.Commands
{
public class ActiveMQQueue : ActiveMQDestination, IQueue
{
public const byte ID_ActiveMQQueue = 100;

View File

@ -18,12 +18,12 @@ using ActiveMQ.Commands;
using JMS;
using System;
namespace ActiveMQ.Commands
{
/// <summary>
/// A Temporary Queue
/// </summary>
namespace ActiveMQ.Commands
{
public class ActiveMQTempQueue : ActiveMQTempDestination, ITemporaryQueue
{
public const byte ID_ActiveMQTempQueue = 102;

View File

@ -18,12 +18,12 @@ using ActiveMQ.Commands;
using JMS;
using System;
namespace ActiveMQ.Commands
{
/// <summary>
/// A Temporary Topic
/// </summary>
namespace ActiveMQ.Commands
{
public class ActiveMQTempTopic : ActiveMQTempDestination, ITemporaryTopic
{
public const byte ID_ActiveMQTempTopic = 103;

View File

@ -18,12 +18,12 @@ using ActiveMQ.Commands;
using JMS;
using System;
namespace ActiveMQ.Commands
{
/// <summary>
/// Summary description for ActiveMQTopic.
/// </summary>
namespace ActiveMQ.Commands
{
public class ActiveMQTopic : ActiveMQDestination, ITopic
{
public const byte ID_ActiveMQTopic = 101;

View File

@ -28,14 +28,10 @@ namespace ActiveMQ.Commands
public string MethodName;
public int LineNumber;
}
}
/// <summary>
/// Represents an exception on the broker
/// </summary>
namespace ActiveMQ.Commands
{
public class BrokerError : AbstractCommand
{
private string message;

View File

@ -16,12 +16,12 @@
*/
using ActiveMQ.Commands;
namespace ActiveMQ.Commands
{
/// <summary>
/// An OpenWire command
/// </summary>
namespace ActiveMQ.Commands
{
public interface Command : DataStructure
{
short CommandId

View File

@ -14,14 +14,12 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
namespace ActiveMQ.Commands
{
/// <summary>
/// An OpenWire command
/// </summary>
namespace ActiveMQ.Commands
{
public interface DataStructure
{

View File

@ -16,12 +16,12 @@
*/
using ActiveMQ.Commands;
namespace ActiveMQ.Commands
{
/// <summary>
/// Summary description for DataStructureSupport.
/// </summary>
namespace ActiveMQ.Commands
{
public abstract class DataStructureSupport : DataStructure
{

View File

@ -16,12 +16,12 @@
*/
using ActiveMQ.OpenWire;
namespace ActiveMQ.Commands
{
/// <summary>
/// Represents a marshallable entity
/// </summary>
namespace ActiveMQ.Commands
{
public interface MarshallAware
{

View File

@ -20,12 +20,12 @@ using System;
using System.Collections;
using System.Threading;
namespace ActiveMQ
{
/// <summary>
/// Handles the multi-threaded dispatching between the transport and the consumers
/// </summary>
namespace ActiveMQ
{
public class Dispatcher
{
Queue queue = new Queue();

View File

@ -18,12 +18,12 @@ using ActiveMQ.Commands;
using System;
using System.Threading;
namespace ActiveMQ.Transport
{
/// <summary>
/// Handles asynchronous responses
/// </summary>
namespace ActiveMQ.Transport
{
public class FutureResponse : IAsyncResult
{

View File

@ -19,14 +19,14 @@ using ActiveMQ.Transport;
using JMS;
using System;
/// <summary>
/// Represents the logical networking transport layer.
/// </summary>
namespace ActiveMQ.Transport
{
public delegate void CommandHandler(ITransport sender, Command command);
public delegate void ExceptionHandler(ITransport sender, Exception command);
/// <summary>
/// Represents the logical networking transport layer.
/// </summary>
public interface ITransport : IStartable, IDisposable
{
void Oneway(Command command);

View File

@ -19,11 +19,12 @@ using ActiveMQ.Transport;
using JMS;
using System;
namespace ActiveMQ.Transport
{
/// <summary>
/// A Transport filter that is used to log the commands sent and received.
/// </summary>
namespace ActiveMQ.Transport
{
public class LoggingTransport : TransportFilter
{
public LoggingTransport(ITransport next) : base(next) {
@ -31,12 +32,12 @@ namespace ActiveMQ.Transport
protected override void OnCommand(ITransport sender, Command command) {
Console.WriteLine("RECEIVED: " + command);
this.command(sender, command);
this.commandHandler(sender, command);
}
protected override void OnException(ITransport sender, Exception error) {
Console.WriteLine("RECEIVED Exception: " + error);
this.exception(sender, error);
this.exceptionHandler(sender, error);
}
public override void Oneway(Command command)

View File

@ -19,11 +19,12 @@ using ActiveMQ.Transport;
using JMS;
using System;
namespace ActiveMQ.Transport
{
/// <summary>
/// A Transport which gaurds access to the next transport using a mutex.
/// </summary>
namespace ActiveMQ.Transport
{
public class MutexTransport : TransportFilter
{

View File

@ -22,11 +22,12 @@ using ActiveMQ.Commands;
using ActiveMQ.Transport;
using JMS;
namespace ActiveMQ.Transport
{
/// <summary>
/// A Transport which gaurds access to the next transport using a mutex.
/// </summary>
namespace ActiveMQ.Transport
{
public class ResponseCorrelator : TransportFilter
{
@ -86,7 +87,7 @@ namespace ActiveMQ.Transport
{
ExceptionResponse er = (ExceptionResponse) response;
BrokerError brokerError = er.Exception;
this.exception(this, new BrokerException(brokerError));
this.exceptionHandler(this, new BrokerException(brokerError));
}
future.Response = response;
}
@ -95,7 +96,7 @@ namespace ActiveMQ.Transport
Console.WriteLine("ERROR: Unknown response ID: " + response.CommandId + " for response: " + response);
}
} else {
this.command(sender, command);
this.commandHandler(sender, command);
}
}

View File

@ -25,14 +25,12 @@ using System.Net;
using System.Net.Sockets;
using System.Threading;
namespace ActiveMQ.Transport.Tcp
{
/// <summary>
/// An implementation of ITransport that uses sockets to communicate with the broker
/// </summary>
namespace ActiveMQ.Transport.Tcp
{
public class TcpTransport : ITransport
{
private Socket socket;
@ -43,8 +41,8 @@ namespace ActiveMQ.Transport.Tcp
private bool started;
volatile private bool closed;
public CommandHandler command;
public ExceptionHandler exception;
private CommandHandler commandHandlerHandlerHandlerHandlerHandler;
private ExceptionHandler exceptionHandler;
public TcpTransport(Socket socket)
{
@ -58,9 +56,9 @@ namespace ActiveMQ.Transport.Tcp
{
if (!started)
{
if( command == null )
if( commandHandlerHandlerHandlerHandlerHandler == null )
throw new InvalidOperationException ("command cannot be null when Start is called.");
if( exception == null )
if( exceptionHandler == null )
throw new InvalidOperationException ("exception cannot be null when Start is called.");
started = true;
@ -110,7 +108,7 @@ namespace ActiveMQ.Transport.Tcp
try
{
Command command = (Command) wireformat.Unmarshal(socketReader);
this.command(this, command);
this.commandHandlerHandlerHandlerHandlerHandler(this, command);
}
catch (ObjectDisposedException)
{
@ -118,7 +116,7 @@ namespace ActiveMQ.Transport.Tcp
}
catch (Exception e)
{
this.exception(this,e);
this.exceptionHandler(this,e);
}
}
}
@ -129,13 +127,13 @@ namespace ActiveMQ.Transport.Tcp
// Implementation methods
public CommandHandler Command {
get { return command; }
set { this.command = value; }
get { return commandHandlerHandlerHandlerHandlerHandler; }
set { this.commandHandlerHandlerHandlerHandlerHandler = value; }
}
public ExceptionHandler Exception {
get { return exception; }
set { this.exception = value; }
get { return exceptionHandler; }
set { this.exceptionHandler = value; }
}
}

View File

@ -19,16 +19,17 @@ using ActiveMQ.Transport;
using JMS;
using System;
namespace ActiveMQ.Transport
{
/// <summary>
/// Used to implement a filter on the transport layer.
/// </summary>
namespace ActiveMQ.Transport
{
public class TransportFilter : ITransport
{
protected readonly ITransport next;
protected CommandHandler command;
protected ExceptionHandler exception;
protected CommandHandler commandHandler;
protected ExceptionHandler exceptionHandler;
public TransportFilter(ITransport next) {
this.next = next;
@ -37,11 +38,11 @@ namespace ActiveMQ.Transport
}
protected virtual void OnCommand(ITransport sender, Command command) {
this.command(sender, command);
this.commandHandler(sender, command);
}
protected virtual void OnException(ITransport sender, Exception command) {
this.exception(sender, command);
this.exceptionHandler(sender, command);
}
@ -79,9 +80,9 @@ namespace ActiveMQ.Transport
/// </summary>
public virtual void Start()
{
if( command == null )
if( commandHandler == null )
throw new InvalidOperationException ("command cannot be null when Start is called.");
if( exception == null )
if( exceptionHandler == null )
throw new InvalidOperationException ("exception cannot be null when Start is called.");
this.next.Start();
}
@ -95,13 +96,13 @@ namespace ActiveMQ.Transport
}
public CommandHandler Command {
get { return command; }
set { this.command = value; }
get { return commandHandler; }
set { this.commandHandler = value; }
}
public ExceptionHandler Exception {
get { return exception; }
set { this.exception = value; }
get { return exceptionHandler; }
set { this.exceptionHandler = value; }
}
}

View File

@ -16,12 +16,12 @@
*/
using JMS;
namespace JMS
{
/// <summary>
/// Represents a binary based message
/// </summary>
namespace JMS
{
public interface IBytesMessage : IMessage
{

View File

@ -16,13 +16,12 @@
*/
using JMS;
namespace JMS
{
/// <summary>
/// A Factory of IConnection objects
/// </summary>
namespace JMS
{
public interface IConnectionFactory
{

View File

@ -14,14 +14,12 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
namespace JMS
{
/// <summary>
/// Summary description for Destination.
/// </summary>
namespace JMS
{
public interface IDestination
{
}

View File

@ -16,13 +16,13 @@
*/
using JMS;
namespace JMS
{
/// <summary>
/// Represents a Map message which contains key and value pairs which are
/// of primitive types
/// </summary>
namespace JMS
{
public interface IMapMessage : IMessage
{
IPrimitiveMap Body

View File

@ -16,12 +16,12 @@
*/
using JMS;
namespace JMS
{
/// <summary>
/// Represents a message either to be sent to a message broker or received from a message broker
/// </summary>
namespace JMS
{
public interface IMessage
{

View File

@ -17,17 +17,13 @@
using JMS;
using System;
namespace JMS
{
public delegate void MessageListener(IMessage message);
}
/// <summary>
/// A consumer of messages
/// </summary>
namespace JMS
{
public interface IMessageConsumer : IDisposable
{

View File

@ -17,12 +17,12 @@
using JMS;
using System;
namespace JMS
{
/// <summary>
/// An object capable of sending messages to some destination
/// </summary>
namespace JMS
{
public interface IMessageProducer : IDisposable
{

View File

@ -16,13 +16,13 @@
*/
using System.Collections;
namespace JMS
{
/// <summary>
/// Represents a Map of primitive types where the keys are all string instances
/// and the values are strings or numbers.
/// </summary>
namespace JMS
{
public interface IPrimitiveMap
{

View File

@ -17,12 +17,12 @@
using JMS;
using System;
namespace JMS
{
/// <summary>
/// Summary description for IQueue.
/// </summary>
namespace JMS
{
public interface IQueue : IDestination
{

View File

@ -17,13 +17,13 @@
using JMS;
using System;
namespace JMS
{
/// <summary>
/// Represents a single unit of work on an IConnection.
/// So the ISession can be used to perform transactional receive and sends
/// </summary>
namespace JMS
{
public interface ISession : IDisposable
{

View File

@ -16,12 +16,12 @@
*/
using JMS;
namespace JMS
{
/// <summary>
/// Summary description for ITemporaryQueue.
/// </summary>
namespace JMS
{
public interface ITemporaryQueue : IDestination
{
}

View File

@ -16,12 +16,12 @@
*/
using JMS;
namespace JMS
{
/// <summary>
/// Summary description for TemporaryTopic.
/// </summary>
namespace JMS
{
public interface ITemporaryTopic : IDestination
{
}

View File

@ -16,12 +16,12 @@
*/
using JMS;
namespace JMS
{
/// <summary>
/// Represents a text based message
/// </summary>
namespace JMS
{
public interface ITextMessage : IMessage
{

View File

@ -17,12 +17,12 @@
using JMS;
using System;
namespace JMS
{
/// <summary>
/// Summary description for ITopic.
/// </summary>
namespace JMS
{
public interface ITopic : IDestination
{

View File

@ -16,15 +16,15 @@
*/
using System;
namespace JMS
{
/// <summary>
/// Represents a connection failure.
/// </summary>
namespace JMS
{
public class ConnectionException : JMSException
{
public JMSException(string message) : base(message)
public ConnectionException(string message) : base(message)
{
}
}

View File

@ -16,12 +16,12 @@
*/
using System;
namespace JMS
{
/// <summary>
/// Represents a JMS exception
/// </summary>
namespace JMS
{
public class JMSException : Exception
{
public JMSException(string message) : base(message)

View File

@ -120,7 +120,7 @@ namespace ActiveMQ.OpenWire
dis.ReadByte();
Assert.Fail("Should have reached the end of the stream");
}
catch (IOException e)
catch (IOException)
{
}
}