mirror of https://github.com/apache/activemq.git
Allow the connector to override if async dispatch is allowed.
git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@418162 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
9c135637f9
commit
24d8986cee
|
@ -64,6 +64,7 @@ public class TransportConnector implements Connector {
|
|||
private URI discoveryUri;
|
||||
private URI connectUri;
|
||||
private String name;
|
||||
private boolean disableAsyncDispatch=false;
|
||||
|
||||
|
||||
/**
|
||||
|
@ -94,6 +95,7 @@ public class TransportConnector implements Connector {
|
|||
rc.setDiscoveryAgent(discoveryAgent);
|
||||
rc.setDiscoveryUri(discoveryUri);
|
||||
rc.setName(name);
|
||||
rc.setDisableAsyncDispatch(disableAsyncDispatch);
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
@ -228,7 +230,7 @@ public class TransportConnector implements Connector {
|
|||
// Implementation methods
|
||||
// -------------------------------------------------------------------------
|
||||
protected Connection createConnection(Transport transport) throws IOException {
|
||||
TransportConnection answer = new TransportConnection(this, transport, broker, taskRunnerFactory);
|
||||
TransportConnection answer = new TransportConnection(this, transport, broker, disableAsyncDispatch ? null : taskRunnerFactory);
|
||||
answer.setMessageAuthorizationPolicy(messageAuthorizationPolicy);
|
||||
return answer;
|
||||
}
|
||||
|
@ -303,4 +305,12 @@ public class TransportConnector implements Connector {
|
|||
public String toString() {
|
||||
return getName();
|
||||
}
|
||||
|
||||
public boolean isDisableAsyncDispatch() {
|
||||
return disableAsyncDispatch;
|
||||
}
|
||||
|
||||
public void setDisableAsyncDispatch(boolean disableAsyncDispatch) {
|
||||
this.disableAsyncDispatch = disableAsyncDispatch;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue