org.fusesource.fabric.cxf
Class FabricLoadBalancerFeature

java.lang.Object
  extended by org.apache.cxf.feature.AbstractFeature
      extended by org.fusesource.fabric.cxf.FabricLoadBalancerFeature
All Implemented Interfaces:
org.apache.cxf.buslifecycle.BusLifeCycleListener, org.apache.cxf.feature.Feature
Direct Known Subclasses:
FabricFailOverFeature

public class FabricLoadBalancerFeature
extends org.apache.cxf.feature.AbstractFeature
implements org.apache.cxf.buslifecycle.BusLifeCycleListener


Constructor Summary
FabricLoadBalancerFeature()
           
 
Method Summary
protected  void checkZkConnected()
          Lets check if we are connected and throw an exception if we are not.
 void destroy()
           
 java.util.List<org.apache.zookeeper.data.ACL> getAccessControlList()
           
 long getConnectionRetryTime()
           
protected  LoadBalanceStrategy getDefaultLoadBalanceStrategy()
           
protected  LoadBalanceTargetSelector getDefaultLoadBalanceTargetSelector()
           
 java.lang.String getFabricPath()
           
 org.fusesource.fabric.groups.Group getGroup()
           
 LoadBalanceStrategy getLoadBalanceStrategy()
           
 long getMaximumConnectionTimeout()
           
 org.linkedin.zookeeper.client.IZKClient getZkClient()
           
 void initComplete()
           
 void initialize(org.apache.cxf.Bus bus)
           
 void initialize(org.apache.cxf.endpoint.Client client, org.apache.cxf.Bus bus)
           
 boolean isShouldCloseZkClient()
           
 void postShutdown()
           
 void preShutdown()
           
 void setAccessControlList(java.util.List<org.apache.zookeeper.data.ACL> accessControlList)
           
 void setConnectionRetryTime(long connectionRetryTime)
           
 void setFabricPath(java.lang.String fabricPath)
           
 void setLoadBalanceStrategy(LoadBalanceStrategy strategy)
           
 void setMaximumConnectionTimeout(long maximumConnectionTimeout)
           
 void setShouldCloseZkClient(boolean closeZkClient)
           
 void setZkClient(org.linkedin.zookeeper.client.IZKClient zkClient)
           
 
Methods inherited from class org.apache.cxf.feature.AbstractFeature
getActive, initialize, initialize, initializeProvider
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FabricLoadBalancerFeature

public FabricLoadBalancerFeature()
Method Detail

initialize

public void initialize(org.apache.cxf.endpoint.Client client,
                       org.apache.cxf.Bus bus)
Specified by:
initialize in interface org.apache.cxf.feature.Feature
Overrides:
initialize in class org.apache.cxf.feature.AbstractFeature

initialize

public void initialize(org.apache.cxf.Bus bus)
Specified by:
initialize in interface org.apache.cxf.feature.Feature
Overrides:
initialize in class org.apache.cxf.feature.AbstractFeature

getDefaultLoadBalanceStrategy

protected LoadBalanceStrategy getDefaultLoadBalanceStrategy()

getDefaultLoadBalanceTargetSelector

protected LoadBalanceTargetSelector getDefaultLoadBalanceTargetSelector()

getGroup

public org.fusesource.fabric.groups.Group getGroup()
                                            throws java.lang.Exception
Throws:
java.lang.Exception

destroy

public void destroy()
             throws java.lang.Exception
Throws:
java.lang.Exception

getFabricPath

public java.lang.String getFabricPath()

setFabricPath

public void setFabricPath(java.lang.String fabricPath)

getAccessControlList

public java.util.List<org.apache.zookeeper.data.ACL> getAccessControlList()

setAccessControlList

public void setAccessControlList(java.util.List<org.apache.zookeeper.data.ACL> accessControlList)

getZkClient

public org.linkedin.zookeeper.client.IZKClient getZkClient()
                                                    throws java.lang.Exception
Throws:
java.lang.Exception

setZkClient

public void setZkClient(org.linkedin.zookeeper.client.IZKClient zkClient)

getLoadBalanceStrategy

public LoadBalanceStrategy getLoadBalanceStrategy()
                                           throws java.lang.Exception
Throws:
java.lang.Exception

setLoadBalanceStrategy

public void setLoadBalanceStrategy(LoadBalanceStrategy strategy)

setShouldCloseZkClient

public void setShouldCloseZkClient(boolean closeZkClient)

isShouldCloseZkClient

public boolean isShouldCloseZkClient()

getMaximumConnectionTimeout

public long getMaximumConnectionTimeout()

setMaximumConnectionTimeout

public void setMaximumConnectionTimeout(long maximumConnectionTimeout)

getConnectionRetryTime

public long getConnectionRetryTime()

setConnectionRetryTime

public void setConnectionRetryTime(long connectionRetryTime)

checkZkConnected

protected void checkZkConnected()
                         throws java.lang.Exception
Lets check if we are connected and throw an exception if we are not. Note that if start() has just been called on IZKClient then it will take a little while for the connection to be established, so we keep checking up to the getMaximumConnectionTimeout() until we throw the exception

Throws:
java.lang.Exception

initComplete

public void initComplete()
Specified by:
initComplete in interface org.apache.cxf.buslifecycle.BusLifeCycleListener

preShutdown

public void preShutdown()
Specified by:
preShutdown in interface org.apache.cxf.buslifecycle.BusLifeCycleListener

postShutdown

public void postShutdown()
Specified by:
postShutdown in interface org.apache.cxf.buslifecycle.BusLifeCycleListener


Copyright © 2012 FuseSource. All Rights Reserved.