@Test public void testEqualsCode() { JmsConnectionInfo first = new JmsConnectionInfo(firstId); JmsConnectionInfo second = new JmsConnectionInfo(secondId); assertEquals(first, first); assertEquals(second, second); assertFalse(first.equals(second)); assertFalse(second.equals(first)); assertFalse(first.equals(null)); assertFalse(second.equals("test")); }
@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } JmsConnectionInfo other = (JmsConnectionInfo) obj; return connectionId.equals(other.connectionId); }
JmsConnectionInfo extends JmsAbstractResource implements Comparable<JmsConnectionInfo> { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } JmsConnectionInfo other = (JmsConnectionInfo) obj; return connectionId.equals(other.connectionId); } }
JmsConnectionInfo extends JmsAbstractResource implements Comparable<JmsConnectionInfo> { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } JmsConnectionInfo other = (JmsConnectionInfo) obj; return connectionId.equals(other.connectionId); } JmsConnectionInfo(JmsConnectionId connectionId); }
JmsConnectionInfo extends JmsAbstractResource implements Comparable<JmsConnectionInfo> { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } JmsConnectionInfo other = (JmsConnectionInfo) obj; return connectionId.equals(other.connectionId); } JmsConnectionInfo(JmsConnectionId connectionId); JmsConnectionInfo copy(); boolean isForceAsyncSend(); void setForceAsyncSend(boolean forceAsyncSend); boolean isForceSyncSend(); void setForceSyncSend(boolean forceSyncSend); @Override JmsConnectionId getId(); URI getConfiguredURI(); void setConfiguredURI(URI uri); URI getConnectedURI(); void setConnectedURI(URI connectedURI); String getClientId(); void setClientId(String clientId, boolean explicitClientID); boolean isExplicitClientID(); String getUsername(); void setUsername(String username); String getPassword(); void setPassword(String password); String getQueuePrefix(); void setQueuePrefix(String queuePrefix); String getTopicPrefix(); void setTopicPrefix(String topicPrefix); boolean isValidatePropertyNames(); void setValidatePropertyNames(boolean validatePropertyNames); long getCloseTimeout(); void setCloseTimeout(long closeTimeout); long getConnectTimeout(); void setConnectTimeout(long connectTimeout); long getSendTimeout(); void setSendTimeout(long sendTimeout); long getRequestTimeout(); void setRequestTimeout(long requestTimeout); boolean isLocalMessagePriority(); void setLocalMessagePriority(boolean localMessagePriority); boolean isForceAsyncAcks(); void setForceAsyncAcks(boolean forceAsyncAcks); boolean isReceiveLocalOnly(); void setReceiveLocalOnly(boolean receiveLocalOnly); boolean isReceiveNoWaitLocalOnly(); void setReceiveNoWaitLocalOnly(boolean receiveNoWaitLocalOnly); boolean isLocalMessageExpiry(); void setLocalMessageExpiry(boolean localMessageExpiry); JmsPrefetchPolicy getPrefetchPolicy(); void setPrefetchPolicy(JmsPrefetchPolicy prefetchPolicy); JmsRedeliveryPolicy getRedeliveryPolicy(); void setRedeliveryPolicy(JmsRedeliveryPolicy redeliveryPolicy); JmsPresettlePolicy getPresettlePolicy(); void setPresettlePolicy(JmsPresettlePolicy presettlePolicy); JmsMessageIDPolicy getMessageIDPolicy(); void setMessageIDPolicy(JmsMessageIDPolicy messageIDPolicy); boolean isPopulateJMSXUserID(); void setPopulateJMSXUserID(boolean populateMessageUserID); byte[] getEncodedUsername(); JmsDeserializationPolicy getDeserializationPolicy(); void setDeserializationPolicy(JmsDeserializationPolicy deserializationPolicy); boolean isUseDaemonThread(); void setUseDaemonThread(boolean useDaemonThread); boolean isAwaitClientID(); void setAwaitClientID(boolean awaitClientID); boolean isCloseLinksThatFailOnReconnect(); void setCloseLinksThatFailOnReconnect(boolean closeLinksThatFailOnReconnect); EnumMap<JmsConnectionExtensions, BiFunction<Connection, URI, Object>> getExtensionMap(); JmsConnection getConnection(); void setConnection(JmsConnection connection); @Override String toString(); @Override int hashCode(); @Override boolean equals(Object obj); @Override int compareTo(JmsConnectionInfo other); @Override void visit(JmsResourceVistor vistor); void setTracer(JmsTracer tracer); JmsTracer getTracer(); }
JmsConnectionInfo extends JmsAbstractResource implements Comparable<JmsConnectionInfo> { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } JmsConnectionInfo other = (JmsConnectionInfo) obj; return connectionId.equals(other.connectionId); } JmsConnectionInfo(JmsConnectionId connectionId); JmsConnectionInfo copy(); boolean isForceAsyncSend(); void setForceAsyncSend(boolean forceAsyncSend); boolean isForceSyncSend(); void setForceSyncSend(boolean forceSyncSend); @Override JmsConnectionId getId(); URI getConfiguredURI(); void setConfiguredURI(URI uri); URI getConnectedURI(); void setConnectedURI(URI connectedURI); String getClientId(); void setClientId(String clientId, boolean explicitClientID); boolean isExplicitClientID(); String getUsername(); void setUsername(String username); String getPassword(); void setPassword(String password); String getQueuePrefix(); void setQueuePrefix(String queuePrefix); String getTopicPrefix(); void setTopicPrefix(String topicPrefix); boolean isValidatePropertyNames(); void setValidatePropertyNames(boolean validatePropertyNames); long getCloseTimeout(); void setCloseTimeout(long closeTimeout); long getConnectTimeout(); void setConnectTimeout(long connectTimeout); long getSendTimeout(); void setSendTimeout(long sendTimeout); long getRequestTimeout(); void setRequestTimeout(long requestTimeout); boolean isLocalMessagePriority(); void setLocalMessagePriority(boolean localMessagePriority); boolean isForceAsyncAcks(); void setForceAsyncAcks(boolean forceAsyncAcks); boolean isReceiveLocalOnly(); void setReceiveLocalOnly(boolean receiveLocalOnly); boolean isReceiveNoWaitLocalOnly(); void setReceiveNoWaitLocalOnly(boolean receiveNoWaitLocalOnly); boolean isLocalMessageExpiry(); void setLocalMessageExpiry(boolean localMessageExpiry); JmsPrefetchPolicy getPrefetchPolicy(); void setPrefetchPolicy(JmsPrefetchPolicy prefetchPolicy); JmsRedeliveryPolicy getRedeliveryPolicy(); void setRedeliveryPolicy(JmsRedeliveryPolicy redeliveryPolicy); JmsPresettlePolicy getPresettlePolicy(); void setPresettlePolicy(JmsPresettlePolicy presettlePolicy); JmsMessageIDPolicy getMessageIDPolicy(); void setMessageIDPolicy(JmsMessageIDPolicy messageIDPolicy); boolean isPopulateJMSXUserID(); void setPopulateJMSXUserID(boolean populateMessageUserID); byte[] getEncodedUsername(); JmsDeserializationPolicy getDeserializationPolicy(); void setDeserializationPolicy(JmsDeserializationPolicy deserializationPolicy); boolean isUseDaemonThread(); void setUseDaemonThread(boolean useDaemonThread); boolean isAwaitClientID(); void setAwaitClientID(boolean awaitClientID); boolean isCloseLinksThatFailOnReconnect(); void setCloseLinksThatFailOnReconnect(boolean closeLinksThatFailOnReconnect); EnumMap<JmsConnectionExtensions, BiFunction<Connection, URI, Object>> getExtensionMap(); JmsConnection getConnection(); void setConnection(JmsConnection connection); @Override String toString(); @Override int hashCode(); @Override boolean equals(Object obj); @Override int compareTo(JmsConnectionInfo other); @Override void visit(JmsResourceVistor vistor); void setTracer(JmsTracer tracer); JmsTracer getTracer(); static final long INFINITE; static final long DEFAULT_CONNECT_TIMEOUT; static final long DEFAULT_CLOSE_TIMEOUT; static final long DEFAULT_SEND_TIMEOUT; static final long DEFAULT_REQUEST_TIMEOUT; }