Stomp Client. ATTENTION: This is a disposable class.
Inheritance: IStompClient
Example #1
0
        /// <summary>
        /// Constructor of a connector for STOMP 1.2.
        /// </summary>
        /// <param name="inStream">Stream for incoming data from STOMP service.</param>
        /// <param name="outStream">Stream for outgoing data to STOMP service.</param>
        /// <param name="host">Virtual host to connect to STOMP service.</param>
        /// <param name="user">Username to authenticate to STOMP service.</param>
        /// <param name="password">Password to authenticate to STOMP service.</param>
        /// <param name="retryInterval">When sending messages that requires receipt confirmation,
        /// this interval specifies how much time to wait before sending the frame again if 
        /// no receipt is received.</param>
        /// <param name="useRandomNumberGenerator">Flag to indicate random numbers must 
        /// be used when creating sequence numbers for receipts, subscriptions and transactions</param>
        public Stomp12Connector(
            Stream inStream, 
            Stream outStream, 
            string host, 
            string user = null, 
            string password = null,
            TimeSpan? retryInterval = null,
            bool useRandomNumberGenerator = false)
        {
            if(host == null)
                throw new ArgumentNullException("host");

            _cts = new CancellationTokenSource();
            _client = new Stomp12Client(inStream, outStream, retryInterval, useRandomNumberGenerator);

            _host = host;
            _user = user;
            _password = password;
        }
Example #2
0
 public StompConnectionBase(StompClient client, string transactionId = null)
 {
     Client = client;
     TransactionId = transactionId;
 }
Example #3
0
 public StompTransaction(StompClient client, string id)
     : base(client, id)
 {
 }
Example #4
0
        public StompConnection(StompClient client)
            : base(client)
        {

        }