org.fusesource.fabric.bridge.zk
Class ZkGatewayConnector

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.GatewayConnector
              extended by org.fusesource.fabric.bridge.zk.ZkGatewayConnector
All Implemented Interfaces:
java.lang.Runnable, 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 ZkGatewayConnector
extends GatewayConnector
implements java.lang.Runnable, org.linkedin.zookeeper.client.LifecycleListener

Connects BridgeConnectors on remote brokers to a TargetConnector on local broker. Also creates SourceConnectors for every ZkBridgeConnector based on its RemoteBridge.

Author:
Dhiraj Bokde

Field Summary
 
Fields inherited from class org.fusesource.fabric.bridge.internal.AbstractConnector
applicationContext, lifecycleMonitor
 
Constructor Summary
ZkGatewayConnector()
           
 
Method Summary
 void afterPropertiesSet()
           
protected  void doStart()
           
protected  void doStop()
           
 BrokerConfig getExportedBrokerConfig()
           
 org.fusesource.fabric.api.FabricService getFabricService()
           
 java.lang.String getFabricServiceRef()
           
 java.lang.String getProfileName()
           
 java.lang.String getVersionName()
           
 org.fusesource.fabric.zookeeper.IZKClient getZooKeeper()
           
 java.lang.String getZooKeeperRef()
           
 void onConnected()
           
 void onDisconnected()
           
 void run()
          Lookup containers using the bridge profile and update gateway configuration.
 void setExportedBrokerConfig(BrokerConfig exportedBrokerConfig)
           
 void setFabricService(org.fusesource.fabric.api.FabricService fabricService)
           
 void setFabricServiceRef(java.lang.String fabricServiceRef)
           
 void setProfileName(java.lang.String profileName)
           
 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.GatewayConnector
addDestinations, addRemoteBridge, doDestroy, doInitialize, getDestinationsConfig, getInboundDestinations, getInboundDestinationsRef, getLocalBrokerConfig, getOutboundDestinations, getOutboundDestinationsRef, getRemoteBridges, removeDestinations, removeRemoteBridge, setDestinationsConfig, setInboundDestinations, setInboundDestinationsRef, setLocalBrokerConfig, setOutboundDestinations, setOutboundDestinationsRef, setRemoteBridges
 
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
 

Constructor Detail

ZkGatewayConnector

public ZkGatewayConnector()
Method Detail

afterPropertiesSet

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

doStart

protected void doStart()
Overrides:
doStart in class GatewayConnector

doStop

protected void doStop()
Overrides:
doStop in class GatewayConnector

run

public void run()
Lookup containers using the bridge profile and update gateway configuration.

Specified by:
run in interface java.lang.Runnable
See Also:
Runnable.run()

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

setExportedBrokerConfig

public void setExportedBrokerConfig(BrokerConfig exportedBrokerConfig)

getExportedBrokerConfig

public BrokerConfig getExportedBrokerConfig()

getVersionName

public java.lang.String getVersionName()

setVersionName

public void setVersionName(java.lang.String versionName)

getProfileName

public java.lang.String getProfileName()

setProfileName

public void setProfileName(java.lang.String profileName)

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)

getFabricServiceRef

public java.lang.String getFabricServiceRef()

setFabricServiceRef

public void setFabricServiceRef(java.lang.String fabricServiceRef)

getFabricService

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

setFabricService

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


Copyright © 2014 Red Hat. All Rights Reserved.