Author: clebert.suconic(a)jboss.com
Date: 2011-11-09 13:45:28 -0500 (Wed, 09 Nov 2011)
New Revision: 11680
Modified:
branches/Branch_2_2_EAP/src/main/org/hornetq/core/config/BridgeConfiguration.java
Log:
Adding a new constructor for being compatible on the API
Modified:
branches/Branch_2_2_EAP/src/main/org/hornetq/core/config/BridgeConfiguration.java
===================================================================
---
branches/Branch_2_2_EAP/src/main/org/hornetq/core/config/BridgeConfiguration.java 2011-11-09
14:48:11 UTC (rev 11679)
+++
branches/Branch_2_2_EAP/src/main/org/hornetq/core/config/BridgeConfiguration.java 2011-11-09
18:45:28 UTC (rev 11680)
@@ -16,6 +16,8 @@
import java.io.Serializable;
import java.util.List;
+import org.hornetq.api.core.client.HornetQClient;
+
/**
* A BridgeConfiguration
*
@@ -40,7 +42,7 @@
private List<String> staticConnectors;
private String discoveryGroupName;
-
+
private boolean ha;
private String transformerClassName;
@@ -56,17 +58,55 @@
private int confirmationWindowSize;
private final long clientFailureCheckPeriod;
-
+
private String user;
-
+
private String password;
private final long connectionTTL;
-
+
private final long maxRetryInterval;
-
+
private final int minLargeMessageSize;
+ /**
+ * For backward compatibility on the API... no MinLargeMessage on this constructor
+ */
+ public BridgeConfiguration(final String name,
+ final String queueName,
+ final String forwardingAddress,
+ final String filterString,
+ final String transformerClassName,
+ final long retryInterval,
+ final double retryIntervalMultiplier,
+ final int reconnectAttempts,
+ final boolean useDuplicateDetection,
+ final int confirmationWindowSize,
+ final long clientFailureCheckPeriod,
+ final List<String> staticConnectors,
+ final boolean ha,
+ final String user,
+ final String password)
+ {
+ this(name,
+ queueName,
+ forwardingAddress,
+ filterString,
+ transformerClassName,
+ HornetQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE,
+ clientFailureCheckPeriod,
+ HornetQClient.DEFAULT_CONNECTION_TTL,
+ retryInterval,
+ retryInterval,
+ retryIntervalMultiplier,
+ reconnectAttempts,
+ useDuplicateDetection,
+ confirmationWindowSize,
+ staticConnectors,
+ ha,
+ user,
+ password);
+ }
public BridgeConfiguration(final String name,
final String queueName,
@@ -100,13 +140,53 @@
this.confirmationWindowSize = confirmationWindowSize;
this.clientFailureCheckPeriod = clientFailureCheckPeriod;
this.staticConnectors = staticConnectors;
- this. user = user;
+ this.user = user;
this.password = password;
this.connectionTTL = connectionTTL;
this.maxRetryInterval = maxRetryInterval;
discoveryGroupName = null;
}
+ /**
+ * For backward compatibility on the API... no MinLareMessage, checkPeriod and TTL
on this constructor
+ */
+
+ public BridgeConfiguration(final String name,
+ final String queueName,
+ final String forwardingAddress,
+ final String filterString,
+ final String transformerClassName,
+ final long retryInterval,
+ final double retryIntervalMultiplier,
+ final int reconnectAttempts,
+ final boolean useDuplicateDetection,
+ final int confirmationWindowSize,
+ final long clientFailureCheckPeriod,
+ final String discoveryGroupName,
+ final boolean ha,
+ final String user,
+ final String password)
+ {
+ this(name,
+ queueName,
+ forwardingAddress,
+ filterString,
+ transformerClassName,
+ HornetQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE,
+ clientFailureCheckPeriod,
+ HornetQClient.DEFAULT_CONNECTION_TTL,
+ retryInterval,
+ retryInterval,
+ retryIntervalMultiplier,
+ reconnectAttempts,
+ useDuplicateDetection,
+ confirmationWindowSize,
+ discoveryGroupName,
+ ha,
+ user,
+ password);
+ }
+
public BridgeConfiguration(final String name,
final String queueName,
final String forwardingAddress,
@@ -197,7 +277,7 @@
{
return discoveryGroupName;
}
-
+
public boolean isHA()
{
return ha;
@@ -288,7 +368,7 @@
{
this.discoveryGroupName = discoveryGroupName;
}
-
+
/**
*
* @param ha is the bridge supporting HA?