org.fusesource.fabric.cxf
Class FabricLoadBalancerFeature
java.lang.Object
org.apache.cxf.feature.AbstractFeature
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
| 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 |
FabricLoadBalancerFeature
public FabricLoadBalancerFeature()
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.