Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Copyright (C) 2014-2015 Regents of the University of California.

Author(s):
Jeff Thompson <jefft0@remap.ucla.edu> This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. A copy of the GNU Lesser General Public License is in the file COPYING.
 
 
 package net.named_data.jndn;

A ForwardingFlags object holds the flags which specify how the forwarding daemon should forward an interest for a registered prefix. We use a separate ForwardingFlags object to retain future compatibility if the daemon forwarding bits are changed, amended or deprecated.
 
 public class ForwardingFlags {
  
Create a new ForwardingFlags with "active" and "childInherit" set and all other flags cleared.
 
   public ForwardingFlags() {}

  
Create a new ForwardingFlags as a copy of the given value.

Parameters:
forwardingFlags The ForwardingFlags to copy.
 
   public ForwardingFlags(ForwardingFlags forwardingFlags)
   {
      = forwardingFlags.active_;
      = forwardingFlags.childInherit_;
      = forwardingFlags.advertise_;
      = forwardingFlags.last_;
      = forwardingFlags.capture_;
      = forwardingFlags.local_;
      = forwardingFlags.tap_;
      = forwardingFlags.captureOk_;
   }

  
Get the value of the "active" flag.

Returns:
true if the flag is set, false if it is cleared.
 
   public final boolean
   getActive() { return ; }

  
Get the value of the "childInherit" flag.

Returns:
true if the flag is set, false if it is cleared.
 
   public final boolean
   getChildInherit() { return ; }

  
Get the value of the "advertise" flag.

Returns:
true if the flag is set, false if it is cleared.
 
   public final boolean
   getAdvertise() { return ; }

  
Get the value of the "last" flag.

Returns:
true if the flag is set, false if it is cleared.
 
   public final boolean
   getLast() { return ; }

  
Get the value of the "capture" flag.

Returns:
true if the flag is set, false if it is cleared.
 
   public final boolean
   getCapture() { return ; }

  
Get the value of the "local" flag.

Returns:
true if the flag is set, false if it is cleared.
 
   public final boolean
   getLocal() { return ; }

  
Get the value of the "tap" flag.

Returns:
true if the flag is set, false if it is cleared.
 
   public final boolean
   getTap() { return ; }

  
Get the value of the "captureOk" flag.

Returns:
true if the flag is set, false if it is cleared.
  public final boolean
  getCaptureOk() { return ; }

  
Set the value of the "active" flag

Parameters:
active true to set the flag, false to clear it.
  public final void
  setActive(boolean active) {  = active; }

  
Set the value of the "childInherit" flag

Parameters:
childInherit true to set the flag, false to clear it.
  public final void
  setChildInherit(boolean childInherit) {  = childInherit; }

  
Set the value of the "advertise" flag

Parameters:
advertise true to set the flag, false to clear it.
  public final void
  setAdvertise(boolean advertise) {  = advertise; }

  
Set the value of the "last" flag

Parameters:
last true to set the flag, false to clear it.
  public final void
  setLast(boolean last) {  = last; }

  
Set the value of the "capture" flag

Parameters:
capture true to set the flag, false to clear it.
  public final void
  setCapture(boolean capture) {  = capture; }

  
Set the value of the "local" flag

Parameters:
local true to set the flag, false to clear it.
  public final void
  setLocal(boolean local) {  = local; }

  
Set the value of the "tap" flag

Parameters:
tap true to set the flag, false to clear it.
  public final void
  setTap(boolean tap) {  = tap; }

  
Set the value of the "captureOk" flag

Parameters:
captureOk true to set the flag, false to clear it.
  public final void
  setCaptureOk(boolean captureOk) {  = captureOk; }

  
Get an integer with the bits set according to the flags as used by the ForwardingEntry message.

Returns:
An integer with the bits set.
  public final int
  {
    int result = 0;
    if ()
      result |= ;
    if ()
      result |= ;
    if ()
      result |= ;
    if ()
      result |= ;
    if ()
      result |= ;
    if ()
      result |= ;
    if ()
      result |= ;
    if ()
      result |= ;
    return result;
  }

  
Set the flags according to the bits in forwardingEntryFlags as used by the ForwardingEntry message.

Parameters:
forwardingEntryFlags An integer with the bits set.
  public final void
  setForwardingEntryFlags(int forwardingEntryFlags)
  {
     = (forwardingEntryFlags & ) != 0;
     = (forwardingEntryFlags & ) != 0;
     = (forwardingEntryFlags & ) != 0;
     = (forwardingEntryFlags & ) != 0;
     = (forwardingEntryFlags & ) != 0;
     = (forwardingEntryFlags & ) != 0;
     = (forwardingEntryFlags & ) != 0;
     = (forwardingEntryFlags & ) != 0;
  }

  
Get an integer with the bits set according to the NFD forwarding flags as used in the ControlParameters of the command interest.

Returns:
An integer with the bits set.
  public final int
  {
    int result = 0;
    if ()
      result |= ;
    if ()
      result |= ;
    return result;
  }

  
Set the flags according to the NFD forwarding flags as used in the ControlParameters of the command interest.

Parameters:
nfdForwardingFlags An integer with the bits set.
  public final void
  setNfdForwardingFlags(int nfdForwardingFlags)
  {
     = (nfdForwardingFlags & ) != 0;
     = (nfdForwardingFlags & ) != 0;
  }
  private static final int ForwardingEntryFlags_ACTIVE         = 1;
  private static final int ForwardingEntryFlags_CHILD_INHERIT  = 2;
  private static final int ForwardingEntryFlags_ADVERTISE      = 4;
  private static final int ForwardingEntryFlags_LAST           = 8;
  private static final int ForwardingEntryFlags_CAPTURE       = 16;
  private static final int ForwardingEntryFlags_LOCAL         = 32;
  private static final int ForwardingEntryFlags_TAP           = 64;
  private static final int ForwardingEntryFlags_CAPTURE_OK   = 128;
  private static final int NfdForwardingFlags_CHILD_INHERIT  = 1;
  private static final int NfdForwardingFlags_CAPTURE  =       2;
  private boolean active_ = true;
  private boolean childInherit_ = true;
  private boolean advertise_ = false;
  private boolean last_ = false;
  private boolean capture_ = false;
  private boolean local_ = false;
  private boolean tap_ = false;
  private boolean captureOk_ = false;
New to GrepCode? Check out our FAQ X