public Host(DomainName _domainName) { super(); this._domainName = _domainName; this._ipAddress = null; this._value = _domainName.getValue().toString().toCharArray(); }
public static DomainName getDefaultInstance(String defaultValue) { return new DomainName(defaultValue); }
@ConstructorProperties("value") public DomainName(java.lang.String _value) { if (_value != null) { check_valueLength(_value); } Preconditions.checkNotNull(_value, "Supplied value may not be null"); for (Pattern p : patterns) { Preconditions.checkArgument(p.matcher(_value).matches(), "Supplied value \"%s\" does not match required pattern \"%s\"", _value, p); } this._value = _value; }
@Override public int hashCode() { if (hashValid) { return hash; } final int prime = 31; int result = 1; result = prime * result + ((_flag == null) ? 0 : _flag.hashCode()); result = prime * result + ((_name == null) ? 0 : _name.hashCode()); result = prime * result + ((_prefix == null) ? 0 : _prefix.hashCode()); result = prime * result + ((_routerId == null) ? 0 : _routerId.hashCode()); result = prime * result + ((augmentation == null) ? 0 : augmentation.hashCode()); hash = result; hashValid = true; return result; }
return false; } else if(!_domainName.equals(other._domainName)) { return false;
@Override public int hashCode() { if (hashValid) { return hash; } final int prime = 31; int result = 1; result = prime * result + ((_flag == null) ? 0 : _flag.hashCode()); result = prime * result + ((_name == null) ? 0 : _name.hashCode()); result = prime * result + ((_prefix == null) ? 0 : _prefix.hashCode()); result = prime * result + ((_routerId == null) ? 0 : _routerId.hashCode()); result = prime * result + ((augmentation == null) ? 0 : augmentation.hashCode()); hash = result; hashValid = true; return result; }
return false; } else if(!_name.equals(other.getName())) { return false;
public IgpNodeAttributesBuilder setName(DomainName value) { if (value != null) { check_nameLength(value.getValue()); } this._name = value; return this; } /**
public static DomainName getDefaultInstance(String defaultValue) { return new DomainName(defaultValue); }
@Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((_ipAddress == null) ? 0 : _ipAddress.hashCode()); result = prime * result + ((_domainName == null) ? 0 : _domainName.hashCode()); result = prime * result + ((_value == null) ? 0 : Arrays.hashCode(_value)); return result; }
return false; } else if(!_name.equals(other.getName())) { return false;
@ConstructorProperties("value") public DomainName(java.lang.String _value) { if (_value != null) { check_valueLength(_value); } Preconditions.checkNotNull(_value, "Supplied value may not be null"); for (Pattern p : patterns) { Preconditions.checkArgument(p.matcher(_value).matches(), "Supplied value \"%s\" does not match required pattern \"%s\"", _value, p); } this._value = _value; }
public IgpNodeAttributesBuilder setName(DomainName value) { if (value != null) { check_nameLength(value.getValue()); } this._name = value; return this; } /**
DomainName domainName = new DomainName(defaultValue); return new Host(domainName);
public char[] getValue() { if (_value == null) { if (_ipAddress != null) { _value = _ipAddress.getValue(); } else if (_domainName != null) { _value = _domainName.getValue().toString().toCharArray(); } } return _value == null ? null : _value.clone(); }
DomainName domainName = new DomainName(defaultValue); return new Host(domainName);
private InetSocketAddress getSocketAddress() { if(getAddress().getDomainName() != null) { return new InetSocketAddress(getAddress().getDomainName().getValue(), getPort().getValue()); } else { final IpAddress ipAddress = getAddress().getIpAddress(); final String ip = ipAddress.getIpv4Address() != null ? ipAddress.getIpv4Address().getValue() : ipAddress.getIpv6Address().getValue(); return new InetSocketAddress(ip, getPort().getValue()); } }
@Override public Session toManagementSession() { SessionBuilder builder = new SessionBuilder(); builder.setSessionId(getSessionId()); builder.setSourceHost(new Host(new DomainName(header.getAddress()))); Preconditions.checkState(DateAndTime.PATTERN_CONSTANTS.size() == 1); String formattedDateTime = formatDateTime(loginTime); Matcher matcher = dateTimePattern.matcher(formattedDateTime); Preconditions.checkState(matcher.matches(), "Formatted datetime %s does not match pattern %s", formattedDateTime, dateTimePattern); builder.setLoginTime(new DateAndTime(formattedDateTime)); builder.setInBadRpcs(new ZeroBasedCounter32(inRpcFail)); builder.setInRpcs(new ZeroBasedCounter32(inRpcSuccess)); builder.setOutRpcErrors(new ZeroBasedCounter32(outRpcError)); builder.setUsername(header.getUserName()); builder.setTransport(getTransportForString(header.getTransport())); builder.setOutNotifications(new ZeroBasedCounter32(0L)); builder.setKey(new SessionKey(getSessionId())); Session1Builder builder1 = new Session1Builder(); builder1.setSessionIdentifier(header.getSessionIdentifier()); builder.addAugmentation(Session1.class, builder1.build()); return builder.build(); }