diff options
| author | Ted Ross <tross@apache.org> | 2010-06-09 11:59:38 +0000 |
|---|---|---|
| committer | Ted Ross <tross@apache.org> | 2010-06-09 11:59:38 +0000 |
| commit | 077b8b25ab7fac22daf8494feb125cd5c73b95ac (patch) | |
| tree | f0f2d8b17c7ef912d16d3110bc18790006bbd87a /cpp/bindings/qpid/dotnet/src/sessionreceiver | |
| parent | b6b344dccb18ed44500232e492573244b8a6bdf3 (diff) | |
| download | qpid-python-077b8b25ab7fac22daf8494feb125cd5c73b95ac.tar.gz | |
QPID-2589 Cleanup pass to address function naming, capitalization rules, change Qpid messaging 'list' representation from List<> to Collection<>,
some exception cleanup.
Patch from Chuck Rolke
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@952968 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/bindings/qpid/dotnet/src/sessionreceiver')
| -rw-r--r-- | cpp/bindings/qpid/dotnet/src/sessionreceiver/Properties/AssemblyInfo.cs | 4 | ||||
| -rw-r--r-- | cpp/bindings/qpid/dotnet/src/sessionreceiver/sessionreceiver.cs | 38 |
2 files changed, 21 insertions, 21 deletions
diff --git a/cpp/bindings/qpid/dotnet/src/sessionreceiver/Properties/AssemblyInfo.cs b/cpp/bindings/qpid/dotnet/src/sessionreceiver/Properties/AssemblyInfo.cs index 57f83add20..19c1ea9da1 100644 --- a/cpp/bindings/qpid/dotnet/src/sessionreceiver/Properties/AssemblyInfo.cs +++ b/cpp/bindings/qpid/dotnet/src/sessionreceiver/Properties/AssemblyInfo.cs @@ -24,11 +24,11 @@ using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
-[assembly: AssemblyTitle("org.apache.qpid.messaging.sessionreceiver")]
+[assembly: AssemblyTitle("Org.Apache.Qpid.Messaging.SessionReceiver")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
-[assembly: AssemblyProduct("org.apache.qpid.messaging.sessionreceiver")]
+[assembly: AssemblyProduct("Org.Apache.Qpid.Messaging.SessionReceiver")]
[assembly: AssemblyCopyright("Copyright © 2010")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
diff --git a/cpp/bindings/qpid/dotnet/src/sessionreceiver/sessionreceiver.cs b/cpp/bindings/qpid/dotnet/src/sessionreceiver/sessionreceiver.cs index 73956ecdef..c5a1a7eecc 100644 --- a/cpp/bindings/qpid/dotnet/src/sessionreceiver/sessionreceiver.cs +++ b/cpp/bindings/qpid/dotnet/src/sessionreceiver/sessionreceiver.cs @@ -23,9 +23,9 @@ using System; using System.Collections.Generic;
using System.Linq;
using System.Text;
-using org.apache.qpid.messaging;
+using Org.Apache.Qpid.Messaging;
-namespace org.apache.qpid.messaging.sessionreceiver
+namespace Org.Apache.Qpid.Messaging.SessionReceiver
{
/// <summary>
/// ISessionReceiver interface defines the callback for users to supply.
@@ -43,19 +43,19 @@ namespace org.apache.qpid.messaging.sessionreceiver /// <summary>
- /// eventEngine - wait for messages from the underlying C++ code.
+ /// EventEngine - wait for messages from the underlying C++ code.
/// When available get them and deliver them via callback to our
/// client through the ISessionReceiver interface.
/// This class consumes the thread that calls the Run() function.
/// </summary>
- internal class eventEngine
+ internal class EventEngine
{
private Session session;
private ISessionReceiver callback;
private bool keepRunning;
- public eventEngine(Session theSession, ISessionReceiver thecallback)
+ public EventEngine(Session theSession, ISessionReceiver thecallback)
{
this.session = theSession;
this.callback = thecallback;
@@ -65,35 +65,35 @@ namespace org.apache.qpid.messaging.sessionreceiver /// Function to call Session's nextReceiver, discover messages,
/// and to deliver messages through the callback.
/// </summary>
- public void open()
+ public void Open()
{
- Receiver rcvr = session.createReceiver();
+ Receiver rcvr = session.CreateReceiver();
Message msg;
keepRunning = true;
while (keepRunning)
{
- if (session.nextReceiver(rcvr, DurationConstants.SECOND))
+ if (session.NextReceiver(rcvr, DurationConstants.SECOND))
{
if (keepRunning)
{
- msg = rcvr.fetch(DurationConstants.SECOND);
+ msg = rcvr.Fetch(DurationConstants.SECOND);
this.callback.SessionReceiver(rcvr, msg);
}
}
//else
// receive timed out
- // eventEngine exits the nextReceiver() function periodically
+ // EventEngine exits the nextReceiver() function periodically
// in order to test the keepRunning flag
}
// Private thread is now exiting.
}
/// <summary>
- /// Function to stop the eventEngine. Private thread will exit within
+ /// Function to stop the EventEngine. Private thread will exit within
/// one second.
/// </summary>
- public void close()
+ public void Close()
{
keepRunning = false;
}
@@ -104,9 +104,9 @@ namespace org.apache.qpid.messaging.sessionreceiver /// server is the class that users instantiate to connect a SessionReceiver
/// callback to the stream of received messages received on a Session.
/// </summary>
- public class server
+ public class CallbackServer
{
- private eventEngine ee;
+ private EventEngine ee;
/// <summary>
/// Constructor for the server.
@@ -114,20 +114,20 @@ namespace org.apache.qpid.messaging.sessionreceiver /// <param name="session">The Session whose messages are collected.</param>
/// <param name="callback">The user function call with each message.</param>
///
- public server(Session session, ISessionReceiver callback)
+ public CallbackServer(Session session, ISessionReceiver callback)
{
- ee = new eventEngine(session, callback);
+ ee = new EventEngine(session, callback);
new System.Threading.Thread(
- new System.Threading.ThreadStart(ee.open)).Start();
+ new System.Threading.ThreadStart(ee.Open)).Start();
}
/// <summary>
/// Function to stop the server.
/// </summary>
- public void close()
+ public void Close()
{
- ee.close();
+ ee.Close();
}
}
}
|
