@Test public void testSupportsHostAddress() throws Exception { SystemComponent requirement = new SystemComponent(TCPConnectivity.ID); requirement.put(TCPConnectivity.HOST_ADDRESS, "127.0.0.1"); TCPConnectivity tcpConnectivity = new TCPConnectivity(); tcpConnectivity.define(TCPConnectivity.HOST_ADDRESS, "127.0.0.1"); Assert.assertTrue(tcpConnectivity.supports(requirement)); }
@Override public boolean supports(final SystemComponent requirement) { boolean supports = hasBasicSupport(requirement.getName(), requirement.getClassName()); if(supports) { String hostAddress = (String) requirement.getAttributes().get(HOST_ADDRESS); String hostName = (String) requirement.getAttributes().get(HOST_NAME); if(hostAddress!=null) { supports = hostAddress.equals(getValue(HOST_ADDRESS)); } else { supports = hostName.equalsIgnoreCase((String) getValue(HOST_NAME)); } } return supports; }
TCPConnectivity extends ConnectivityCapability { @Override public boolean supports(final SystemComponent requirement) { boolean supports = hasBasicSupport(requirement.getName(), requirement.getClassName()); if(supports) { String hostAddress = (String) requirement.getAttributes().get(HOST_ADDRESS); String hostName = (String) requirement.getAttributes().get(HOST_NAME); if(hostAddress!=null) { supports = hostAddress.equals(getValue(HOST_ADDRESS)); } else { supports = hostName.equalsIgnoreCase((String) getValue(HOST_NAME)); } } return supports; } }
TCPConnectivity extends ConnectivityCapability { @Override public boolean supports(final SystemComponent requirement) { boolean supports = hasBasicSupport(requirement.getName(), requirement.getClassName()); if(supports) { String hostAddress = (String) requirement.getAttributes().get(HOST_ADDRESS); String hostName = (String) requirement.getAttributes().get(HOST_NAME); if(hostAddress!=null) { supports = hostAddress.equals(getValue(HOST_ADDRESS)); } else { supports = hostName.equalsIgnoreCase((String) getValue(HOST_NAME)); } } return supports; } TCPConnectivity();  TCPConnectivity(final String description); }
TCPConnectivity extends ConnectivityCapability { @Override public boolean supports(final SystemComponent requirement) { boolean supports = hasBasicSupport(requirement.getName(), requirement.getClassName()); if(supports) { String hostAddress = (String) requirement.getAttributes().get(HOST_ADDRESS); String hostName = (String) requirement.getAttributes().get(HOST_NAME); if(hostAddress!=null) { supports = hostAddress.equals(getValue(HOST_ADDRESS)); } else { supports = hostName.equalsIgnoreCase((String) getValue(HOST_NAME)); } } return supports; } TCPConnectivity();  TCPConnectivity(final String description); @Override boolean supports(final SystemComponent requirement); }
TCPConnectivity extends ConnectivityCapability { @Override public boolean supports(final SystemComponent requirement) { boolean supports = hasBasicSupport(requirement.getName(), requirement.getClassName()); if(supports) { String hostAddress = (String) requirement.getAttributes().get(HOST_ADDRESS); String hostName = (String) requirement.getAttributes().get(HOST_NAME); if(hostAddress!=null) { supports = hostAddress.equals(getValue(HOST_ADDRESS)); } else { supports = hostName.equalsIgnoreCase((String) getValue(HOST_NAME)); } } return supports; } TCPConnectivity();  TCPConnectivity(final String description); @Override boolean supports(final SystemComponent requirement); static final String IPv6_NIC; static final String IPv4_NIC; static final String HOST_ADDRESS; static final String HOST_NAME; static final String ID; }