@Override public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof DatagramSocketOptions)) return false; if (!super.equals(o)) return false; DatagramSocketOptions that = (DatagramSocketOptions) o; if (broadcast != that.broadcast) return false; if (ipV6 != that.ipV6) return false; if (loopbackModeDisabled != that.loopbackModeDisabled) return false; if (multicastTimeToLive != that.multicastTimeToLive) return false; if (multicastNetworkInterface != null ? !multicastNetworkInterface.equals(that.multicastNetworkInterface) : that.multicastNetworkInterface != null) return false; return true; }
static void toJson(NetworkOptions obj, java.util.Map<String, Object> json) { json.put("logActivity", obj.getLogActivity()); json.put("receiveBufferSize", obj.getReceiveBufferSize()); json.put("reuseAddress", obj.isReuseAddress()); json.put("reusePort", obj.isReusePort()); json.put("sendBufferSize", obj.getSendBufferSize()); json.put("trafficClass", obj.getTrafficClass()); } }
@Override public int hashCode() { int result = super.hashCode(); result = 31 * result + (broadcast ? 1 : 0); result = 31 * result + (loopbackModeDisabled ? 1 : 0); result = 31 * result + multicastTimeToLive; result = 31 * result + (multicastNetworkInterface != null ? multicastNetworkInterface.hashCode() : 0); result = 31 * result + (ipV6 ? 1 : 0); return result; } }
/** * Copy constructor * * @param other the options to copy */ public NetworkOptions(NetworkOptions other) { this.sendBufferSize = other.getSendBufferSize(); this.receiveBufferSize = other.getReceiveBufferSize(); this.reuseAddress = other.isReuseAddress(); this.reusePort = other.isReusePort(); this.trafficClass = other.getTrafficClass(); this.logActivity = other.logActivity; }
case "logActivity": if (member.getValue() instanceof Boolean) { obj.setLogActivity((Boolean)member.getValue()); obj.setReceiveBufferSize(((Number)member.getValue()).intValue()); obj.setReuseAddress((Boolean)member.getValue()); obj.setReusePort((Boolean)member.getValue()); obj.setSendBufferSize(((Number)member.getValue()).intValue()); obj.setTrafficClass(((Number)member.getValue()).intValue());
@Override public TCPSSLOptions setReceiveBufferSize(int receiveBufferSize) { return (TCPSSLOptions) super.setReceiveBufferSize(receiveBufferSize); }
@Override public TCPSSLOptions setLogActivity(boolean logEnabled) { return (TCPSSLOptions) super.setLogActivity(logEnabled); }
@Override public int getReceiveBufferSize() { return super.getReceiveBufferSize(); }
@Override public int getTrafficClass() { return super.getTrafficClass(); }
@Override public int getSendBufferSize() { return super.getSendBufferSize(); }
case "logActivity": if (member.getValue() instanceof Boolean) { obj.setLogActivity((Boolean)member.getValue()); obj.setReceiveBufferSize(((Number)member.getValue()).intValue()); obj.setReuseAddress((Boolean)member.getValue()); obj.setReusePort((Boolean)member.getValue()); obj.setSendBufferSize(((Number)member.getValue()).intValue()); obj.setTrafficClass(((Number)member.getValue()).intValue());
@Override public DatagramSocketOptions setReceiveBufferSize(int receiveBufferSize) { super.setReceiveBufferSize(receiveBufferSize); return this; }
@Override public DatagramSocketOptions setLogActivity(boolean logEnabled) { return (DatagramSocketOptions) super.setLogActivity(logEnabled); }
@Override public int getReceiveBufferSize() { return super.getReceiveBufferSize(); }
@Override public int getTrafficClass() { return super.getTrafficClass(); }
@Override public int getSendBufferSize() { return super.getSendBufferSize(); }
@Override public int hashCode() { int result = super.hashCode(); result = 31 * result + (tcpNoDelay ? 1 : 0); result = 31 * result + (tcpFastOpen ? 1 : 0); result = 31 * result + (tcpCork ? 1 : 0); result = 31 * result + (tcpQuickAck ? 1 : 0); result = 31 * result + (tcpKeepAlive ? 1 : 0); result = 31 * result + soLinger; result = 31 * result + (usePooledBuffers ? 1 : 0); result = 31 * result + idleTimeout; result = 31 * result + (idleTimeoutUnit != null ? idleTimeoutUnit.hashCode() : 0); result = 31 * result + (ssl ? 1 : 0); result = 31 * result + (keyCertOptions != null ? keyCertOptions.hashCode() : 0); result = 31 * result + (trustOptions != null ? trustOptions.hashCode() : 0); result = 31 * result + (enabledCipherSuites != null ? enabledCipherSuites.hashCode() : 0); result = 31 * result + (crlPaths != null ? crlPaths.hashCode() : 0); result = 31 * result + (crlValues != null ? crlValues.hashCode() : 0); result = 31 * result + (useAlpn ? 1 : 0); result = 31 * result + (sslEngineOptions != null ? sslEngineOptions.hashCode() : 0); result = 31 * result + (enabledSecureTransportProtocols != null ? enabledSecureTransportProtocols .hashCode() : 0); return result; } }
@Override public DatagramSocketOptions setReceiveBufferSize(int receiveBufferSize) { super.setReceiveBufferSize(receiveBufferSize); return this; }
@Override public DatagramSocketOptions setLogActivity(boolean logEnabled) { return (DatagramSocketOptions) super.setLogActivity(logEnabled); }
@Override public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof TCPSSLOptions)) return false; if (!super.equals(o)) return false; TCPSSLOptions that = (TCPSSLOptions) o; if (idleTimeout != that.idleTimeout) return false; if (idleTimeoutUnit != null ? !idleTimeoutUnit.equals(that.idleTimeoutUnit) : that.idleTimeoutUnit != null) return false; if (soLinger != that.soLinger) return false; if (ssl != that.ssl) return false; if (tcpKeepAlive != that.tcpKeepAlive) return false; if (tcpNoDelay != that.tcpNoDelay) return false; if (tcpFastOpen != that.tcpFastOpen) return false; if (tcpQuickAck != that.tcpQuickAck) return false; if (tcpCork != that.tcpCork) return false; if (usePooledBuffers != that.usePooledBuffers) return false; if (crlPaths != null ? !crlPaths.equals(that.crlPaths) : that.crlPaths != null) return false; if (crlValues != null ? !crlValues.equals(that.crlValues) : that.crlValues != null) return false; if (enabledCipherSuites != null ? !enabledCipherSuites.equals(that.enabledCipherSuites) : that.enabledCipherSuites != null) return false; if (keyCertOptions != null ? !keyCertOptions.equals(that.keyCertOptions) : that.keyCertOptions != null) return false; if (trustOptions != null ? !trustOptions.equals(that.trustOptions) : that.trustOptions != null) return false; if (useAlpn != that.useAlpn) return false; if (sslEngineOptions != null ? !sslEngineOptions.equals(that.sslEngineOptions) : that.sslEngineOptions != null) return false; if (!enabledSecureTransportProtocols.equals(that.enabledSecureTransportProtocols)) return false; return true; }