public class JGroupsConnectorFactoryBean extends Object implements org.springframework.beans.factory.FactoryBean, org.springframework.beans.factory.InitializingBean, org.springframework.context.SmartLifecycle, org.springframework.beans.factory.BeanNameAware, org.springframework.context.ApplicationContextAware
| Constructor and Description |
|---|
JGroupsConnectorFactoryBean() |
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet() |
Object |
getObject() |
Class<?> |
getObjectType() |
int |
getPhase() |
boolean |
isAutoStartup() |
boolean |
isRunning() |
boolean |
isSingleton() |
void |
setApplicationContext(org.springframework.context.ApplicationContext applicationContext) |
void |
setBeanName(String name) |
void |
setChannelName(String channelName)
Optionally sets the logical channel name of the channel.
|
void |
setClusterName(String clusterName)
Sets the name of the cluster to subscribe to.
|
void |
setConfiguration(String configuration)
Sets the JGroups configuration file to load.
|
void |
setInterceptors(List<CommandHandlerInterceptor> interceptors)
Sets the interceptor to use in the default local segment (a SimpleCommandBus).
|
void |
setJoinTimeout(long joinTimeout)
Sets the number of milliseconds to wait for this member to join the group.
|
void |
setLoadFactor(int loadFactor)
Sets the load factor for this instance of the Distributed Command Bus.
|
void |
setLocalSegment(CommandBus localSegment)
Sets the CommandBus instance on which local commands must be dispatched.
|
void |
setPhase(int phase)
Sets the phase in which this bean must be started.
|
void |
setSerializer(Serializer serializer)
Sets the serializer used to serialize events before they are dispatched to the destination.
|
void |
start() |
void |
stop() |
void |
stop(Runnable callback) |
public Object getObject() throws Exception
getObject in interface org.springframework.beans.factory.FactoryBeanExceptionpublic Class<?> getObjectType()
getObjectType in interface org.springframework.beans.factory.FactoryBeanpublic boolean isSingleton()
isSingleton in interface org.springframework.beans.factory.FactoryBeanpublic void afterPropertiesSet()
throws Exception
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanExceptionpublic void setSerializer(Serializer serializer)
serializer - the serializer to serialize commands withpublic void setConfiguration(String configuration)
configuration - the JGroups configuration filepublic void setClusterName(String clusterName)
clusterName - The name of the cluster to connect topublic void setChannelName(String channelName)
channelName - The logical name to give to the channelpublic void setJoinTimeout(long joinTimeout)
start() method to wait until the member joined the cluster.
Defaults to -1, which causes the start() to wait indefinitely, until the member has joined the cluster.joinTimeout - The number of milliseconds to wait for the member to join the clusterpublic void setLocalSegment(CommandBus localSegment)
localSegment - the CommandBus instance to dispatch local messages onpublic void setInterceptors(List<CommandHandlerInterceptor> interceptors)
setLocalSegment(org.axonframework.commandhandling.CommandBus)), this configuration is ignored.interceptors - the list of interceptors (in order) for the local segmentpublic void setLoadFactor(int loadFactor)
loadFactor - The load factor for this instancepublic void start()
start in interface org.springframework.context.Lifecyclepublic void stop()
stop in interface org.springframework.context.Lifecyclepublic boolean isRunning()
isRunning in interface org.springframework.context.Lifecyclepublic boolean isAutoStartup()
isAutoStartup in interface org.springframework.context.SmartLifecyclepublic void stop(Runnable callback)
stop in interface org.springframework.context.SmartLifecyclepublic int getPhase()
getPhase in interface org.springframework.context.Phasedpublic void setPhase(int phase)
Integer.MAX_VALUE, which ensures the
Connector is started when other beans have been initialized.phase - the phase in which the JGroups connector must be started.SmartLifecyclepublic void setBeanName(String name)
setBeanName in interface org.springframework.beans.factory.BeanNameAwarepublic void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
throws org.springframework.beans.BeansException
setApplicationContext in interface org.springframework.context.ApplicationContextAwareorg.springframework.beans.BeansExceptionCopyright © 2010-2014. All Rights Reserved.