예제 #1
0
        /// <summary>
        /// Override to submit a task to use the thread pool given to the constructor.
        /// Also wrap the supplied onData, onTimeout and onNetworkNack callbacks in an
        /// outer callback which submits a task to the thread pool to call the supplied
        /// callback. See Face.expressInterest for calling details. We make a separate
        /// expressInterest overload for supplying a Name vs. Interest to avoid making
        /// multiple copies of the Interest.
        /// </summary>
        ///
        public override long expressInterest(Name name, Interest interestTemplate,
                                             OnData onData, OnTimeout onTimeout,
                                             OnNetworkNack onNetworkNack, WireFormat wireFormat_0)
        {
            long pendingInterestId_1 = node_.getNextEntryId();

            // Wrap callbacks to submit to the thread pool.
            OnData finalOnData_2  = onData;
            OnData onDataSubmit_3 = new ThreadPoolFace.Anonymous_C10(this, finalOnData_2);

            OnTimeout finalOnTimeout_4  = onTimeout;
            OnTimeout onTimeoutSubmit_5 = (onTimeout == null) ? null
                                        : new ThreadPoolFace.Anonymous_C9(this, finalOnTimeout_4);

            OnNetworkNack finalOnNetworkNack_6  = onNetworkNack;
            OnNetworkNack onNetworkNackSubmit_7 = (onNetworkNack == null) ? null
                                        : new ThreadPoolFace.Anonymous_C8(this, finalOnNetworkNack_6);

            // Make an interest copy as required by Node.expressInterest.
            Interest interestCopy_8 = net.named_data.jndn.Face.getInterestCopy(name, interestTemplate);

            threadPool_.submit(new ThreadPoolFace.Anonymous_C7(this, onTimeoutSubmit_5, onDataSubmit_3, interestCopy_8,
                                                               wireFormat_0, pendingInterestId_1, onNetworkNackSubmit_7));

            return(pendingInterestId_1);
        }
예제 #2
0
 public Anonymous_C21(ThreadPoolFace.Anonymous_C10 paramouter_Anonymous_C10,
                      Interest localInterest_0, Data data_1)
 {
     this.localInterest       = localInterest_0;
     this.data                = data_1;
     this.outer_Anonymous_C10 = paramouter_Anonymous_C10;
 }
예제 #3
0
                public Anonymous_C21(ThreadPoolFace.Anonymous_C10  paramouter_Anonymous_C10,
										Data data_0, Interest localInterest_1)
                {
                    this.data = data_0;
                                    this.localInterest = localInterest_1;
                                    this.outer_Anonymous_C10 = paramouter_Anonymous_C10;
                }
예제 #4
0
        /// <summary>
        /// Override to submit a task to use the thread pool given to the constructor.
        /// Also wrap the supplied onData, onTimeout and onNetworkNack callbacks in an
        /// outer callback which submits a task to the thread pool to call the supplied
        /// callback. See Face.expressInterest for calling details. We make a separate
        /// expressInterest overload for supplying a Name vs. Interest to avoid making
        /// multiple copies of the Interest.
        /// </summary>
        ///
        public override long expressInterest(Name name, Interest interestTemplate,
				OnData onData, OnTimeout onTimeout,
				OnNetworkNack onNetworkNack, WireFormat wireFormat_0)
        {
            long pendingInterestId_1 = node_.getNextEntryId();

            // Wrap callbacks to submit to the thread pool.
            OnData finalOnData_2 = onData;
            OnData onDataSubmit_3 = new ThreadPoolFace.Anonymous_C10 (this, finalOnData_2);

            OnTimeout finalOnTimeout_4 = onTimeout;
            OnTimeout onTimeoutSubmit_5 = (onTimeout == null) ? null
                    : new ThreadPoolFace.Anonymous_C9 (this, finalOnTimeout_4);

            OnNetworkNack finalOnNetworkNack_6 = onNetworkNack;
            OnNetworkNack onNetworkNackSubmit_7 = (onNetworkNack == null) ? null
                    : new ThreadPoolFace.Anonymous_C8 (this, finalOnNetworkNack_6);

            // Make an interest copy as required by Node.expressInterest.
            Interest interestCopy_8 = net.named_data.jndn.Face.getInterestCopy(name, interestTemplate);
            threadPool_.submit(new ThreadPoolFace.Anonymous_C7 (this, onDataSubmit_3, onTimeoutSubmit_5, interestCopy_8,
                    onNetworkNackSubmit_7, wireFormat_0, pendingInterestId_1));

            return pendingInterestId_1;
        }