com.github.ltsopensource.spring
Class JobClientFactoryBean
java.lang.Object
com.github.ltsopensource.spring.JobClientFactoryBean
- All Implemented Interfaces:
- org.springframework.beans.factory.DisposableBean, org.springframework.beans.factory.FactoryBean<JobClient>, org.springframework.beans.factory.InitializingBean
public class JobClientFactoryBean
- extends Object
- implements org.springframework.beans.factory.FactoryBean<JobClient>, org.springframework.beans.factory.InitializingBean, org.springframework.beans.factory.DisposableBean
JobClient Spring Bean 工厂类
- Author:
- Robert HG (254963746@qq.com) on 8/4/15.
JobClientFactoryBean
public JobClientFactoryBean()
getObject
public JobClient getObject()
throws Exception
- Specified by:
getObject in interface org.springframework.beans.factory.FactoryBean<JobClient>
- Throws:
Exception
getObjectType
public Class<?> getObjectType()
- Specified by:
getObjectType in interface org.springframework.beans.factory.FactoryBean<JobClient>
isSingleton
public boolean isSingleton()
- Specified by:
isSingleton in interface org.springframework.beans.factory.FactoryBean<JobClient>
afterPropertiesSet
public void afterPropertiesSet()
throws Exception
- Specified by:
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
- Throws:
Exception
start
public void start()
- 可以自己得到JobTracker对象后调用,也可以直接使用spring配置中的init属性指定该方法
destroy
public void destroy()
throws Exception
- Specified by:
destroy in interface org.springframework.beans.factory.DisposableBean
- Throws:
Exception
setClusterName
public void setClusterName(String clusterName)
setNodeGroup
public void setNodeGroup(String nodeGroup)
setRegistryAddress
public void setRegistryAddress(String registryAddress)
setDataPath
public void setDataPath(String dataPath)
setMasterChangeListeners
public void setMasterChangeListeners(com.github.ltsopensource.core.listener.MasterChangeListener... masterChangeListeners)
setConfigs
public void setConfigs(Properties configs)
setJobCompletedHandler
public void setJobCompletedHandler(JobCompletedHandler jobCompletedHandler)
setUseRetryClient
public void setUseRetryClient(boolean useRetryClient)
setLocations
public void setLocations(String... locations)
setIdentity
public void setIdentity(String identity)
setBindIp
public void setBindIp(String bindIp)
Copyright © 2017. All rights reserved.