add some doc comments for TIBCO wrapper classes. Remove extraneous class no longer used.
This commit is contained in:
@@ -1,9 +0,0 @@
|
||||
|
||||
|
||||
namespace Spring.Messaging.Ems.Common
|
||||
{
|
||||
public class CertificateStoreConfig
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -23,6 +23,9 @@ using TIBCO.EMS;
|
||||
|
||||
namespace Spring.Messaging.Ems.Common
|
||||
{
|
||||
/// <summary>
|
||||
/// A Connection object is a client's active connection to TIBCO EMS Server.
|
||||
/// </summary>
|
||||
public class EmsConnection : IConnection
|
||||
{
|
||||
#region Logging
|
||||
@@ -33,6 +36,10 @@ namespace Spring.Messaging.Ems.Common
|
||||
|
||||
private Connection nativeConnection;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="EmsConnection"/> class.
|
||||
/// </summary>
|
||||
/// <param name="connection">The underlying TIBCO EMS connection.</param>
|
||||
public EmsConnection(Connection connection)
|
||||
{
|
||||
this.nativeConnection = connection;
|
||||
@@ -43,72 +50,138 @@ namespace Spring.Messaging.Ems.Common
|
||||
|
||||
#region Implementation of IConnection
|
||||
|
||||
/// <summary>
|
||||
/// Gets the native TIBCO EMS connection.
|
||||
/// </summary>
|
||||
/// <value>The native connection.</value>
|
||||
public Connection NativeConnection
|
||||
{
|
||||
get { return this.nativeConnection; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Occurs when the client library detects a problem with the connection.
|
||||
/// </summary>
|
||||
public event EMSExceptionHandler EMSExceptionHandler;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the URL of the server this connection is currently connected to
|
||||
/// </summary>
|
||||
/// <value>The active URL.</value>
|
||||
public string ActiveURL
|
||||
{
|
||||
get { return nativeConnection.ActiveURL; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the client ID.
|
||||
/// </summary>
|
||||
/// <value>The client ID.</value>
|
||||
public string ClientID
|
||||
{
|
||||
get { return nativeConnection.ClientID; }
|
||||
set { nativeConnection.ClientID = value; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the connection ID.
|
||||
/// </summary>
|
||||
/// <value>The connection ID.</value>
|
||||
public long ConnID
|
||||
{
|
||||
get { return nativeConnection.ConnID; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the exception listener.
|
||||
/// </summary>
|
||||
/// <value>The exception listener.</value>
|
||||
public IExceptionListener ExceptionListener
|
||||
{
|
||||
get { return nativeConnection.ExceptionListener; }
|
||||
set { nativeConnection.ExceptionListener = value; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets a value indicating whether the connection is closed.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// <c>true</c> if the connection is closed; otherwise, <c>false</c>.
|
||||
/// </value>
|
||||
public bool IsClosed
|
||||
{
|
||||
get { return nativeConnection.IsClosed; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets a value indicating whether the connection communicates with a secure protocol
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// <c>true</c> if the connection communicates with a secure protocol; otherwise, <c>false</c>.
|
||||
/// </value>
|
||||
public bool IsSecure
|
||||
{
|
||||
get { return nativeConnection.IsSecure; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the metadata for this connection
|
||||
/// </summary>
|
||||
/// <value>The metadata for this connection.</value>
|
||||
public ConnectionMetaData MetaData
|
||||
{
|
||||
get { return nativeConnection.MetaData; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Closes the connection and reclaims resources.
|
||||
/// </summary>
|
||||
public void Close()
|
||||
{
|
||||
nativeConnection.Close();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates the session.
|
||||
/// </summary>
|
||||
/// <param name="transacted">if set to <c>true</c> the session has transaction semantcis.</param>
|
||||
/// <param name="acknowledgeMode">Indicates whether and how the consumer is to acknowledge received messages.
|
||||
/// This version of CreateSession accepts an integer value associated with the acknowledge mode described by a Session member and should only be used for backward compatibility.
|
||||
/// This parameter is ignored if the session is transacted.</param>
|
||||
/// <returns>A newly created session.</returns>
|
||||
public ISession CreateSession(bool transacted, int acknowledgeMode)
|
||||
{
|
||||
Session nativeSession = nativeConnection.CreateSession(transacted, acknowledgeMode);
|
||||
return new EmsSession(nativeSession);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates the session.
|
||||
/// </summary>
|
||||
/// <param name="transacted">if set to <c>true</c> [transacted].</param>
|
||||
/// <param name="acknowledgeMode">The acknowledge mode.
|
||||
/// When true, the new session has transaction semantics.
|
||||
/// Indicates whether and how the consumer is to acknowledge received messages.
|
||||
/// Legal values are listed under SessionMode.
|
||||
/// This parameter is ignored if the session is transacted.</param>
|
||||
/// <returns>A newly created session.</returns>
|
||||
public ISession CreateSession(bool transacted, SessionMode acknowledgeMode)
|
||||
{
|
||||
Session nativeSession = nativeConnection.CreateSession(transacted, acknowledgeMode);
|
||||
return new EmsSession(nativeSession);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Starts (or restarts) a connection's delivery of incoming messages.
|
||||
/// </summary>
|
||||
public void Start()
|
||||
{
|
||||
nativeConnection.Start();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Temporarily stops a connection's delivery of incoming messages.
|
||||
/// </summary>
|
||||
public void Stop()
|
||||
{
|
||||
nativeConnection.Stop();
|
||||
|
||||
@@ -24,29 +24,114 @@ using TIBCO.EMS;
|
||||
|
||||
namespace Spring.Messaging.Ems.Common
|
||||
{
|
||||
/// <summary>
|
||||
/// An interface containing all methods and properties on the TIBCO.EMS.Connection class.
|
||||
/// Refer to the TIBCO EMS API documentation for more information.
|
||||
/// </summary>
|
||||
/// <author>Mark Pollack</author>
|
||||
public interface IConnection
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the native TIBCO EMS connection.
|
||||
/// </summary>
|
||||
/// <value>The native connection.</value>
|
||||
Connection NativeConnection { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Occurs when the client library detects a problem with the connection.
|
||||
/// </summary>
|
||||
event EMSExceptionHandler EMSExceptionHandler;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the URL of the server this connection is currently connected to
|
||||
/// </summary>
|
||||
/// <value>The active URL.</value>
|
||||
string ActiveURL { get; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the client ID.
|
||||
/// </summary>
|
||||
/// <value>The client ID.</value>
|
||||
string ClientID { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the connection ID.
|
||||
/// </summary>
|
||||
/// <value>The connection ID.</value>
|
||||
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||
long ConnID { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the exception listener.
|
||||
/// </summary>
|
||||
/// <value>The exception listener.</value>
|
||||
IExceptionListener ExceptionListener { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets a value indicating whether the connection is closed.
|
||||
/// </summary>
|
||||
/// <value><c>true</c> if the connection is closed; otherwise, <c>false</c>.</value>
|
||||
bool IsClosed { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets a value indicating whether the connection communicates with a secure protocol
|
||||
/// </summary>
|
||||
/// <value><c>true</c> if the connection communicates with a secure protocol; otherwise, <c>false</c>.</value>
|
||||
[EditorBrowsable(EditorBrowsableState.Never), Obsolete("EMS clients should no longer use this method; it has been deprecated.")]
|
||||
[Obsolete("EMS clients should no longer use this method; it has been deprecated")]
|
||||
bool IsSecure { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the metadata for this connection
|
||||
/// </summary>
|
||||
/// <value>The metadata for this connection.</value>
|
||||
ConnectionMetaData MetaData { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Closes the connection and reclaims resources.
|
||||
/// </summary>
|
||||
void Close();
|
||||
|
||||
/// <summary>
|
||||
/// Creates the session.
|
||||
/// </summary>
|
||||
/// <param name="transacted">if set to <c>true</c> the session has transaction semantcis.</param>
|
||||
/// <param name="acknowledgeMode">Indicates whether and how the consumer is to acknowledge received messages.
|
||||
/// This version of CreateSession accepts an integer value associated with the acknowledge mode described by a Session member and should only be used for backward compatibility.
|
||||
/// This parameter is ignored if the session is transacted.</param>
|
||||
/// <returns>A newly created session.</returns>
|
||||
ISession CreateSession(bool transacted, int acknowledgeMode);
|
||||
|
||||
/// <summary>
|
||||
/// Creates the session.
|
||||
/// </summary>
|
||||
/// <param name="transacted">if set to <c>true</c> [transacted].</param>
|
||||
/// <param name="acknowledgeMode">The acknowledge mode.
|
||||
/// When true, the new session has transaction semantics.
|
||||
/// Indicates whether and how the consumer is to acknowledge received messages.
|
||||
/// Legal values are listed under SessionMode.
|
||||
/// This parameter is ignored if the session is transacted.
|
||||
/// </param>
|
||||
/// <returns>A newly created session.</returns>
|
||||
ISession CreateSession(bool transacted, SessionMode acknowledgeMode);
|
||||
|
||||
/// <summary>
|
||||
/// Starts (or restarts) a connection's delivery of incoming messages.
|
||||
/// </summary>
|
||||
void Start();
|
||||
|
||||
/// <summary>
|
||||
/// Temporarily stops a connection's delivery of incoming messages.
|
||||
/// </summary>
|
||||
void Stop();
|
||||
|
||||
/// <summary>
|
||||
/// A String representation of the connection object
|
||||
/// </summary>
|
||||
/// <returns>
|
||||
/// A <see cref="System.String"/> that represents this instance.
|
||||
/// </returns>
|
||||
string ToString();
|
||||
}
|
||||
}
|
||||
@@ -25,47 +25,150 @@ using TIBCO.EMS;
|
||||
|
||||
namespace Spring.Messaging.Ems.Common
|
||||
{
|
||||
/// <summary>
|
||||
/// An interface containing all methods and properties on the TIBCO.EMS.ConnectionFactory class.
|
||||
/// Refer to the TIBCO EMS API documentation for more information.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// All the 'GetXXX()' methods in the TIBCO.EMS.ConnectionFactory were translated to .NET properties
|
||||
/// </remarks>
|
||||
/// <author>Mark Pollack</author>
|
||||
public interface IConnectionFactory : ISerializable, ICloneable
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the native TIBCO EMS connection factory.
|
||||
/// </summary>
|
||||
/// <value>The native connection factory.</value>
|
||||
ConnectionFactory NativeConnectionFactory { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Creates the connection.
|
||||
/// </summary>
|
||||
/// <returns>The newly created connection</returns>
|
||||
IConnection CreateConnection();
|
||||
|
||||
/// <summary>
|
||||
/// Creates the connection with the given username and password
|
||||
/// </summary>
|
||||
/// <param name="userName">Name of the user.</param>
|
||||
/// <param name="password">The password.</param>
|
||||
/// <returns></returns>
|
||||
IConnection CreateConnection(string userName, string password);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the certificate store info object associated with this connection factory.
|
||||
/// </summary>
|
||||
/// <value>The certificate store.</value>
|
||||
object CertificateStore { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the SSL proxy host.
|
||||
/// </summary>
|
||||
/// <value>The SSL proxy host.</value>
|
||||
string SSLProxyHost { set; get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the SSL proxy port.
|
||||
/// </summary>
|
||||
/// <value>The SSL proxy port.</value>
|
||||
int SSLProxyPort { set; get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the SSL proxy password.
|
||||
/// </summary>
|
||||
/// <value>The SSL proxy password.</value>
|
||||
string SSLProxyPassword { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the SSL proxy user.
|
||||
/// </summary>
|
||||
/// <value>The SSL proxy user.</value>
|
||||
string SSLProxyUser { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Sets the type of the certificate store.
|
||||
/// </summary>
|
||||
/// <value>The type of the certificate store.</value>
|
||||
IEmsSSLStoreType CertificateStoreType { set; }
|
||||
|
||||
/// <summary>
|
||||
/// Sets the client ID.
|
||||
/// </summary>
|
||||
/// <value>The client ID.</value>
|
||||
string ClientID { set; }
|
||||
|
||||
/// <summary>
|
||||
/// Sets the client tracer to a given output stream
|
||||
/// </summary>
|
||||
/// <value>The client tracer.</value>
|
||||
StreamWriter ClientTracer { set; }
|
||||
|
||||
/// <summary>
|
||||
/// Sets the number of connection attempts
|
||||
/// </summary>
|
||||
/// <value>The number of connection attempts.</value>
|
||||
int ConnAttemptCount { set; }
|
||||
|
||||
/// <summary>
|
||||
/// Sets delay between connection attempts
|
||||
/// </summary>
|
||||
/// <value>The delay between connection attempts.</value>
|
||||
int ConnAttemptDelay { set; }
|
||||
|
||||
/// <summary>
|
||||
/// Sets the connection attempt timeout.
|
||||
/// </summary>
|
||||
/// <value>The connection attempt timeout.</value>
|
||||
int ConnAttemptTimeout { set; }
|
||||
|
||||
/// <summary>
|
||||
/// Sets the custom host name verifier. Set to null to remove custom host name verifier.
|
||||
/// </summary>
|
||||
/// <value>The host name verifier.</value>
|
||||
EMSSSLHostNameVerifier HostNameVerifier { set; }
|
||||
|
||||
/// <summary>
|
||||
/// Sets the load balance metric as an integer.
|
||||
/// </summary>
|
||||
/// <value>The load balance metric as int.</value>
|
||||
int MetricAsInt { set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Sets the port on which the client will connect to the multicast daemon.
|
||||
/// </summary>
|
||||
/// <value>The multicast daemon port.</value>
|
||||
string MulticastDaemon { set; }
|
||||
|
||||
/// <summary>
|
||||
/// Sets whether MessageConsumers subscribed to a multicast-enabled topic will receive messages over multicast.
|
||||
/// </summary>
|
||||
/// <value><c>true</c> to enable multicast; <c>false</c> to disable.</value>
|
||||
bool MulticastEnabled { set; }
|
||||
|
||||
int ReconnAttemptCount { set; }
|
||||
|
||||
int ReconnAttemptDelay { set; }
|
||||
|
||||
int ReconnAttemptTimeout { set; }
|
||||
|
||||
string ServerUrl { set; }
|
||||
|
||||
bool SSLAuthOnly { set; }
|
||||
|
||||
|
||||
string SSLProxyAuthUsername { set; get; }
|
||||
|
||||
string SSLProxyAuthPassword { set; get; }
|
||||
|
||||
bool SSLTrace { set; }
|
||||
|
||||
string TargetHostName { set; }
|
||||
|
||||
string UserName { set; }
|
||||
|
||||
string UserPassword { set; }
|
||||
|
||||
string ToString();
|
||||
|
||||
FactoryLoadBalanceMetric Metric { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -49,7 +49,6 @@
|
||||
<Link>CommonAssemblyInfo.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="AssemblyInfo.cs" />
|
||||
<Compile Include="Messaging\Ems\Common\CertificateStoreConfig.cs" />
|
||||
<Compile Include="Messaging\Ems\Common\EmsConnection.cs" />
|
||||
<Compile Include="Messaging\Ems\Common\EmsConnectionFactory.cs" />
|
||||
<Compile Include="Messaging\Ems\Common\EmsMessageConsumer.cs" />
|
||||
|
||||
Reference in New Issue
Block a user