use a seperate configure method on the transport factory for when we are configureing the server side transports. Some transport impls are not asymetric and will need different configs.

git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@464658 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Hiram R. Chirino 2006-10-16 20:52:36 +00:00
parent 2e08bc7f37
commit d78c1ff608
2 changed files with 19 additions and 1 deletions

View File

@ -218,6 +218,24 @@ public abstract class TransportFactory {
return transport;
}
/**
* Fully configures and adds all need transport filters so that the transport
* can be used by the ActiveMQ message broker. The main difference between this and the
* configure() method is that the broker does not issue requests to the client so the
* ResponseCorrelator is not needed.
*
* @param transport
* @param wf
* @param options
* @return
* @throws Exception
*/
public Transport serverConfigure(Transport transport, WireFormat format, HashMap options) throws Exception {
transport = compositeConfigure(transport, format, options);
transport = new MutexTransport(transport);
return transport;
}
/**
* Similar to configure(...) but this avoid adding in the MutexTransport and ResponseCorrelator transport layers
* so that the resulting transport can more efficiently be used as part of a composite transport.

View File

@ -163,7 +163,7 @@ public class TcpTransportServer extends TransportServerThreadSupport {
options.putAll(transportOptions);
WireFormat format = wireFormatFactory.createWireFormat();
Transport transport = createTransport(socket, format);
Transport configuredTransport = transportFactory.configure(transport, format, options);
Transport configuredTransport = transportFactory.serverConfigure(transport, format, options);
getAcceptListener().onAccept(configuredTransport);
}
}