Beispiel #1
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);
                }
            }
        }
Beispiel #2
0
 public Anonymous_C9(Consumer.Anonymous_C5 paramouter_Anonymous_C5)
 {
     this.outer_Anonymous_C5 = paramouter_Anonymous_C5;
 }
Beispiel #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, interest_2, onData_3, onError_1);

            // 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);
                }
            }
        }
Beispiel #4
0
 public Anonymous_C15(Consumer.Anonymous_C5  paramouter_Anonymous_C5)
 {
     this.outer_Anonymous_C5 = paramouter_Anonymous_C5;
 }