public Map<String, String> toMap() { Map<String, String> map = new LinkedHashMap<>(); map.put("address", m_address == null ? null : InetAddrUtils.str(m_address)); map.put("proxyFor", m_proxyFor == null ? null : InetAddrUtils.str(m_proxyFor)); map.put("port", Integer.toString(getPort())); map.put("timeout", Integer.toString(getTimeout())); map.put("retries", Integer.toString(getRetries())); map.put("max-vars-per-pdu", Integer.toString(getMaxVarsPerPdu())); map.put("max-repetitions", Integer.toString(getMaxRepetitions())); map.put("max-request-size", Integer.toString(getMaxRequestSize())); map.put("version", Integer.toString(getVersion())); map.put("security-level", Integer.toString(getSecurityLevel())); map.put("security-name", getSecurityName()); map.put("auth-passphrase", getAuthPassPhrase()); map.put("auth-protocol", getAuthProtocol()); map.put("priv-passphrase", getPrivPassPhrase()); map.put("priv-protocol", getPrivProtocol()); map.put("context-name", getContextName()); map.put("engine-id", getEngineId()); map.put("context-engine-id", getContextEngineId()); map.put("enterprise-id", getEnterpriseId()); map.put("read-community", getReadCommunity()); map.put("write-community", getWriteCommunity()); return map; }
buff.append(", PrivProtocol: " + getPrivProtocol()); buff.append(", ContextName: " + getContextName()); buff.append(", EngineId: " + getEngineId()); buff.append(", ContextEngineId: " + getContextEngineId()); buff.append(", EnterpriseId:" + getEnterpriseId());
System.out.println("PrivProtocol: " + agent.getPrivProtocol()); System.out.println("ContextName: " + agent.getContextName()); System.out.println("EngineId: " + agent.getEngineId()); System.out.println("ContextEngineId: " + agent.getContextEngineId()); System.out.println("EnterpriseId: " + agent.getEnterpriseId());
&& Objects.equals(getPrivPassPhrase(), other.getPrivPassPhrase()) && Objects.equals(getPrivProtocol(), other.getPrivProtocol()) && Objects.equals(getEngineId(), other.getEngineId()) && Objects.equals(getContextEngineId(), other.getContextEngineId()) && Objects.equals(getEnterpriseId(), other.getEnterpriseId())
@Override public int hashCode() { int hash = Objects.hash(getAddress(), getProxyFor(), getPort(), getTimeout(), getRetries(), getMaxVarsPerPdu(), getMaxRepetitions(), getMaxRequestSize(), getVersion(), getSecurityLevel(), getSecurityName(), getAuthPassPhrase(), getAuthProtocol(), getPrivPassPhrase(), getPrivProtocol(), getContextName(), getEngineId(), getContextEngineId(), getEnterpriseId(), getReadCommunity(), getWriteCommunity()); return hash; }
m_privPassPhrase = config.getPrivPassPhrase(); m_privProtocol = config.getPrivProtocol(); m_engineId = config.getEngineId(); m_contextEngineId = config.getContextEngineId(); m_contextName = config.getContextName();
m_privPassPhrase = config.getPrivPassPhrase(); m_privProtocol = config.getPrivProtocol(); m_engineId = config.getEngineId(); m_contextEngineId = config.getContextEngineId(); m_contextName = config.getContextName();