Esempio n. 1
0
 public Anonymous_C6(Consumer paramouter_Consumer,
                     Consumer.OnConsumeComplete onConsumeComplete_0, net.named_data.jndn.encrypt.EncryptError.OnError onError_1)
 {
     this.onConsumeComplete = onConsumeComplete_0;
     this.onError           = onError_1;
     this.outer_Consumer    = paramouter_Consumer;
 }
Esempio n. 2
0
        /// <summary>
        /// Express an Interest to fetch the content packet with contentName, and
        /// decrypt it, fetching keys as needed.
        /// </summary>
        ///
        /// <param name="contentName">The name of the content packet.</param>
        /// <param name="onConsumeComplete_0">contentData is the fetched Data packet and result is the decrypted plain text Blob. NOTE: The library will log any exceptions thrown by this callback, but for better error handling the callback should catch and properly handle any exceptions.</param>
        /// <param name="onError_1">better error handling the callback should catch and properly handle any exceptions.</param>
        /// <param name="link_2">getDelegations().size() is zero, don't use it.</param>
        public void consume(Name contentName,
                            Consumer.OnConsumeComplete onConsumeComplete_0, net.named_data.jndn.encrypt.EncryptError.OnError onError_1,
                            Link link_2)
        {
            Interest interest = new Interest(contentName);

            // Copy the Link object since the passed link may become invalid.
            sendInterest(interest, 1, new Link(link_2), new Consumer.Anonymous_C6(this, onConsumeComplete_0, onError_1), onError_1);
        }
Esempio n. 3
0
        /// <summary>
        /// Express an Interest to fetch the content packet with contentName, and
        /// decrypt it, fetching keys as needed.
        /// </summary>
        ///
        /// <param name="contentName">The name of the content packet.</param>
        /// <param name="onConsumeComplete_0">contentData is the fetched Data packet and result is the decrypted plain text Blob. NOTE: The library will log any exceptions thrown by this callback, but for better error handling the callback should catch and properly handle any exceptions.</param>
        /// <param name="onError_1">better error handling the callback should catch and properly handle any exceptions.</param>
        public void consume(Name contentName,
                            Consumer.OnConsumeComplete onConsumeComplete_0, net.named_data.jndn.encrypt.EncryptError.OnError onError_1)
        {
            Interest interest_2 = new Interest(contentName);

            // Prepare the callback functions.
            OnData onData_3 = new Consumer.Anonymous_C6(this, onConsumeComplete_0, onError_1);

            OnTimeout onTimeout = new Consumer.Anonymous_C5(this, onError_1, interest_2, onData_3);

            // Express the Interest.
            try {
                face_.expressInterest(interest_2, onData_3, onTimeout);
            } catch (IOException ex) {
                try {
                    onError_1.onError(net.named_data.jndn.encrypt.EncryptError.ErrorCode.IOException,
                                      "expressInterest error: " + ex.Message);
                } catch (Exception exception) {
                    logger_.log(ILOG.J2CsMapping.Util.Logging.Level.SEVERE, "Error in onError", exception);
                }
            }
        }
Esempio n. 4
0
 /// <summary>
 /// Express an Interest to fetch the content packet with contentName, and
 /// decrypt it, fetching keys as needed.
 /// </summary>
 ///
 /// <param name="contentName">The name of the content packet.</param>
 /// <param name="onConsumeComplete_0">contentData is the fetched Data packet and result is the decrypted plain text Blob. NOTE: The library will log any exceptions thrown by this callback, but for better error handling the callback should catch and properly handle any exceptions.</param>
 /// <param name="onError_1">better error handling the callback should catch and properly handle any exceptions.</param>
 public void consume(Name contentName,
                     Consumer.OnConsumeComplete onConsumeComplete_0, net.named_data.jndn.encrypt.EncryptError.OnError onError_1)
 {
     consume(contentName, onConsumeComplete_0, onError_1, NO_LINK);
 }
Esempio n. 5
0
            public Anonymous_C6(Consumer paramouter_Consumer,
						Consumer.OnConsumeComplete  onConsumeComplete_0, net.named_data.jndn.encrypt.EncryptError.OnError  onError_1)
            {
                this.onConsumeComplete = onConsumeComplete_0;
                    this.onError = onError_1;
                    this.outer_Consumer = paramouter_Consumer;
            }