1 14 15 package org.apache.activemq.network; 16 17 import org.apache.activemq.transport.Transport; 18 19 24 public class NetworkBridgeFactory{ 25 26 34 public static DemandForwardingBridge createBridge(NetworkBridgeConfiguration config,Transport localTransport, 35 Transport remoteTransport){ 36 return createBridge(config,localTransport,remoteTransport,null); 37 } 38 39 48 public static DemandForwardingBridge createBridge(NetworkBridgeConfiguration configuration,Transport localTransport, 49 Transport remoteTransport,NetworkBridgeFailedListener listener){ 50 DemandForwardingBridge result=null; 51 if(configuration.isConduitSubscriptions()){ 52 if(configuration.isDynamicOnly()){ 53 result=new ConduitBridge(configuration,localTransport,remoteTransport); 54 }else{ 55 result=new DurableConduitBridge(configuration,localTransport,remoteTransport); 56 } 57 }else{ 58 result=new DemandForwardingBridge(configuration,localTransport,remoteTransport); 59 } 60 if(listener!=null){ 61 result.setNetworkBridgeFailedListener(listener); 62 } 63 return result; 64 } 65 } 66 | Popular Tags |