| Modifier and Type | Method and Description |
|---|---|
static OnTimeout |
makeOnTimeout(Face face,
OnData onData,
OnTimeout onTimeout)
Return an OnTimeout object to use in expressInterest for onTimeout which
will express the interest again with double the interestLifetime.
|
static OnTimeout |
makeOnTimeout(Face face,
OnData onData,
OnTimeout onTimeout,
double maxInterestLifetime)
Return an OnTimeout object to use in expressInterest for onTimeout which
will express the interest again with double the interestLifetime.
|
void |
onTimeout(Interest interest)
If the interest times out according to the interest lifetime, onTimeout is
called.
|
public static OnTimeout makeOnTimeout(Face face, OnData onData, OnTimeout onTimeout, double maxInterestLifetime)
face - This calls face.expressInterest.onData - When a matching data packet is received, this calls
onData.onData(interest, data) where interest is the interest given to
expressInterest and data is the received Data object. This is normally the
same onData you initially passed to expressInterest.
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.onTimeout - If the interesLifetime goes over maxInterestLifetime, this
calls onTimeout.onTimeout(interest). However, if onTimeout is null, this
does not use it.
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.maxInterestLifetime - The maximum lifetime in milliseconds for
re-expressed interests.public static OnTimeout makeOnTimeout(Face face, OnData onData, OnTimeout onTimeout)
face - This calls face.expressInterest.onData - When a matching data packet is received, this calls
onData.onData(interest, data) where interest is the interest given to
expressInterest and data is the received Data object. This is normally the
same onData you initially passed to expressInterest.
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.onTimeout - If the interesLifetime goes over 16000 milliseconds, this
calls onTimeout.onTimeout(interest). However, if onTimeout is null, this
does not use it.
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.Copyright © 2019. All rights reserved.