Class NicInterfaceCriteria

java.lang.Object
org.jboss.as.controller.interfaces.AbstractInterfaceCriteria
org.jboss.as.controller.interfaces.NicInterfaceCriteria
All Implemented Interfaces:
Serializable, Comparable<InterfaceCriteria>, InterfaceCriteria

public class NicInterfaceCriteria extends AbstractInterfaceCriteria
InterfaceCriteria that tests whether a given name matches the network interface's name.
Author:
Brian Stansberry
See Also:
  • Constructor Details

    • NicInterfaceCriteria

      public NicInterfaceCriteria(String name)
      Creates a new AnyInterfaceCriteria
      Parameters:
      name - the criteria to check to see if any are satisfied. Cannot be null
      Throws:
      IllegalArgumentException - if criteria is null
  • Method Details

    • getAcceptableName

      public String getAcceptableName()
    • isAcceptable

      protected InetAddress isAcceptable(NetworkInterface networkInterface, InetAddress address) throws SocketException
      Gets whether the given network interface and address are acceptable for use. Acceptance is indicated by returning the address which should be used for binding against the network interface; typically this is the given address parameter. For those criteria which override the configured address, the override address should be returned.
      Specified by:
      isAcceptable in class AbstractInterfaceCriteria
      Parameters:
      networkInterface - the network interface. Cannot be null
      address - an address that is associated with networkInterface. Cannot be null
      Returns:
      address if the acceptable name equals networkInterface's name.
      Throws:
      SocketException - if evaluating the state of networkInterface results in one
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object