@Test public void testCopy() { JmsConnectionInfo info = new JmsConnectionInfo(firstId); info.setForceSyncSend(true); info.setClientId("test", true); info.setCloseTimeout(100); info.setConnectTimeout(200); info.setForceAsyncSend(true); info.setPassword("pass"); info.setQueuePrefix("queue"); info.setRequestTimeout(50); info.setSendTimeout(150); info.setTopicPrefix("topic"); info.setUsername("user"); boolean validatePropertyNames = !info.isValidatePropertyNames(); info.setValidatePropertyNames(validatePropertyNames); boolean awaitClientID = !info.isAwaitClientID(); info.setAwaitClientID(awaitClientID); info.setMessageIDPolicy(new JmsDefaultMessageIDPolicy()); info.setPrefetchPolicy(new JmsDefaultPrefetchPolicy()); info.setPresettlePolicy(new JmsDefaultPresettlePolicy()); info.setRedeliveryPolicy(new JmsDefaultRedeliveryPolicy()); JmsConnectionInfo copy = info.copy(); assertEquals(true, copy.isForceSyncSend()); assertEquals("test", copy.getClientId()); assertEquals(true, copy.isExplicitClientID()); assertEquals(awaitClientID, copy.isAwaitClientID()); assertEquals(100, copy.getCloseTimeout()); assertEquals(200, copy.getConnectTimeout()); assertEquals(true, copy.isForceAsyncSend()); assertEquals("pass", copy.getPassword()); assertEquals("queue", copy.getQueuePrefix()); assertEquals(50, copy.getRequestTimeout()); assertEquals(150, copy.getSendTimeout()); assertEquals("topic", copy.getTopicPrefix()); assertEquals("user", copy.getUsername()); assertEquals(validatePropertyNames, copy.isValidatePropertyNames()); assertNotSame(info.getPrefetchPolicy(), copy.getPrefetchPolicy()); assertNotSame(info.getPresettlePolicy(), copy.getPresettlePolicy()); assertNotSame(info.getRedeliveryPolicy(), copy.getRedeliveryPolicy()); assertNotSame(info.getMessageIDPolicy(), copy.getMessageIDPolicy()); assertEquals(info, copy); }
public JmsConnectionInfo copy() { JmsConnectionInfo copy = new JmsConnectionInfo(connectionId); copy(copy); return copy; }
JmsConnectionInfo extends JmsAbstractResource implements Comparable<JmsConnectionInfo> { public JmsConnectionInfo copy() { JmsConnectionInfo copy = new JmsConnectionInfo(connectionId); copy(copy); return copy; } }
JmsConnectionInfo extends JmsAbstractResource implements Comparable<JmsConnectionInfo> { public JmsConnectionInfo copy() { JmsConnectionInfo copy = new JmsConnectionInfo(connectionId); copy(copy); return copy; } JmsConnectionInfo(JmsConnectionId connectionId); }
JmsConnectionInfo extends JmsAbstractResource implements Comparable<JmsConnectionInfo> { public JmsConnectionInfo copy() { JmsConnectionInfo copy = new JmsConnectionInfo(connectionId); copy(copy); return copy; } 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> { public JmsConnectionInfo copy() { JmsConnectionInfo copy = new JmsConnectionInfo(connectionId); copy(copy); return copy; } 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; }