mirror of https://github.com/apache/activemq.git
set duplex property
git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@516450 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
4569d7d28d
commit
9a79d3411d
|
@ -108,6 +108,7 @@ public abstract class DemandForwardingBridgeSupport implements Bridge {
|
|||
protected int networkTTL = 1;
|
||||
protected final AtomicBoolean remoteInterupted = new AtomicBoolean(false);
|
||||
protected final AtomicBoolean lastConnectSucceeded = new AtomicBoolean(false);
|
||||
protected boolean duplex = false;
|
||||
|
||||
|
||||
public DemandForwardingBridgeSupport(final Transport localBroker, final Transport remoteBroker) {
|
||||
|
@ -269,6 +270,8 @@ public abstract class DemandForwardingBridgeSupport implements Bridge {
|
|||
|
||||
BrokerInfo brokerInfo=new BrokerInfo();
|
||||
brokerInfo.setBrokerName(localBrokerName);
|
||||
brokerInfo.setNetworkConnection(true);
|
||||
brokerInfo.setDuplexConnection(isDuplex());
|
||||
remoteBroker.oneway(brokerInfo);
|
||||
|
||||
SessionInfo remoteSessionInfo=new SessionInfo(remoteConnectionInfo,1);
|
||||
|
@ -899,4 +902,12 @@ public abstract class DemandForwardingBridgeSupport implements Bridge {
|
|||
this.bridgeTempDestinations = bridgeTempDestinations;
|
||||
}
|
||||
|
||||
public boolean isDuplex(){
|
||||
return this.duplex;
|
||||
}
|
||||
|
||||
public void setDuplex(boolean duplex){
|
||||
this.duplex=duplex;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -55,6 +55,7 @@ public abstract class NetworkConnector extends ServiceSupport {
|
|||
private String userName;
|
||||
private String password;
|
||||
private boolean bridgeTempDestinations=true;
|
||||
private boolean duplex = false;
|
||||
|
||||
protected ConnectionFilter connectionFilter;
|
||||
|
||||
|
@ -246,6 +247,7 @@ public abstract class NetworkConnector extends ServiceSupport {
|
|||
result.setPrefetchSize(prefetchSize);
|
||||
result.setDispatchAsync(dispatchAsync);
|
||||
result.setDecreaseNetworkConsumerPriority(isDecreaseNetworkConsumerPriority());
|
||||
result.setDuplex(isDuplex());
|
||||
|
||||
List destsList = getDynamicallyIncludedDestinations();
|
||||
ActiveMQDestination dests[] = (ActiveMQDestination[]) destsList.toArray(new ActiveMQDestination[destsList.size()]);
|
||||
|
@ -333,4 +335,20 @@ public abstract class NetworkConnector extends ServiceSupport {
|
|||
public void setBridgeTempDestinations(boolean bridgeTempDestinations) {
|
||||
this.bridgeTempDestinations = bridgeTempDestinations;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return the duplex
|
||||
*/
|
||||
public boolean isDuplex(){
|
||||
return this.duplex;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param duplex the duplex to set
|
||||
*/
|
||||
public void setDuplex(boolean duplex){
|
||||
this.duplex=duplex;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue