org.fusesource.fabric.bridge.zk
Class ZkBridgeConnector

java.lang.Object
  extended by org.fusesource.fabric.bridge.model.IdentifiedType
      extended by org.fusesource.fabric.bridge.internal.AbstractConnector
          extended by org.fusesource.fabric.bridge.BridgeConnector
              extended by org.fusesource.fabric.bridge.zk.ZkBridgeConnector
All Implemented Interfaces:
DestinationsConfigManager, org.linkedin.zookeeper.client.LifecycleListener, org.springframework.beans.factory.Aware, org.springframework.beans.factory.DisposableBean, org.springframework.beans.factory.InitializingBean, org.springframework.context.ApplicationContextAware, org.springframework.context.Lifecycle, org.springframework.context.Phased, org.springframework.context.SmartLifecycle

public class ZkBridgeConnector
extends BridgeConnector
implements org.linkedin.zookeeper.client.LifecycleListener, org.springframework.context.ApplicationContextAware

Bi-directional connector for network bridges. Creates a bridge connected to a ZkGatewayConnector . Creates a BridgeConnector from the RemoteBridge registered in ZK by the ZkGatewayConnector.

Author:
Dhiraj Bokde

Field Summary
 
Fields inherited from class org.fusesource.fabric.bridge.internal.AbstractConnector
applicationContext, lifecycleMonitor
 
Constructor Summary
ZkBridgeConnector()
           
 
Method Summary
 void afterPropertiesSet()
           
protected  void doDestroy()
           
protected  void doInitialize()
           
protected  void doStop()
           
 BrokerConfig getExportedBrokerConfig()
           
 org.fusesource.fabric.api.FabricService getFabricService()
           
 java.lang.String getFabricServiceRef()
           
 int getGatewayConnectRetries()
           
 java.lang.String getGatewayProfileName()
           
 int getGatewayStartupDelay()
           
 java.lang.String getVersionName()
           
 org.fusesource.fabric.zookeeper.IZKClient getZooKeeper()
           
 java.lang.String getZooKeeperRef()
           
 void onConnected()
           
 void onDisconnected()
           
 void setExportedBrokerConfig(BrokerConfig exportedBrokerConfig)
           
 void setFabricService(org.fusesource.fabric.api.FabricService fabricService)
           
 void setFabricServiceRef(java.lang.String fabricServiceRef)
           
 void setGatewayConnectRetries(int gatewayConnectRetries)
           
 void setGatewayProfileName(java.lang.String gatewayProfileName)
          Set the name of the profile to use for looking up gateway configuration.
 void setGatewayStartupDelay(int gatewayStartupDelay)
           
 void setVersionName(java.lang.String versionName)
           
 void setZooKeeper(org.fusesource.fabric.zookeeper.IZKClient zooKeeper)
           
 void setZooKeeperRef(java.lang.String zooKeeperRef)
           
 
Methods inherited from class org.fusesource.fabric.bridge.BridgeConnector
addDestinations, doStart, getDestinationsConfig, getInboundDestinations, getInboundDestinationsRef, getLocalBrokerConfig, getOutboundDestinations, getOutboundDestinationsRef, getRemoteBrokerConfig, removeDestinations, setDestinationsConfig, setInboundDestinations, setInboundDestinationsRef, setLocalBrokerConfig, setOutboundDestinations, setOutboundDestinationsRef, setRemoteBrokerConfig
 
Methods inherited from class org.fusesource.fabric.bridge.internal.AbstractConnector
configureListenerContainer, configureListenerContainer, destroy, getConnectionFactory, getPhase, isAutoStartup, isInitialized, isRunning, setApplicationContext, setAutoStartup, setPhase, start, stop, stop
 
Methods inherited from class org.fusesource.fabric.bridge.model.IdentifiedType
getId, setId
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.springframework.context.ApplicationContextAware
setApplicationContext
 

Constructor Detail

ZkBridgeConnector

public ZkBridgeConnector()
Method Detail

afterPropertiesSet

public void afterPropertiesSet()
                        throws java.lang.Exception
Specified by:
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
Overrides:
afterPropertiesSet in class BridgeConnector
Throws:
java.lang.Exception

doInitialize

protected void doInitialize()
Overrides:
doInitialize in class BridgeConnector

doStop

protected void doStop()
Overrides:
doStop in class BridgeConnector

doDestroy

protected void doDestroy()
                  throws java.lang.Exception
Overrides:
doDestroy in class BridgeConnector
Throws:
java.lang.Exception

onConnected

public void onConnected()
Specified by:
onConnected in interface org.linkedin.zookeeper.client.LifecycleListener

onDisconnected

public void onDisconnected()
Specified by:
onDisconnected in interface org.linkedin.zookeeper.client.LifecycleListener

getExportedBrokerConfig

public BrokerConfig getExportedBrokerConfig()

setExportedBrokerConfig

public void setExportedBrokerConfig(BrokerConfig exportedBrokerConfig)

getVersionName

public java.lang.String getVersionName()

setVersionName

public void setVersionName(java.lang.String versionName)

getGatewayProfileName

public java.lang.String getGatewayProfileName()

setGatewayProfileName

public void setGatewayProfileName(java.lang.String gatewayProfileName)
Set the name of the profile to use for looking up gateway configuration. If set to default null, all profiles are searched.

Parameters:
gatewayProfileName -

getZooKeeperRef

public java.lang.String getZooKeeperRef()

setZooKeeperRef

public void setZooKeeperRef(java.lang.String zooKeeperRef)

getZooKeeper

public org.fusesource.fabric.zookeeper.IZKClient getZooKeeper()

setZooKeeper

public void setZooKeeper(org.fusesource.fabric.zookeeper.IZKClient zooKeeper)

getFabricService

public org.fusesource.fabric.api.FabricService getFabricService()

setFabricService

public void setFabricService(org.fusesource.fabric.api.FabricService fabricService)

getFabricServiceRef

public java.lang.String getFabricServiceRef()

setFabricServiceRef

public void setFabricServiceRef(java.lang.String fabricServiceRef)

getGatewayStartupDelay

public int getGatewayStartupDelay()

setGatewayStartupDelay

public void setGatewayStartupDelay(int gatewayStartupDelay)

getGatewayConnectRetries

public int getGatewayConnectRetries()

setGatewayConnectRetries

public void setGatewayConnectRetries(int gatewayConnectRetries)


Copyright © 2014 Red Hat. All Rights Reserved.