congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
Subnet.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
org.apache.mina.filter.firewall.Subnet
constructor

Best Java code snippets using org.apache.mina.filter.firewall.Subnet.<init> (Showing top 8 results out of 315)

origin: org.apache.mina/mina-core

/**
 * Unblocks the specified endpoint.
 * 
 * @param address The address to unblock
 */
public void unblock(InetAddress address) {
  if (address == null) {
    throw new IllegalArgumentException("Adress to unblock can not be null");
  }
  unblock(new Subnet(address, 32));
}
origin: org.apache.directory.api/api-ldap-client-all

/**
 * Blocks the specified endpoint.
 * 
 * @param address The address to block
 */
public void block(InetAddress address) {
  if (address == null) {
    throw new IllegalArgumentException("Adress to block can not be null");
  }
  block(new Subnet(address, 32));
}
origin: kaazing/gateway

/**
 * Blocks the specified endpoint.
 */
public void block(InetAddress address) {
  if (address == null) {
    throw new NullPointerException("Adress to block can not be null");
  }
  block(new Subnet(address, 32));
}
origin: kaazing/gateway

/**
 * Unblocks the specified endpoint.
 */
public void unblock(InetAddress address) {
  if (address == null) {
    throw new NullPointerException("Adress to unblock can not be null");
  }
  
  unblock(new Subnet(address, 32));
}
origin: org.apache.mina/mina-core

/**
 * Blocks the specified endpoint.
 * 
 * @param address The address to block
 */
public void block(InetAddress address) {
  if (address == null) {
    throw new IllegalArgumentException("Adress to block can not be null");
  }
  block(new Subnet(address, 32));
}
origin: org.apache.directory.api/api-ldap-client-all

/**
 * Unblocks the specified endpoint.
 * 
 * @param address The address to unblock
 */
public void unblock(InetAddress address) {
  if (address == null) {
    throw new IllegalArgumentException("Adress to unblock can not be null");
  }
  unblock(new Subnet(address, 32));
}
origin: org.apache.ftpserver/ftpserver-core

  return add(new Subnet(InetAddress.getByName(tokens[0]), Integer
      .parseInt(tokens[1])));
} else {
  return add(new Subnet(InetAddress.getByName(tokens[0]), 32));
origin: org.apache.ftpserver/ftpserver-core

/**
 * Creates a SessionFilter that blacklists the given IP addresses and/or
 * Subnets.
 * 
 * @param blockedAddresses
 *            the addresses to block
 * @param blockedSubnets
 *            the subnets to block
 * @return a SessionFilter that blacklists the given IP addresses and/or
 *         Subnets.
 */
private static SessionFilter createBlackListFilter(
    List<InetAddress> blockedAddresses, List<Subnet> blockedSubnets) {
  if (blockedAddresses == null && blockedSubnets == null) {
    return null;
  }
  // Initialize the IP filter with Deny type
  RemoteIpFilter ipFilter = new RemoteIpFilter(IpFilterType.DENY);
  if (blockedSubnets != null) {
    ipFilter.addAll(blockedSubnets);
  }
  if (blockedAddresses != null) {
    for (InetAddress address : blockedAddresses) {
      ipFilter.add(new Subnet(address, 32));
    }
  }
  return ipFilter;
}
org.apache.mina.filter.firewallSubnet<init>

Javadoc

Creates a subnet from CIDR notation. For example, the subnet 192.168.0.0/24 would be created using the InetAddress 192.168.0.0 and the mask 24.

Popular methods of Subnet

  • inSubnet
    Checks if the InetAddress is within this subnet
  • toInt
    Converts an IP address into an integer
  • toSubnet
    Converts an IP address to a subnet using the provided mask
  • toLong
    Converts an IP address into a long

Popular in Java

  • Parsing JSON documents to java classes using gson
  • getSharedPreferences (Context)
  • scheduleAtFixedRate (Timer)
  • putExtra (Intent)
  • Menu (java.awt)
  • TimerTask (java.util)
    The TimerTask class represents a task to run at a specified time. The task may be run once or repeat
  • BlockingQueue (java.util.concurrent)
    A java.util.Queue that additionally supports operations that wait for the queue to become non-empty
  • TimeUnit (java.util.concurrent)
    A TimeUnit represents time durations at a given unit of granularity and provides utility methods to
  • JButton (javax.swing)
  • JFileChooser (javax.swing)
  • Top Vim plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now