mirror of https://github.com/apache/activemq.git
This commit is contained in:
parent
bc9751ac23
commit
7e000d5a40
|
@ -65,4 +65,11 @@ public interface TransportServer extends Service {
|
|||
* connections.
|
||||
*/
|
||||
boolean isSslServer();
|
||||
|
||||
/**
|
||||
* Some protocols allow link stealing by default (if 2 connections have the same clientID - the youngest wins).
|
||||
* This is the default for AMQP and MQTT. However, JMS 1.1 spec requires the opposite
|
||||
* @return
|
||||
*/
|
||||
boolean isAllowLinkStealing();
|
||||
}
|
||||
|
|
|
@ -59,4 +59,8 @@ public class TransportServerFilter implements TransportServer {
|
|||
public boolean isSslServer() {
|
||||
return next.isSslServer();
|
||||
}
|
||||
|
||||
public boolean isAllowLinkStealing() {
|
||||
return next.isAllowLinkStealing();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -72,6 +72,8 @@ public class TcpTransportServer extends TransportServerThreadSupport implements
|
|||
protected long maxInactivityDurationInitalDelay = 10000;
|
||||
protected int minmumWireFormatVersion;
|
||||
protected boolean useQueueForAccept = true;
|
||||
protected boolean allowLinkStealing;
|
||||
|
||||
|
||||
/**
|
||||
* trace=true -> the Transport stack where this TcpTransport object will be, will have a TransportLogger layer
|
||||
|
@ -343,7 +345,7 @@ public class TcpTransportServer extends TransportServerThreadSupport implements
|
|||
|
||||
/**
|
||||
* @param socket
|
||||
* @param inetAddress
|
||||
* @param bindAddress
|
||||
* @return real hostName
|
||||
* @throws UnknownHostException
|
||||
*/
|
||||
|
@ -511,4 +513,13 @@ public class TcpTransportServer extends TransportServerThreadSupport implements
|
|||
public boolean isSslServer() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isAllowLinkStealing() {
|
||||
return allowLinkStealing;
|
||||
}
|
||||
|
||||
public void setAllowLinkStealing(boolean allowLinkStealing) {
|
||||
this.allowLinkStealing = allowLinkStealing;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -52,6 +52,7 @@ public class UdpTransportServer extends TransportServerSupport {
|
|||
private final Transport configuredTransport;
|
||||
private boolean usingWireFormatNegotiation;
|
||||
private final Map<DatagramEndpoint, Transport> transports = new HashMap<DatagramEndpoint, Transport>();
|
||||
private boolean allowLinkStealing;
|
||||
|
||||
public UdpTransportServer(URI connectURI, UdpTransport serverTransport, Transport configuredTransport, ReplayStrategy replayStrategy) {
|
||||
super(connectURI);
|
||||
|
@ -189,4 +190,13 @@ public class UdpTransportServer extends TransportServerSupport {
|
|||
public boolean isSslServer() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isAllowLinkStealing() {
|
||||
return allowLinkStealing;
|
||||
}
|
||||
|
||||
public void setAllowLinkStealing(boolean allowLinkStealing) {
|
||||
this.allowLinkStealing = allowLinkStealing;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue